mirror of
https://github.com/openziti/zrok.git
synced 2025-06-19 08:17:05 +02:00
clipboard text (#724)
This commit is contained in:
parent
3261c4cbaf
commit
98aae8f90d
@ -2,12 +2,13 @@ import {Node} from "@xyflow/react";
|
|||||||
import {Button, Grid2, Tooltip, Typography} from "@mui/material";
|
import {Button, Grid2, Tooltip, Typography} from "@mui/material";
|
||||||
import AccessIcon from "@mui/icons-material/Lan";
|
import AccessIcon from "@mui/icons-material/Lan";
|
||||||
import useApiConsoleStore from "./model/store.ts";
|
import useApiConsoleStore from "./model/store.ts";
|
||||||
import {useEffect, useState} from "react";
|
import React, {useEffect, useState} from "react";
|
||||||
import {Frontend} from "./api";
|
import {Frontend} from "./api";
|
||||||
import DeleteIcon from "@mui/icons-material/Delete";
|
import DeleteIcon from "@mui/icons-material/Delete";
|
||||||
import PropertyTable from "./PropertyTable.tsx";
|
import PropertyTable from "./PropertyTable.tsx";
|
||||||
import ReleaseAccessModal from "./ReleaseAccessModal.tsx";
|
import ReleaseAccessModal from "./ReleaseAccessModal.tsx";
|
||||||
import {getMetadataApi} from "./model/api.ts";
|
import {getMetadataApi} from "./model/api.ts";
|
||||||
|
import ClipboardText from "./ClipboardText.tsx";
|
||||||
|
|
||||||
interface AccessPanelProps {
|
interface AccessPanelProps {
|
||||||
access: Node;
|
access: Node;
|
||||||
@ -38,6 +39,36 @@ const AccessPanel = ({ access }: AccessPanelProps) => {
|
|||||||
}, [access]);
|
}, [access]);
|
||||||
|
|
||||||
const customProperties = {
|
const customProperties = {
|
||||||
|
bindAddress: row => <>
|
||||||
|
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
||||||
|
<Grid2 display="flex" justifyContent="left">
|
||||||
|
<span>{row.value}</span>
|
||||||
|
</Grid2>
|
||||||
|
<Grid2 display="flex" justifyContent="right" sx={{ flexGrow: 1 }}>
|
||||||
|
<ClipboardText text={row.value} />
|
||||||
|
</Grid2>
|
||||||
|
</Grid2>
|
||||||
|
</>,
|
||||||
|
frontendToken: row => <>
|
||||||
|
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
||||||
|
<Grid2 display="flex" justifyContent="left">
|
||||||
|
<span>{row.value}</span>
|
||||||
|
</Grid2>
|
||||||
|
<Grid2 display="flex" justifyContent="right" sx={{ flexGrow: 1 }}>
|
||||||
|
<ClipboardText text={row.value} />
|
||||||
|
</Grid2>
|
||||||
|
</Grid2>
|
||||||
|
</>,
|
||||||
|
shareToken: row => <>
|
||||||
|
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
||||||
|
<Grid2 display="flex" justifyContent="left">
|
||||||
|
<span>{row.value}</span>
|
||||||
|
</Grid2>
|
||||||
|
<Grid2 display="flex" justifyContent="right" sx={{ flexGrow: 1 }}>
|
||||||
|
<ClipboardText text={row.value} />
|
||||||
|
</Grid2>
|
||||||
|
</Grid2>
|
||||||
|
</>,
|
||||||
createdAt: row => new Date(row.value).toLocaleString(),
|
createdAt: row => new Date(row.value).toLocaleString(),
|
||||||
updatedAt: row => new Date(row.value).toLocaleString(),
|
updatedAt: row => new Date(row.value).toLocaleString(),
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ const SharePanel = ({ share }: SharePanelProps) => {
|
|||||||
</Grid2>
|
</Grid2>
|
||||||
</>,
|
</>,
|
||||||
reserved: row => row.value ? "reserved" : "ephemeral",
|
reserved: row => row.value ? "reserved" : "ephemeral",
|
||||||
token: row => <>
|
shareToken: row => <>
|
||||||
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
||||||
<Grid2 display="flex" justifyContent="left">
|
<Grid2 display="flex" justifyContent="left">
|
||||||
<span>{row.value}</span>
|
<span>{row.value}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user