feat(desktop): gate traffic-lights behind window-controls style setting
Add a Window controls Style setting ('classic' | 'traffic-lights',
default 'classic') next to the existing Position setting. All four
position×style combinations render correctly with side-driven order
(close,min,max left; min,max,close right).
- Restore deleted left-classic branch (h-8 w-8 rounded-md buttons)
- Add right-traffic-lights branch (cluster with ml-1 container)
- Branch on style instead of side in WindowsWindowControls
- Store field + setter with 'classic' default (no migration needed;
Zustand persist shallow-merges over initial state)
- Settings UI: SettingsTwoColumn with Position chips + Style dropdown
- Sanitize on client (persistence.ts) and server (settings-helpers.js)
- 10 locale dictionaries updated (add-only, no existing keys changed)
- Traffic-light button spacing 8px→10px edge-to-edge
- Delete dead DESKTOP_WINDOW_CONTROLS_WIDTH_PX constant
This commit is contained in:
@@ -2254,7 +2254,7 @@ export const useUIStore = create<UIStore>()(
|
||||
{
|
||||
name: 'ui-store',
|
||||
storage: createDeferredSafeJSONStorage(),
|
||||
version: 13,
|
||||
version: 12,
|
||||
migrate: (persistedState, version) => {
|
||||
if (!persistedState || typeof persistedState !== 'object') {
|
||||
return persistedState;
|
||||
@@ -2268,15 +2268,6 @@ export const useUIStore = create<UIStore>()(
|
||||
}
|
||||
}
|
||||
|
||||
// v12 -> v13: introduce window-controls style. Existing users keep
|
||||
// their persisted position; style defaults to "classic" so no one
|
||||
// suddenly sees traffic lights on upgrade.
|
||||
if (version < 13) {
|
||||
if (state.desktopWindowControlsStyle !== 'classic' && state.desktopWindowControlsStyle !== 'traffic-lights') {
|
||||
state.desktopWindowControlsStyle = 'classic';
|
||||
}
|
||||
}
|
||||
|
||||
// v10 -> v11: move the previous terminal font default forward.
|
||||
if (version < 11 && state.terminalFontSize === 13) {
|
||||
state.terminalFontSize = 14;
|
||||
|
||||
Reference in New Issue
Block a user