refined doll editor windowing logic pt 2

This commit is contained in:
2025-12-22 17:49:28 +08:00
parent 29a01f9234
commit 6b21881d8a
4 changed files with 279 additions and 20 deletions

View File

@@ -3,11 +3,40 @@
import Preferences from "./tabs/preferences.svelte";
import YourDolls from "./tabs/your-dolls/index.svelte";
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
import { listen } from "@tauri-apps/api/event";
import { onMount } from "svelte";
let showInteractionOverlay = false;
onMount(() => {
const unlisten = listen("set-interaction-overlay", (event) => {
showInteractionOverlay = event.payload as boolean;
});
return () => {
unlisten.then((u) => u());
};
});
</script>
<div
class="p-2 h-full absolute inset-0 bg-base-100 border-base-200/50 border border-t-0 rounded-b-xl"
>
{#if showInteractionOverlay}
<div
class="absolute inset-0 z-50 cursor-not-allowed rounded-b-xl"
role="none"
onclick={(e) => {
e.stopPropagation();
e.preventDefault();
}}
onkeydown={(e) => {
e.stopPropagation();
e.preventDefault();
}}
tabindex="-1"
></div>
{/if}
<div class="flex flex-col gap-2 h-full">
<div class="size-full flex flex-col gap-2">
<div class="tabs tabs-lift h-full flex-1">