Migrate to svelte 5
This commit is contained in:
@@ -1,33 +1,34 @@
|
||||
<script lang="ts">
|
||||
import { ArrowLeft, MenuIcon } from "lucide-svelte";
|
||||
import { language } from "src/lang";
|
||||
import { CurrentCharacter, MobileGUIStack, MobileSearch, selectedCharID, SettingsMenuIndex, MobileSideBar } from "src/ts/stores";
|
||||
import { DataBase } from "src/ts/storage/database";
|
||||
import { MobileGUIStack, MobileSearch, selectedCharID, SettingsMenuIndex, MobileSideBar } from "src/ts/stores";
|
||||
|
||||
</script>
|
||||
<div class="w-full px-4 h-16 border-b border-b-darkborderc bg-darkbg flex justify-start items-center gap-2">
|
||||
{#if $selectedCharID !== -1 && $MobileSideBar > 0}
|
||||
<button on:click={() => {
|
||||
<button onclick={() => {
|
||||
MobileSideBar.set(0)
|
||||
}}>
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<span class="font-bold text-lg w-2/3 truncate">{language.menu}</span>
|
||||
{:else if $selectedCharID !== -1}
|
||||
<button on:click={() => {
|
||||
<button onclick={() => {
|
||||
selectedCharID.set(-1)
|
||||
}}>
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<span class="font-bold text-lg w-2/3 truncate">{$CurrentCharacter.name}</span>
|
||||
<span class="font-bold text-lg w-2/3 truncate">{$DataBase.characters[$selectedCharID].name}</span>
|
||||
<div class="flex-1 flex justify-end">
|
||||
<button on:click={() => {
|
||||
<button onclick={() => {
|
||||
MobileSideBar.set(1)
|
||||
}}>
|
||||
<MenuIcon />
|
||||
</button>
|
||||
</div>
|
||||
{:else if $MobileGUIStack === 2 && $SettingsMenuIndex > -1}
|
||||
<button on:click={() => {
|
||||
<button onclick={() => {
|
||||
SettingsMenuIndex.set(-1)
|
||||
}}>
|
||||
<ArrowLeft />
|
||||
|
||||
Reference in New Issue
Block a user