feat: add account warn

This commit is contained in:
kwaroran
2024-07-06 01:44:10 +09:00
parent 803b17ac56
commit 02b0e0cf9f
2 changed files with 16 additions and 0 deletions

View File

@@ -11,6 +11,8 @@
import Settings from './lib/Setting/Settings.svelte';
import { showRealmInfoStore } from './ts/characterCards';
import RealmFrame from './lib/UI/Realm/RealmFrame.svelte';
import { AccountWarning } from './ts/storage/accountStorage';
import AccountWarningComp from './lib/Others/AccountWarningComp.svelte';
let didFirstSetup: boolean = false
let gridOpen = false
@@ -63,4 +65,7 @@
{#if $ShowRealmFrameStore}
<RealmFrame />
{/if}
{#if $AccountWarning}
<AccountWarningComp />
{/if}
</main>

View File

@@ -0,0 +1,11 @@
<script lang="ts">
import { AlertOctagon } from "lucide-svelte";
import { alertMd } from "src/ts/alert";
import { AccountWarning } from "src/ts/storage/accountStorage";
</script>
<button class="absolute top-2 right-2 z-10 text-white bg-red-800 hover:bg-red-600 p-2 rounded" on:click={() =>{
alertMd($AccountWarning)
}}>
<AlertOctagon size={24} />
</button>