From e0c4b23f5e4a2d01be3cc03adc2dbe0651b7bba1 Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Tue, 28 Feb 2023 00:12:31 +0100 Subject: [PATCH] feat(dashboard): add system recovery section --- dashboard/src/routes/Settings/Settings.svelte | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dashboard/src/routes/Settings/Settings.svelte b/dashboard/src/routes/Settings/Settings.svelte index fe4603ce..f018c0b9 100644 --- a/dashboard/src/routes/Settings/Settings.svelte +++ b/dashboard/src/routes/Settings/Settings.svelte @@ -2,12 +2,15 @@ import { Card, CardHeader, CardBody, Container, Row, Col, CardTitle, Tooltip, Button } from 'sveltestrap'; import Toggle from 'svelte-toggle'; import { autoresize } from 'svelte-textarea-autoresize'; + import FaAmbulance from 'svelte-icons/fa/FaAmbulance.svelte' import FaCogs from 'svelte-icons/fa/FaCogs.svelte' import type { Config } from '../../api/types'; import api from '../../api'; let savedSettings = JSON.parse(localStorage.getItem("pk-settings")); let apiConfig: Config = JSON.parse(localStorage.getItem("pk-config")); + let token = localStorage.getItem("pk-token"); + let showToken = false; let settings = { appearance: { @@ -40,6 +43,7 @@ else document.getElementById("app").classList.remove("dyslexic"); } + const revealToken = () => showToken = !showToken; @@ -123,6 +127,36 @@ {/if} + {#if token} + + + + + +
+ +
Recovery +
+
+ +

If you've lost access to your discord account, you can retrieve your token here.

+

Send a direct message to a staff member (a helper, moderator or developer in the support server), they can recover your system with this token.

+ + {#if showToken} + + + {token} + + + + + + {/if} +
+
+ +
+ {/if}