added post key route

This commit is contained in:
daniel31x13
2024-01-13 01:20:06 -05:00
parent 834d25a99e
commit d91ebb3fa2
13 changed files with 417 additions and 83 deletions
+35
View File
@@ -0,0 +1,35 @@
import SettingsLayout from "@/layouts/SettingsLayout";
import React, { useState } from "react";
import NewKeyModal from "@/components/ModalContent/NewKeyModal";
export default function Api() {
const [newKeyModal, setNewKeyModal] = useState(false);
return (
<SettingsLayout>
<p className="capitalize text-3xl font-thin inline">API Keys</p>
<div className="divider my-3"></div>
<div className="flex flex-col gap-3">
<p>
Access Tokens can be used to access Linkwarden from other apps and
services without giving away your Username and Password.
</p>
<button
className={`btn btn-accent dark:border-violet-400 text-white tracking-wider w-fit flex items-center gap-2`}
onClick={() => {
setNewKeyModal(true);
}}
>
New Access Token
</button>
</div>
{newKeyModal ? (
<NewKeyModal onClose={() => setNewKeyModal(false)} />
) : undefined}
</SettingsLayout>
);
}