chore: add svelte component layer with monaco editor

This commit is contained in:
HorizonCode committed 2026-10-31 10:28:33 +01:00
1 parent 8071085e94
commit 54f7f81160
55 files changed
+20563 -2043

No files matched your search

@@ -1,6 +1,6 @@
<script lang="ts">
import Ellipsis from '@lucide/svelte/icons/ellipsis';
import Play from '@lucide/svelte/icons/play';
import ThemeIcon from '$lib/components/theme/ThemeIcon.svelte';
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/themeIcons';
const prop: {
downloading: boolean;
@@ -8,6 +8,7 @@
text: string;
subtext?: string;
disabled?: boolean;
iconSet?: ThemeIconSet;
onClick?: () => void;
} = $props();
@@ -66,14 +67,22 @@
<div class="size-9 rounded-full bg-black/30 flex items-center justify-center relative z-10">
{#if prop.downloading}
{#if prop.progress === -1}
<Ellipsis class="size-4 text-primary-foreground fill-current animate-pulse" />
<ThemeIcon
name="ellipsis"
set={prop.iconSet ?? DEFAULT_THEME_ICON_SET}
class="size-4 text-primary-foreground fill-current animate-pulse"
/>
{:else}
<span class="text-[10px] font-bold text-primary-foreground">
{prop.progress.toFixed()}
</span>
{/if}
{:else}
<Play class="size-4 text-primary-foreground fill-current ml-0.5" />
<ThemeIcon
name="launch"
set={prop.iconSet ?? DEFAULT_THEME_ICON_SET}
class="size-4 text-primary-foreground fill-current ml-0.5"
/>
{/if}
</div>
</div>
+15 -8
View File
@@ -1,14 +1,21 @@
<script lang="ts">
import ThemeIcon from '$lib/components/theme/ThemeIcon.svelte';
import { config } from '$lib/config';
import { custom_theme_audio_playing, custom_theme_volume, platform } from '$lib/global';
import {
active_custom_theme,
custom_theme_audio_playing,
custom_theme_volume,
platform,
} from '$lib/global';
import { DEFAULT_THEME_ICON_SET } from '$lib/themeIcons';
import { reduceAnimations } from '$lib/userSettings';
import { Volume, Volume1, VolumeOff } from '@lucide/svelte';
import Minimize from '@lucide/svelte/icons/minus';
import Volume2 from '@lucide/svelte/icons/volume-2';
import Close from '@lucide/svelte/icons/x';
import { getCurrentWindow } from '@tauri-apps/api/window';
import { onMount } from 'svelte';
const iconSet = $derived($active_custom_theme?.definition?.iconSet ?? DEFAULT_THEME_ICON_SET);
onMount(() => {
const appWindow = getCurrentWindow();
@@ -33,13 +40,13 @@
></div>
{#if $custom_theme_volume > 0.7}
<Volume2 class="z-10 pointer-events-none" size={14} />
<ThemeIcon name="volume" set={iconSet} class="z-10 pointer-events-none" size={14} />
{:else if $custom_theme_volume >= 0.15}
<Volume1 class="z-10 pointer-events-none" size={14} />
<ThemeIcon name="volume-low" set={iconSet} class="z-10 pointer-events-none" size={14} />
{:else if $custom_theme_volume > 0}
<Volume class="z-10 pointer-events-none" size={14} />
<ThemeIcon name="volume-low" set={iconSet} class="z-10 pointer-events-none" size={14} />
{:else}
<VolumeOff class="z-10 pointer-events-none" size={14} />
<ThemeIcon name="volume-off" set={iconSet} class="z-10 pointer-events-none" size={14} />
{/if}
</div>
@@ -62,7 +69,7 @@
max="1"
step="0.01"
bind:value={$custom_theme_volume}
on:input={() => {
oninput={() => {
config.value<number>('volume').set($custom_theme_volume);
}}
class="volume-slider"