mirror of
https://github.com/tale/headplane.git
synced 2026-08-28 16:07:07 +00:00
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import Button from "~/components/button";
|
|
import Dialog, { DialogPanel } from "~/components/dialog";
|
|
import Text from "~/components/text";
|
|
import Title from "~/components/title";
|
|
import type { PreAuthKey, User } from "~/types";
|
|
|
|
interface ExpireAuthKeyProps {
|
|
authKey: PreAuthKey;
|
|
user: User;
|
|
}
|
|
|
|
export default function ExpireAuthKey({ authKey, user }: ExpireAuthKeyProps) {
|
|
return (
|
|
<Dialog>
|
|
<Button variant="heavy">Expire Key</Button>
|
|
<DialogPanel variant="destructive">
|
|
<Title>Expire auth key?</Title>
|
|
<input name="action_id" type="hidden" value="expire_preauthkey" />
|
|
<input name="user_id" type="hidden" value={user.id} />
|
|
<input name="key_id" type="hidden" value={authKey.id} />
|
|
<input name="key" type="hidden" value={authKey.key} />
|
|
<Text>
|
|
Expiring this authentication key will immediately prevent it from being used to
|
|
authenticate new devices. This action cannot be undone.
|
|
</Text>
|
|
</DialogPanel>
|
|
</Dialog>
|
|
);
|
|
}
|