Two issues over one bar, because they are one relayout. #42's own findings say so: giving wa-slider a label grows it 6px to 14px and moves the transport, which is #23's subject, so doing them in sequence means measuring the bar twice and throwing the first set away. The bar was `320px 1fr auto`, so the transport sat in the middle of what the metadata and the queue button did not use — its centre was ~140px right of the window's at every width. The outer two tracks are the same expression now, so the middle is centred by construction. The side width is the metadata's, capped at a quarter of the bar, and the cap was measured as a regression before it was a decision: reserving the full `--now-playing-width` on both sides is perfectly centred and takes the seek bar's track from 257px to 61px at 800px, and to 0 at 200% text. The control you drag was paying for the symmetry. With the cap it is 246, which is parity. It is a `min()` rather than a breakpoint because that variable is user state — the metadata has a drag handle — and tying both sides to it is also what keeps dragging meaningful; a plain `1fr … 1fr` centres just as well and silently makes the handle a no-op. The volume moved out of `audio-player` into the bar because the transport column has to hold the transport and nothing else, and it joins the queue button in one cell rather than a second column, since the centring compares columns. It is a slider by default and a popup by setting. The stored flag names the *popup*, which is this config's polarity rule — the zero value has to be the intended answer, so an existing config.toml gets the new default with no migration. Inline, the icon is the mute toggle and is named after that action rather than the state, because with the slider beside it there is nothing to disclose; the component tier now covers both presentations rather than whichever is default. Three nested rules in this block began with a bare element selector, which Chrome 120 relaxed and the phone's Chrome 113 **silently drops** — including the ellipsis on the bar's own title and artist, which has therefore never truncated on the device. They are `&`-prefixed now. Filed as #154 for the class and for a check. `bottom-bar.spec.ts` pins both halves separately on purpose: an uncapped build is perfectly centred and fails only the seek-bar width, so a spec asserting centring alone would have passed the regression above. Both were verified by mutation. Closes #23 Closes #42
300 lines
9.1 KiB
TypeScript
300 lines
9.1 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* Config represents the application configuration.
|
|
* @module
|
|
*/
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as download$0 from "../download/models.js";
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as tracklist$0 from "../tracklist/models.js";
|
|
|
|
/**
|
|
* GetAllowMeteredCatalogDownload reports whether the ~0.6 GB Explore
|
|
* catalog may be fetched on a metered connection.
|
|
*/
|
|
export function GetAllowMeteredCatalogDownload(): $CancellablePromise<boolean> {
|
|
return $Call.ByID(2258585139);
|
|
}
|
|
|
|
/**
|
|
* GetDefaultPage returns the view the app opens to on launch.
|
|
*/
|
|
export function GetDefaultPage(): $CancellablePromise<string> {
|
|
return $Call.ByID(3209119019);
|
|
}
|
|
|
|
/**
|
|
* GetDownloadPreferences returns the configured auto-download
|
|
* guardrails.
|
|
*/
|
|
export function GetDownloadPreferences(): $CancellablePromise<download$0.AutoDownloadPrefs> {
|
|
return $Call.ByID(4104118319);
|
|
}
|
|
|
|
/**
|
|
* GetFavoritesIconStyle returns the configured icon style.
|
|
*/
|
|
export function GetFavoritesIconStyle(): $CancellablePromise<string> {
|
|
return $Call.ByID(3222927230);
|
|
}
|
|
|
|
/**
|
|
* GetFavoritesPlaylistID returns the configured default playlist ID.
|
|
*/
|
|
export function GetFavoritesPlaylistID(): $CancellablePromise<number> {
|
|
return $Call.ByID(4116868495);
|
|
}
|
|
|
|
/**
|
|
* GetLibraryDirectory returns the currently configured library directory path.
|
|
*/
|
|
export function GetLibraryDirectory(): $CancellablePromise<string> {
|
|
return $Call.ByID(2123565657);
|
|
}
|
|
|
|
/**
|
|
* GetPinDefaultPlaylist returns whether the default playlist
|
|
* is pinned to the top of the playlist view.
|
|
*/
|
|
export function GetPinDefaultPlaylist(): $CancellablePromise<boolean> {
|
|
return $Call.ByID(3818283301);
|
|
}
|
|
|
|
/**
|
|
* GetPopupVolume reports whether the bottom bar's volume control is a
|
|
* click-to-open popup rather than an inline slider (#42).
|
|
*/
|
|
export function GetPopupVolume(): $CancellablePromise<boolean> {
|
|
return $Call.ByID(2885777);
|
|
}
|
|
|
|
/**
|
|
* GetQueueFallback returns what plays, if anything, once the queue
|
|
* runs out.
|
|
*/
|
|
export function GetQueueFallback(): $CancellablePromise<string> {
|
|
return $Call.ByID(1504773860);
|
|
}
|
|
|
|
/**
|
|
* GetScanConcurrency returns the configured scan concurrency mode.
|
|
*/
|
|
export function GetScanConcurrency(): $CancellablePromise<string> {
|
|
return $Call.ByID(3233312385);
|
|
}
|
|
|
|
/**
|
|
* GetShortcuts returns the current shortcut bindings map.
|
|
*/
|
|
export function GetShortcuts(): $CancellablePromise<{ [_ in string]?: string } | null> {
|
|
return $Call.ByID(1616717634);
|
|
}
|
|
|
|
/**
|
|
* GetThemeAccentColor returns the configured accent colour.
|
|
*/
|
|
export function GetThemeAccentColor(): $CancellablePromise<string> {
|
|
return $Call.ByID(4264374057);
|
|
}
|
|
|
|
/**
|
|
* GetThemeBackgroundShade returns the configured background shade.
|
|
*/
|
|
export function GetThemeBackgroundShade(): $CancellablePromise<string> {
|
|
return $Call.ByID(578772653);
|
|
}
|
|
|
|
/**
|
|
* GetTrackListColumns returns the configured track-list columns.
|
|
*/
|
|
export function GetTrackListColumns(): $CancellablePromise<tracklist$0.Column[] | null> {
|
|
return $Call.ByID(3426289065);
|
|
}
|
|
|
|
/**
|
|
* GetViewVisibility reports which primary views the sidebar should
|
|
* show, answered for every known view rather than only the ones the
|
|
* config mentions -- so the frontend filters on a value and never has
|
|
* to hold a second copy of the defaults.
|
|
*/
|
|
export function GetViewVisibility(): $CancellablePromise<{ [_ in string]?: boolean } | null> {
|
|
return $Call.ByID(2798108026);
|
|
}
|
|
|
|
/**
|
|
* Load reads and parses the config file from disk.
|
|
*/
|
|
export function Load(): $CancellablePromise<void> {
|
|
return $Call.ByID(2408891113);
|
|
}
|
|
|
|
/**
|
|
* ResetShortcuts resets all shortcuts to defaults.
|
|
*/
|
|
export function ResetShortcuts(): $CancellablePromise<void> {
|
|
return $Call.ByID(3197898083);
|
|
}
|
|
|
|
/**
|
|
* Save writes the config to disk. Refuses to write if the config
|
|
* was never successfully loaded — prevents overwriting user config
|
|
* with defaults during abnormal startup/shutdown sequences.
|
|
*/
|
|
export function Save(): $CancellablePromise<void> {
|
|
return $Call.ByID(1988945736);
|
|
}
|
|
|
|
/**
|
|
* SetAllowMeteredCatalogDownload saves the metered-download permission.
|
|
*
|
|
* There is nothing to validate and nothing to restart: the policy is
|
|
* read at the moment a download would start, so turning it on takes
|
|
* effect on the next attempt rather than needing this launch to be over.
|
|
*/
|
|
export function SetAllowMeteredCatalogDownload(allow: boolean): $CancellablePromise<void> {
|
|
return $Call.ByID(192700351, allow);
|
|
}
|
|
|
|
/**
|
|
* SetDefaultPage validates and saves a new launch page.
|
|
*/
|
|
export function SetDefaultPage(page: string): $CancellablePromise<void> {
|
|
return $Call.ByID(2714957423, page);
|
|
}
|
|
|
|
/**
|
|
* SetDownloadPreferences saves new auto-download guardrails. This only
|
|
* persists them; the download package cannot depend on config (config
|
|
* already depends on download for UserConfig), so making the change
|
|
* live without a restart is the caller's job — the frontend settings
|
|
* save calls this and download.Service.SetPreferences in the same
|
|
* action, and app.go's initDownloadRuntime applies the saved value to
|
|
* the running Manager at startup.
|
|
*/
|
|
export function SetDownloadPreferences(prefs: download$0.AutoDownloadPrefs): $CancellablePromise<void> {
|
|
return $Call.ByID(2655203755, prefs);
|
|
}
|
|
|
|
/**
|
|
* SetFavoritesIconStyle validates and saves a new icon style.
|
|
*/
|
|
export function SetFavoritesIconStyle(style: string): $CancellablePromise<void> {
|
|
return $Call.ByID(812590378, style);
|
|
}
|
|
|
|
/**
|
|
* SetFavoritesPlaylistID saves a new default playlist ID.
|
|
*/
|
|
export function SetFavoritesPlaylistID(id: number): $CancellablePromise<void> {
|
|
return $Call.ByID(2117079163, id);
|
|
}
|
|
|
|
/**
|
|
* SetLibraryDirectory validates and saves a new library directory,
|
|
* then emits the LibraryConfigChanged event so listeners (e.g. the
|
|
* Library scanner) can react.
|
|
*/
|
|
export function SetLibraryDirectory(dir: string): $CancellablePromise<void> {
|
|
return $Call.ByID(1352505021, dir);
|
|
}
|
|
|
|
/**
|
|
* SetPinDefaultPlaylist saves whether the default playlist
|
|
* should be pinned to the top of the playlist view.
|
|
*/
|
|
export function SetPinDefaultPlaylist(pin: boolean): $CancellablePromise<void> {
|
|
return $Call.ByID(372446849, pin);
|
|
}
|
|
|
|
/**
|
|
* SetPopupVolume saves the volume control's presentation.
|
|
*
|
|
* Nothing to validate: both values are legal at every width, and the
|
|
* frontend additionally stands the inline slider down below the phone
|
|
* breakpoint whatever this says, because that is about room rather than
|
|
* about preference.
|
|
*/
|
|
export function SetPopupVolume(popup: boolean): $CancellablePromise<void> {
|
|
return $Call.ByID(1430308453, popup);
|
|
}
|
|
|
|
/**
|
|
* SetQueueFallback validates and saves a new queue-fallback mode.
|
|
*/
|
|
export function SetQueueFallback(mode: string): $CancellablePromise<void> {
|
|
return $Call.ByID(2824429312, mode);
|
|
}
|
|
|
|
/**
|
|
* SetScanConcurrency validates and saves a new scan concurrency
|
|
* mode. The change takes effect on the next scan.
|
|
*/
|
|
export function SetScanConcurrency(mode: string): $CancellablePromise<void> {
|
|
return $Call.ByID(742893445, mode);
|
|
}
|
|
|
|
/**
|
|
* SetShortcut saves a single shortcut binding.
|
|
*/
|
|
export function SetShortcut(action: string, key: string): $CancellablePromise<void> {
|
|
return $Call.ByID(275130705, action, key);
|
|
}
|
|
|
|
/**
|
|
* SetShortcuts saves the entire shortcut bindings map.
|
|
*/
|
|
export function SetShortcuts(bindings: { [_ in string]?: string } | null): $CancellablePromise<void> {
|
|
return $Call.ByID(4073898118, bindings);
|
|
}
|
|
|
|
/**
|
|
* SetThemeAccentColor validates and saves a new accent colour.
|
|
*/
|
|
export function SetThemeAccentColor(color: string): $CancellablePromise<void> {
|
|
return $Call.ByID(3536665861, color);
|
|
}
|
|
|
|
/**
|
|
* SetThemeBackgroundShade validates and saves a new background shade.
|
|
*/
|
|
export function SetThemeBackgroundShade(shade: string): $CancellablePromise<void> {
|
|
return $Call.ByID(2709290065, shade);
|
|
}
|
|
|
|
/**
|
|
* SetTrackListColumns validates and saves a new column layout.
|
|
*/
|
|
export function SetTrackListColumns(columns: tracklist$0.Column[] | null): $CancellablePromise<void> {
|
|
return $Call.ByID(4226159685, columns);
|
|
}
|
|
|
|
/**
|
|
* SetViewVisible shows or hides one primary view.
|
|
*
|
|
* Two refusals, both about a state the user cannot get out of from the
|
|
* UI they would be left with: Settings is never hideable, and the
|
|
* launch page is never hideable while it is the launch page (change it
|
|
* first). Hiding a view does not make it unreachable -- `navigate`
|
|
* still resolves it, which detail views depend on -- it only takes the
|
|
* nav item away.
|
|
*/
|
|
export function SetViewVisible(view: string, visible: boolean): $CancellablePromise<void> {
|
|
return $Call.ByID(1751982648, view, visible);
|
|
}
|
|
|
|
/**
|
|
* Validate returns errors if there is a breaking issue with the config.
|
|
*/
|
|
export function Validate(): $CancellablePromise<void> {
|
|
return $Call.ByID(3087982155);
|
|
}
|