diff --git a/mobile/src/lib/commands.ts b/mobile/src/lib/commands.ts index f4ca065..95e630f 100644 --- a/mobile/src/lib/commands.ts +++ b/mobile/src/lib/commands.ts @@ -1,4 +1,3 @@ -// utils.ts import { commands } from '../../bindings' export default new Proxy({} as typeof commands, { diff --git a/mobile/src/routes/+page.svelte b/mobile/src/routes/+page.svelte index 04f485a..2759368 100644 --- a/mobile/src/routes/+page.svelte +++ b/mobile/src/routes/+page.svelte @@ -37,7 +37,7 @@ } -
+
{#if error}
⚠ {error}
{/if} @@ -47,7 +47,7 @@ type="button" onclick={open_library} disabled={loading} - class="shrink-0 px-3 py-1.5 bg-neutral-100 text-neutral-900 rounded-lg font-semibold text-xs hover:bg-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors" + class="shrink-0 px-3 py-1.5 bg-neutral-900 text-neutral-100 dark:bg-neutral-100 dark:text-neutral-900 rounded-lg font-semibold text-xs hover:bg-neutral-700 dark:hover:bg-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors" > {loading ? 'Loading…' : 'Open'} @@ -57,10 +57,10 @@ {#if library} {:else} -
+
♪
-

No library loaded

+

No library loaded

{@render open_button()}
diff --git a/mobile/src/routes/Library.svelte b/mobile/src/routes/Library.svelte index 6f338a4..41924b8 100644 --- a/mobile/src/routes/Library.svelte +++ b/mobile/src/routes/Library.svelte @@ -163,24 +163,24 @@ } -
+
-
+
{#if page.url.searchParams.has('id')} {/if}
{#if view.kind === 'browser'} -

{node_name(view.folder_id)}

+

{node_name(view.folder_id)}

{:else if view.kind === 'tracks'} -

{node_name(view.playlist_id)}

+

{node_name(view.playlist_id)}

{/if}
@@ -189,14 +189,14 @@
{#if error} -
⚠ {error}
+
⚠ {error}
{/if} {#if view.kind === 'browser'}
{#if current_children.length > 0} -
    +
      {#each current_children as child_id} {@const tl = get_tracklist(child_id)} {#if tl?.type === 'folder'} @@ -204,7 +204,7 @@ {:else if tl?.type === 'playlist'} @@ -233,7 +233,7 @@ {/if} {/each}
    {:else} -
    This folder is empty
    +
    This folder is empty
    {/if}
{:else if view.kind === 'tracks'} -
+
⌕ @@ -275,43 +275,43 @@ type="search" placeholder="Search…" bind:value={search_query} - class="pl-7 pr-3 py-1.5 w-32 bg-neutral-800 border border-neutral-700 rounded-lg text-neutral-200 text-xs placeholder-neutral-600 outline-none focus:border-neutral-500 transition-colors" + class="pl-7 pr-3 py-1.5 w-32 bg-neutral-100 dark:bg-neutral-800 border border-neutral-300 dark:border-neutral-700 rounded-lg text-neutral-800 dark:text-neutral-200 text-xs placeholder-neutral-400 dark:placeholder-neutral-600 outline-none focus:border-neutral-400 dark:focus:border-neutral-500 transition-colors" />
-
+
- + {filtered_tracks.length}/{playlist_tracks.length}
{#each genres as genre} {/each} @@ -320,27 +320,27 @@
{#if filtered_tracks.length > 0} -
    +
      {#each filtered_tracks as track}
    • -

      {track.name}

      +

      {track.name}

      {track.artist ?? 'Unknown Artist'} {#if track.albumName} - · {track.albumName} + · {track.albumName} {/if}

      {#if track.genre} - {track.genre} + {track.genre} {/if} {#if track.year} - {track.year} + {track.year} {/if}
      -
      +
      {format_duration(track.duration)} {#if track.playCount} {track.playCount} plays @@ -353,7 +353,7 @@ {/each}
    {:else} -
    +
    ⌕

    No tracks match your search or filter

    diff --git a/mobile/vite.config.ts b/mobile/vite.config.ts index f813fa2..fc8352b 100644 --- a/mobile/vite.config.ts +++ b/mobile/vite.config.ts @@ -1,9 +1,8 @@ -import tailwindcss from '@tailwindcss/vite'; -import { defineConfig } from 'vite'; -import { sveltekit } from '@sveltejs/kit/vite'; +import tailwindcss from '@tailwindcss/vite' +import { defineConfig } from 'vite' +import { sveltekit } from '@sveltejs/kit/vite' -// @ts-expect-error process is a nodejs global -const host = process.env.TAURI_DEV_HOST; +const host = process.env.TAURI_DEV_HOST // https://vite.dev/config/ export default defineConfig(async () => ({ @@ -22,7 +21,7 @@ export default defineConfig(async () => ({ fs: { allow: ['./bindings.ts'] }, watch: { // 3. tell Vite to ignore watching `src-tauri` - ignored: ['**/src-tauri/**'] - } - } -})); + ignored: ['**/src-tauri/**'], + }, + }, +}))