mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
cfc9419de7
* feat(themes): sidebar notice when an installed theme has an update Adds a dismissible sidebar pill (sibling of the What's New banner) shown while an installed community theme has a newer version in the store. Clicking opens Settings -> Themes; dismiss hides it until a new update changes the set. The theme registry is now refreshed from source once per app launch instead of only when the Theme Store tab is opened, so newly published themes and updates surface without a manual refresh -- and feed this notice. * docs: add CHANGELOG entry for PR #1041 * feat(themes): in-place update control on installed theme cards Themes with a newer version in the store now show a centered update icon on their card in Settings -> Themes; clicking it fetches and reinstalls in place. Extracts the shared installThemeFromRegistry helper (fetch -> validate -> install) used by both the store list and the card control, and surfaces the full registry entry from useThemeUpdates so the card can update directly.
59 lines
2.4 KiB
TypeScript
59 lines
2.4 KiB
TypeScript
import type { AuthState } from './authStoreTypes';
|
|
import { clampLibraryGridMaxColumns } from './authStoreHelpers';
|
|
|
|
type SetState = (
|
|
partial: Partial<AuthState> | ((state: AuthState) => Partial<AuthState>),
|
|
) => void;
|
|
|
|
/**
|
|
* Visual / chrome settings. Pure pass-through setters: tray, titlebar,
|
|
* sidebar toggles, fullscreen lyrics rendering options, changelog
|
|
* banner. No side effects.
|
|
*/
|
|
export function createUiAppearanceActions(set: SetState): Pick<
|
|
AuthState,
|
|
| 'setShowArtistImages'
|
|
| 'setLibraryGridMaxColumns'
|
|
| 'setShowTrayIcon'
|
|
| 'setMinimizeToTray'
|
|
| 'setClockFormat'
|
|
| 'setShowOrbitTrigger'
|
|
| 'setUseCustomTitlebar'
|
|
| 'setPreloadMiniPlayer'
|
|
| 'setLinuxWebkitKineticScroll'
|
|
| 'setLinuxWaylandTextRenderProfile'
|
|
| 'setLinuxWebkitInputForceRepaint'
|
|
| 'setSeekbarStyle'
|
|
| 'setQueueNowPlayingCollapsed'
|
|
| 'setQueueDurationDisplayMode'
|
|
| 'setQueueDisplayMode'
|
|
| 'setSidebarLyricsStyle'
|
|
| 'setShowChangelogOnUpdate'
|
|
| 'setLastSeenChangelogVersion'
|
|
| 'setLastDismissedThemeUpdateSig'
|
|
| 'setAdvancedSettingsEnabled'
|
|
> {
|
|
return {
|
|
setShowArtistImages: (v) => set({ showArtistImages: v }),
|
|
setLibraryGridMaxColumns: (v) => set({ libraryGridMaxColumns: clampLibraryGridMaxColumns(v) }),
|
|
setShowTrayIcon: (v) => set({ showTrayIcon: v }),
|
|
setMinimizeToTray: (v) => set({ minimizeToTray: v }),
|
|
setClockFormat: (v) => set({ clockFormat: v }),
|
|
setShowOrbitTrigger: (v) => set({ showOrbitTrigger: v }),
|
|
setUseCustomTitlebar: (v) => set({ useCustomTitlebar: v }),
|
|
setPreloadMiniPlayer: (v) => set({ preloadMiniPlayer: v }),
|
|
setLinuxWebkitKineticScroll: (v) => set({ linuxWebkitKineticScroll: v }),
|
|
setLinuxWaylandTextRenderProfile: (v) => set({ linuxWaylandTextRenderProfile: v }),
|
|
setLinuxWebkitInputForceRepaint: (v) => set({ linuxWebkitInputForceRepaint: v }),
|
|
setSeekbarStyle: (v) => set({ seekbarStyle: v }),
|
|
setQueueNowPlayingCollapsed: (v) => set({ queueNowPlayingCollapsed: v }),
|
|
setQueueDurationDisplayMode: (v) => set({ queueDurationDisplayMode: v }),
|
|
setQueueDisplayMode: (v) => set({ queueDisplayMode: v }),
|
|
setSidebarLyricsStyle: (v) => set({ sidebarLyricsStyle: v }),
|
|
setShowChangelogOnUpdate: (v) => set({ showChangelogOnUpdate: v }),
|
|
setLastSeenChangelogVersion: (v) => set({ lastSeenChangelogVersion: v }),
|
|
setLastDismissedThemeUpdateSig: (v) => set({ lastDismissedThemeUpdateSig: v }),
|
|
setAdvancedSettingsEnabled: (v) => set({ advancedSettingsEnabled: v }),
|
|
};
|
|
}
|