aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/App.svelte
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-15 17:16:34 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-15 17:36:40 +0800
commit76559c624f7d2418c2f25e4cb2d3c994f4218964 (patch)
treeb7e36643b7ade0b3dd5a8990c71428958d12f4a5 /ui/src/App.svelte
parent42bac8d27c660b8c4a0cc9b7412f8349413c087e (diff)
downloadDropOut-76559c624f7d2418c2f25e4cb2d3c994f4218964.tar.gz
DropOut-76559c624f7d2418c2f25e4cb2d3c994f4218964.zip
refactor: Clean up imports and enhance GameConsole display with conditional rendering and improved styling
Diffstat (limited to 'ui/src/App.svelte')
-rw-r--r--ui/src/App.svelte14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/src/App.svelte b/ui/src/App.svelte
index f32a42f..0bb31ae 100644
--- a/ui/src/App.svelte
+++ b/ui/src/App.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import { getVersion } from "@tauri-apps/api/app";
- import { convertFileSrc } from "@tauri-apps/api/core";
+ // import { convertFileSrc } from "@tauri-apps/api/core"; // Removed duplicate, handled by import below or inline
import { onDestroy, onMount } from "svelte";
import DownloadMonitor from "./lib/DownloadMonitor.svelte";
import GameConsole from "./lib/GameConsole.svelte";
@@ -18,6 +18,7 @@
import { gameState } from "./stores/game.svelte";
import { settingsState } from "./stores/settings.svelte";
import { uiState } from "./stores/ui.svelte";
+ import { convertFileSrc } from "@tauri-apps/api/core";
let mouseX = $state(0);
let mouseY = $state(0);
@@ -63,6 +64,7 @@
src={convertFileSrc(settingsState.settings.custom_background_path)}
alt="Background"
class="absolute inset-0 w-full h-full object-cover transition-transform duration-[20s] ease-linear hover:scale-105"
+ onerror={(e) => console.error("Failed to load main background:", e)}
/>
<!-- Dimming Overlay for readability -->
<div class="absolute inset-0 bg-black/50 "></div>
@@ -129,7 +131,9 @@
</div>
<!-- Bottom Bar -->
- <BottomBar />
+ {#if uiState.currentView === "home"}
+ <BottomBar />
+ {/if}
</div>
</main>
</div>
@@ -138,10 +142,8 @@
<StatusToast />
{#if uiState.showConsole}
- <!-- Assuming GameConsole handles its own display mode or overlay -->
- <div class="fixed inset-0 z-[100] bg-black/80 flex items-center justify-center p-10">
- <div class="w-full h-full bg-[#1e1e1e] rounded-xl overflow-hidden border border-white/10 shadow-2xl relative">
- <button class="absolute top-4 right-4 text-white hover:text-red-400 z-10" onclick={() => uiState.toggleConsole()}>✕</button>
+ <div class="fixed inset-0 z-[100] bg-black/80 backdrop-blur-sm flex items-center justify-center p-8">
+ <div class="w-full h-full max-w-6xl max-h-[85vh] bg-[#1e1e1e] rounded-lg overflow-hidden border border-zinc-700 shadow-2xl relative flex flex-col">
<GameConsole />
</div>
</div>