chore(format): run prettier over src/ and scripts/
Formatting was configured but never enforced: `bun run format:check` reported 199 unformatted files and ran in no workflow and in no git hook, so .prettierrc (printWidth 100, trailing commas) described an intention rather than the tree. This is the one-time sweep that makes the check gateable. Whitespace and token-reflow only -- no behavioural change: `bun run check` reports 0 errors and all 1053 frontend tests pass before and after. Kept out of every other commit on purpose. A 199-file diff mixed with real changes is unreviewable, and the next commit turns format:check into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
@@ -26,10 +26,7 @@
|
||||
import PendingSyncList from "$lib/components/sync/PendingSyncList.svelte";
|
||||
import { library, viewMode } from "$lib/stores/library";
|
||||
import { auth } from "$lib/stores/auth";
|
||||
import {
|
||||
isNetworkDetectionSupported,
|
||||
reportNetworkState,
|
||||
} from "$lib/services/networkType";
|
||||
import { isNetworkDetectionSupported, reportNetworkState } from "$lib/services/networkType";
|
||||
import { experimentalNativeVideo } from "$lib/stores/nativeVideo";
|
||||
import { getPlaybackCapabilities } from "$lib/services/playbackCapabilities";
|
||||
import { createLogger } from "$lib/utils/logger";
|
||||
@@ -442,9 +439,7 @@
|
||||
<div id="display" class="scroll-mt-4 bg-[var(--color-surface)] rounded-lg p-6">
|
||||
<div class="mb-4">
|
||||
<h2 class="text-xl font-semibold text-white">Display</h2>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
How your library and collections are laid out
|
||||
</p>
|
||||
<p class="text-sm text-gray-400 mt-1">How your library and collections are laid out</p>
|
||||
</div>
|
||||
<p class="text-sm font-medium text-gray-300 mb-3">Layout</p>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
@@ -486,10 +481,9 @@
|
||||
<div class="mb-4">
|
||||
<h2 class="text-xl font-semibold text-white">Hidden Folders</h2>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Folders to leave out of music browsing and search. Useful when a
|
||||
music library also holds podcasts or audiobooks. Hidden folders can
|
||||
still be opened from a direct link, and anything already playing or
|
||||
downloaded is unaffected.
|
||||
Folders to leave out of music browsing and search. Useful when a music library also
|
||||
holds podcasts or audiobooks. Hidden folders can still be opened from a direct link, and
|
||||
anything already playing or downloaded is unaffected.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -497,8 +491,7 @@
|
||||
<p class="text-sm text-gray-400">Loading folders...</p>
|
||||
{:else if exclusionCandidates.length === 0}
|
||||
<p class="text-sm text-gray-400">
|
||||
No music folders to choose from. Connect to your server to pick
|
||||
folders to hide.
|
||||
No music folders to choose from. Connect to your server to pick folders to hide.
|
||||
</p>
|
||||
{:else}
|
||||
<div class="space-y-2">
|
||||
@@ -506,7 +499,7 @@
|
||||
<button
|
||||
onclick={() => toggleExcludedItem(candidate.id)}
|
||||
class="w-full flex items-center justify-between gap-3 py-3 px-4 rounded-lg text-left transition-all {excludedIds.has(
|
||||
candidate.id
|
||||
candidate.id,
|
||||
)
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
@@ -515,9 +508,7 @@
|
||||
<span class="min-w-0">
|
||||
<span class="block font-semibold truncate">{candidate.name}</span>
|
||||
<span class="block text-xs opacity-75 truncate">
|
||||
{candidate.isLibrary
|
||||
? "Whole library"
|
||||
: `In ${candidate.libraryName}`}
|
||||
{candidate.isLibrary ? "Whole library" : `In ${candidate.libraryName}`}
|
||||
</span>
|
||||
</span>
|
||||
<span class="text-xs font-semibold uppercase tracking-wide shrink-0">
|
||||
@@ -527,8 +518,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-3">
|
||||
Changes apply to listings loaded from now on; reopen a page to see
|
||||
them take effect.
|
||||
Changes apply to listings loaded from now on; reopen a page to see them take effect.
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -538,9 +528,7 @@
|
||||
<div class="flex items-start justify-between mb-4">
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold text-white">Crossfade</h2>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Fade between tracks for seamless transitions
|
||||
</p>
|
||||
<p class="text-sm text-gray-400 mt-1">Fade between tracks for seamless transitions</p>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<span class="text-2xl font-bold text-[var(--color-jellyfin)]">
|
||||
@@ -569,9 +557,7 @@
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold text-white">Gapless Playback</h2>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Eliminate silence between tracks in albums
|
||||
</p>
|
||||
<p class="text-sm text-gray-400 mt-1">Eliminate silence between tracks in albums</p>
|
||||
</div>
|
||||
<button
|
||||
onclick={handleGaplessToggle}
|
||||
@@ -619,8 +605,7 @@
|
||||
<div class="grid grid-cols-3 gap-3">
|
||||
<button
|
||||
onclick={() => handleVolumeLevelChange("loud")}
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel ===
|
||||
'loud'
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel === 'loud'
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
>
|
||||
@@ -629,8 +614,7 @@
|
||||
</button>
|
||||
<button
|
||||
onclick={() => handleVolumeLevelChange("normal")}
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel ===
|
||||
'normal'
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel === 'normal'
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
>
|
||||
@@ -639,8 +623,7 @@
|
||||
</button>
|
||||
<button
|
||||
onclick={() => handleVolumeLevelChange("quiet")}
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel ===
|
||||
'quiet'
|
||||
class="py-3 px-4 rounded-lg transition-all {settings.volumeLevel === 'quiet'
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
>
|
||||
@@ -684,8 +667,7 @@
|
||||
{#each eqPresets as [name, gains] (name)}
|
||||
<button
|
||||
onclick={() => handleEqPreset(gains)}
|
||||
class="px-3 py-1.5 rounded-full text-sm transition-all {activeEqPreset ===
|
||||
name
|
||||
class="px-3 py-1.5 rounded-full text-sm transition-all {activeEqPreset === name
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
>
|
||||
@@ -803,8 +785,8 @@
|
||||
onclick={() => handleEpisodeLimitChange(option.value)}
|
||||
class="py-3 px-3 rounded-lg transition-all text-sm
|
||||
{videoSettings.autoPlayMaxEpisodes === option.value
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
>
|
||||
<div class="font-semibold">{option.label}</div>
|
||||
</button>
|
||||
@@ -820,10 +802,10 @@
|
||||
<div class="bg-[var(--color-surface)] rounded-lg p-6 mt-4">
|
||||
<h3 class="text-xl font-semibold text-white">Streaming Quality</h3>
|
||||
<p class="text-sm text-gray-400 mt-1 mb-4">
|
||||
Limit how much bandwidth video streams may use. Lower settings ask the
|
||||
server to transcode before sending, which saves data on metered or slow
|
||||
connections at the cost of picture quality. You can also change this for
|
||||
a single video from the player's quality menu.
|
||||
Limit how much bandwidth video streams may use. Lower settings ask the server to
|
||||
transcode before sending, which saves data on metered or slow connections at the cost of
|
||||
picture quality. You can also change this for a single video from the player's quality
|
||||
menu.
|
||||
</p>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-2">
|
||||
{#each streamingQualities as [quality, label, detail]}
|
||||
@@ -831,8 +813,8 @@
|
||||
onclick={() => handleStreamingQualityChange(quality)}
|
||||
class="py-3 px-3 rounded-lg transition-all text-left
|
||||
{videoSettings.streamingQuality === quality
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
? 'bg-[var(--color-jellyfin)] text-white'
|
||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'}"
|
||||
aria-pressed={videoSettings.streamingQuality === quality}
|
||||
>
|
||||
<div class="font-semibold text-sm">{label}</div>
|
||||
@@ -841,8 +823,8 @@
|
||||
{/each}
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-3">
|
||||
Applies to videos started from now on; a video already playing keeps the
|
||||
quality it started at.
|
||||
Applies to videos started from now on; a video already playing keeps the quality it
|
||||
started at.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -861,11 +843,10 @@
|
||||
</span>
|
||||
</h3>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Decode video with the device's hardware decoder instead of the
|
||||
built-in web player, for better performance and battery life,
|
||||
and so picture-in-picture shows the video rather than the app.
|
||||
On by default. Turn it off to fall back to the built-in web
|
||||
player if a video misbehaves.
|
||||
Decode video with the device's hardware decoder instead of the built-in web
|
||||
player, for better performance and battery life, and so picture-in-picture shows
|
||||
the video rather than the app. On by default. Turn it off to fall back to the
|
||||
built-in web player if a video misbehaves.
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
@@ -882,9 +863,7 @@
|
||||
></span>
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-3">
|
||||
Takes effect the next time you start a video.
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 mt-3">Takes effect the next time you start a video.</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -896,8 +875,8 @@
|
||||
<div class="bg-[var(--color-surface)] rounded-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-white mb-1">Result Group Order</h3>
|
||||
<p class="text-sm text-gray-400 mb-4">
|
||||
Drag or use the arrows to choose the order search result groups appear in.
|
||||
Empty groups are hidden automatically.
|
||||
Drag or use the arrows to choose the order search result groups appear in. Empty groups
|
||||
are hidden automatically.
|
||||
</p>
|
||||
<SearchGroupOrderList />
|
||||
</div>
|
||||
@@ -928,7 +907,9 @@
|
||||
<span class="text-sm text-gray-400">Loading...</span>
|
||||
{:else if cacheStats}
|
||||
<span class="text-sm text-gray-300">
|
||||
{formatBytes(cacheStats.totalSizeBytes)} / {cacheStats.limitBytes === 0 ? "Unlimited" : formatBytes(cacheStats.limitBytes)}
|
||||
{formatBytes(cacheStats.totalSizeBytes)} / {cacheStats.limitBytes === 0
|
||||
? "Unlimited"
|
||||
: formatBytes(cacheStats.limitBytes)}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -937,7 +918,11 @@
|
||||
<!-- Progress bar -->
|
||||
<div class="w-full bg-gray-700 rounded-full h-3 mb-2">
|
||||
<div
|
||||
class="h-3 rounded-full transition-all duration-300 {getCacheUsagePercent() > 90 ? 'bg-red-500' : getCacheUsagePercent() > 70 ? 'bg-yellow-500' : 'bg-[var(--color-jellyfin)]'}"
|
||||
class="h-3 rounded-full transition-all duration-300 {getCacheUsagePercent() > 90
|
||||
? 'bg-red-500'
|
||||
: getCacheUsagePercent() > 70
|
||||
? 'bg-yellow-500'
|
||||
: 'bg-[var(--color-jellyfin)]'}"
|
||||
style="width: {getCacheUsagePercent()}%"
|
||||
></div>
|
||||
</div>
|
||||
@@ -999,9 +984,7 @@
|
||||
<div class="bg-[var(--color-surface)] rounded-lg p-6 mb-4">
|
||||
<div class="mb-4">
|
||||
<h3 class="text-xl font-semibold text-white">Storage Limit</h3>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Maximum storage for offline downloads
|
||||
</p>
|
||||
<p class="text-sm text-gray-400 mt-1">Maximum storage for offline downloads</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-3">
|
||||
<button
|
||||
@@ -1060,8 +1043,7 @@
|
||||
<div>
|
||||
<h3 class="text-xl font-semibold text-white">Queue Pre-caching</h3>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
Download the next {cacheConfig.queuePrecacheCount} tracks in the queue
|
||||
automatically
|
||||
Download the next {cacheConfig.queuePrecacheCount} tracks in the queue automatically
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
@@ -1088,11 +1070,10 @@
|
||||
<h3 class="text-xl font-semibold text-white">WiFi Only</h3>
|
||||
<p class="text-sm text-gray-400 mt-1">
|
||||
{#if networkDetectionSupported}
|
||||
Hold downloads unless on an unmetered network. Cellular and
|
||||
metered hotspots are excluded; WiFi and Ethernet are allowed.
|
||||
Hold downloads unless on an unmetered network. Cellular and metered hotspots are
|
||||
excluded; WiFi and Ethernet are allowed.
|
||||
{:else}
|
||||
Only available on Android — this device has no metered
|
||||
connection to detect.
|
||||
Only available on Android — this device has no metered connection to detect.
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
@@ -1100,9 +1081,7 @@
|
||||
onclick={handleWifiOnlyToggle}
|
||||
class="relative inline-flex h-8 w-14 items-center rounded-full transition-colors {cacheConfig.wifiOnly
|
||||
? 'bg-[var(--color-jellyfin)]'
|
||||
: 'bg-gray-600'} {networkDetectionSupported
|
||||
? ''
|
||||
: 'opacity-50 cursor-not-allowed'}"
|
||||
: 'bg-gray-600'} {networkDetectionSupported ? '' : 'opacity-50 cursor-not-allowed'}"
|
||||
aria-label="Toggle WiFi only downloads"
|
||||
aria-pressed={cacheConfig.wifiOnly}
|
||||
disabled={!networkDetectionSupported}
|
||||
@@ -1135,16 +1114,15 @@
|
||||
<p class="font-semibold mb-1">About these settings:</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-blue-200">
|
||||
<li>
|
||||
<strong>Crossfade</strong> smoothly blends the end of one track with the
|
||||
beginning of the next
|
||||
<strong>Crossfade</strong> smoothly blends the end of one track with the beginning of
|
||||
the next
|
||||
</li>
|
||||
<li>
|
||||
<strong>Gapless</strong> removes silence between tracks for continuous
|
||||
album playback
|
||||
<strong>Gapless</strong> removes silence between tracks for continuous album playback
|
||||
</li>
|
||||
<li>
|
||||
<strong>Normalization</strong> evens out loudness between tracks
|
||||
in real time, toward your selected level
|
||||
<strong>Normalization</strong> evens out loudness between tracks in real time, toward
|
||||
your selected level
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user