Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcooper committed Aug 10, 2023
1 parent ba4a043 commit a7efe83
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion client/src/main/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
<div class="flex items-center gap-3">
{#if $config.UI_MODES.includes(0) && $userConfig.uiMode >= 1}
<button class="btn btn-secondary" on:click={() => ($userConfig.uiMode = 0)}>← Back to simple view</button>
<button class="btn btn-accent" on:click={() => ($userConfig.uiMode = 0)}>← Back to simple view</button>
{/if}
<button
class="btn btn-circle btn-ghost flex items-center justify-center overflow-hidden"
Expand Down
41 changes: 17 additions & 24 deletions client/src/main/SettingsModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,18 @@
<svelte:fragment slot="content">
<div class="grid grid-cols-[max-content_1fr] items-baseline gap-3">
<div class="flex items-center justify-end text-lg font-bold">User Interface mode:</div>
<div class="join join-horizontal">
<div class="tabs-boxed tabs w-max">
{#each ["Simple", "Standard", "Advanced"] as uiMode, index}
{#if $config.UI_MODES.indexOf(index) !== -1}
<button class="btn btn-disabled join-item btn-active">{uiMode}</button>
<button
class="tab"
class:tab-active={index === $userConfig.uiMode}
on:click={() => ($userConfig.uiMode = index)}>{uiMode}</button
>
{/if}
{/each}
</div>

<div class="flex items-center justify-end text-lg font-bold">User Interface mode:</div>
<select class="select select-bordered select-lg" on:change={(e) => ($userConfig.uiMode = +e.target.value)}>
{#each ["Simple", "Standard", "Advanced"] as uiMode, index}
{#if $config.UI_MODES.indexOf(index) !== -1}
<option value={index} selected={index === $userConfig.uiMode}>{uiMode}</option>
{/if}
{/each}
</select>

<div class="flex justify-end text-lg font-bold">Audio Output Device:</div>
<select class="select select-bordered select-lg" on:change={(e) => setSpeaker(e.target.value)}>
{#each $playStatus.speakers as [id, name]}
Expand All @@ -78,26 +73,24 @@
<!-- svelte-ignore missing-declaration -->
{#if IS_DEV}
<div class="flex justify-end text-lg font-bold">Autoplay (dev only):</div>
<div class="flex items-center justify-center gap-4 font-mono text-xl font-bold">
<div class="flex w-max items-center justify-center gap-4 font-mono text-xl font-bold">
<span class:text-error={!$userConfig.autoplay}>OFF</span>
<input type="checkbox" class="toggle toggle-success toggle-lg" bind:checked={$userConfig.autoplay} />
<span class:text-success={$userConfig.autoplay}>ON</span>
</div>
{/if}

{#if $userConfig.uiMode > 0}
<div class="flex justify-end text-lg font-bold">Broadcast Compression:</div>
<div
class="text-lg"
class:text-error={!$config.BROADCAST_COMPRESSION}
class:text-success={$config.BROADCAST_COMPRESSION}
>
{$config.BROADCAST_COMPRESSION ? "Enabled" : "Disabled"}
</div>
<div class="flex justify-end text-lg font-bold">Broadcast Compression:</div>
<div
class="w-max text-lg"
class:text-error={!$config.BROADCAST_COMPRESSION}
class:text-success={$config.BROADCAST_COMPRESSION}
>
{$config.BROADCAST_COMPRESSION ? "Enabled" : "Disabled"}
</div>

<div class="flex justify-end text-lg font-bold">Station Admin:</div>
<a class="link-hover link-primary link text-lg" href={$db.host}>Open in your web browser</a>
{/if}
<div class="flex justify-end text-lg font-bold">Station Admin:</div>
<a class="link-hover link-primary link text-lg" href={$db.host}>Open in your web browser</a>
</div>

<div class="col-span-2">
Expand Down
5 changes: 3 additions & 2 deletions client/src/main/player/List.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="flex flex-1 flex-col overflow-y-auto" id="playlist">
{#each items as item, index (item.generatedId)}
{@const isFirstItem = index === 0}
<div class="flex flex-col gap-2 px-2" out:fade={{ duration: 750 }}>
<div class="flex flex-col gap-2 px-2" out:fade={{ duration: 800 }}>
<div
class="divider mb-0 mt-2"
class:text-secondary={item.type === "stopset"}
Expand All @@ -28,11 +28,12 @@
class:border-base-content={!isFirstItem || (!asset.finished && !asset.active)}
>
<div
class="flex min-h-[5rem] items-center gap-3 overflow-hidden px-3 py-1 text-secondary-content"
class="flex min-h-[5rem] items-center gap-3 overflow-hidden px-3 py-1"
style={asset.finished
? ""
: `background: linear-gradient(to right, hsl(var(--sf)) 0%, hsl(var(--sf)) ${asset.percentDone}%, hsl(var(--s)) ${asset.percentDone}%, hsl(var(--s)) 100%);`}
class:bg-neutral={asset.finished}
class:text-secondary-content={!asset.finished}
class:text-neutral-content={asset.finished}
>
{#if $userConfig.uiMode > 0}
Expand Down

0 comments on commit a7efe83

Please sign in to comment.