mirror of
https://github.com/openziti/zrok.git
synced 2025-03-13 15:08:21 +01:00
might as well throw those clipboard widgets around more (#724)
This commit is contained in:
parent
ec39625b44
commit
625dfe84f7
@ -32,7 +32,7 @@ const AccountPanel = ({ account }: AccountPanelProps) => {
|
||||
setRegenerateOpen(false);
|
||||
}
|
||||
|
||||
const customProps = {
|
||||
const customProperties = {
|
||||
token: row => <Grid2 container><SecretToggle secret={row.value} /><ClipboardText text={row.value} /></Grid2>
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ const AccountPanel = ({ account }: AccountPanelProps) => {
|
||||
</Grid2>
|
||||
<Grid2 container sx={{ flexGrow: 1 }}>
|
||||
<Grid2 display="flex">
|
||||
<PropertyTable object={user} custom={customProps} labels={label} />
|
||||
<PropertyTable object={user} custom={customProperties} labels={label} />
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
</Typography>
|
||||
|
@ -2,7 +2,7 @@ import {User} from "./model/user.ts";
|
||||
import {useEffect, useRef, useState} from "react";
|
||||
import {modalStyle} from "./styling/theme.ts";
|
||||
import {Box, Button, Checkbox, FormControlLabel, Grid2, Modal, Typography} from "@mui/material";
|
||||
import {getAccountApi, getMetadataApi} from "./model/api.ts";
|
||||
import {getAccountApi} from "./model/api.ts";
|
||||
import useApiConsoleStore from "./model/store.ts";
|
||||
import ClipboardText from "./ClipboardText.tsx";
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
import {Node} from "@xyflow/react";
|
||||
import {Button, Grid2, Tooltip, Typography} from "@mui/material";
|
||||
import ShareIcon from "@mui/icons-material/Share";
|
||||
import {Configuration, MetadataApi, Share} from "./api";
|
||||
import {Share} from "./api";
|
||||
import {useEffect, useState} from "react";
|
||||
import PropertyTable from "./PropertyTable.tsx";
|
||||
import useApiConsoleStore from "./model/store.ts";
|
||||
import DeleteIcon from "@mui/icons-material/Delete";
|
||||
import ReleaseShareModal from "./ReleaseShareModal.tsx";
|
||||
import {getMetadataApi} from "./model/api.ts";
|
||||
import ClipboardText from "./ClipboardText.tsx";
|
||||
|
||||
interface SharePanelProps {
|
||||
share: Node;
|
||||
@ -29,8 +30,27 @@ const SharePanel = ({ share }: SharePanelProps) => {
|
||||
const customProperties = {
|
||||
createdAt: row => new Date(row.value).toLocaleString(),
|
||||
updatedAt: row => new Date(row.value).toLocaleString(),
|
||||
frontendEndpoint: row => <a href={row.value} target="_">{row.value}</a>,
|
||||
reserved: row => row.value ? "reserved" : "ephemeral"
|
||||
frontendEndpoint: row => <>
|
||||
<Grid2 container sx={{ flexGrow: 1 }} alignItems="center">
|
||||
<Grid2 display="flex" justifyContent="left">
|
||||
<a href={row.value} target="_">{row.value}</a>
|
||||
</Grid2>
|
||||
<Grid2 display="flex" justifyContent="right" sx={{ flexGrow: 1 }}>
|
||||
<ClipboardText text={row.value} />
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
</>,
|
||||
reserved: row => row.value ? "reserved" : "ephemeral",
|
||||
token: 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>
|
||||
</>
|
||||
}
|
||||
|
||||
const labels = {
|
||||
|
Loading…
Reference in New Issue
Block a user