chore: add copy button to access token

This commit is contained in:
Steven
2023-08-07 20:08:47 +08:00
parent 6f96e5e0c8
commit fda2a3436d
2 changed files with 22 additions and 15 deletions

View File

@@ -12,17 +12,13 @@ interface Props {
}
const expirationOptions = [
{
label: "1 hour",
value: 3600,
},
{
label: "8 hours",
value: 3600 * 8,
},
{
label: "1 week",
value: 3600 * 24 * 7,
label: "1 month",
value: 3600 * 24 * 30,
},
{
label: "Never",
@@ -40,7 +36,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
const currentUser = useUserStore().getCurrentUser();
const [state, setState] = useState({
description: "",
expiration: 3600,
expiration: 3600 * 8,
});
const requestState = useLoading(false);