feat: resizable character panel and full-height sprite

- Change sprite to use full height instead of full width for better scaling
- Add draggable divider between character panel and terminal
- Persist panel width preference in config (min: 200px, max: 600px)

Closes #10
This commit is contained in:
2026-01-23 18:05:55 -08:00
committed by Naomi Carrigan
parent ad9c914fb1
commit 13c96a973a
6 changed files with 75 additions and 14 deletions
+15 -11
View File
@@ -57,30 +57,34 @@
}
</script>
<div class="anime-girl-container flex flex-col items-center justify-end h-full p-4">
<div class="character-frame relative {getBackgroundGlow()} w-full max-w-md">
<div class="sprite-container {getAnimationClass()}">
<div
class="anime-girl-container flex flex-col items-center justify-between h-full p-4 overflow-hidden"
>
<div
class="character-frame relative {getBackgroundGlow()} flex-1 flex items-center justify-center min-h-0"
>
<div class="sprite-container {getAnimationClass()} h-full flex items-center justify-center">
<img
src="/sprites/{info.spriteFile}"
alt="Hikari - {info.label}"
class="character-sprite w-full h-auto object-contain"
class="character-sprite h-full w-auto max-w-full object-contain"
onerror={(e) => {
const target = e.currentTarget as HTMLImageElement;
target.src = "/sprites/placeholder.svg";
}}
/>
</div>
</div>
<div class="state-indicator absolute -bottom-2 left-1/2 transform -translate-x-1/2">
<div
class="px-3 py-1 rounded-full text-xs font-medium bg-[var(--bg-secondary)] border border-[var(--border-color)] text-[var(--accent-primary)]"
>
{info.label}
</div>
<div class="state-indicator mt-2">
<div
class="px-3 py-1 rounded-full text-xs font-medium bg-[var(--bg-secondary)] border border-[var(--border-color)] text-[var(--accent-primary)]"
>
{info.label}
</div>
</div>
<div class="speech-bubble mt-4 max-w-xs">
<div class="speech-bubble mt-2 max-w-xs flex-shrink-0">
<div
class="relative bg-[var(--bg-secondary)] rounded-lg px-4 py-2 border border-[var(--border-color)]"
>
+1
View File
@@ -16,6 +16,7 @@
notification_volume: 0.7,
always_on_top: false,
update_checks_enabled: true,
character_panel_width: null,
});
let isOpen = $state(false);
+1
View File
@@ -47,6 +47,7 @@
notification_volume: 0.5,
always_on_top: false,
update_checks_enabled: true,
character_panel_width: null,
});
onMount(async () => {