diff options
Diffstat (limited to 'gui/src/renderer')
| -rw-r--r-- | gui/src/renderer/app.tsx | 1 | ||||
| -rw-r--r-- | gui/src/renderer/components/Settings.tsx | 1 | ||||
| -rw-r--r-- | gui/src/renderer/redux/userinterface/actions.ts | 16 | ||||
| -rw-r--r-- | gui/src/renderer/redux/userinterface/reducers.ts | 8 |
4 files changed, 25 insertions, 1 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index 95f7e3d0cf..3aa73698dc 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -245,6 +245,7 @@ export default class AppRenderer { this.storeAutoStart(initialState.autoStart); this.setChangelog(initialState.changelog, initialState.forceShowChanges); this.setCurrentApiAccessMethod(initialState.currentApiAccessMethod); + this.reduxActions.userInterface.setIsMacOs13OrNewer(initialState.isMacOs13OrNewer); if (initialState.macOsScrollbarVisibility !== undefined) { this.reduxActions.userInterface.setMacOsScrollbarVisibility( diff --git a/gui/src/renderer/components/Settings.tsx b/gui/src/renderer/components/Settings.tsx index 8f68a1c462..e188e11ade 100644 --- a/gui/src/renderer/components/Settings.tsx +++ b/gui/src/renderer/components/Settings.tsx @@ -26,6 +26,7 @@ export default function Support() { const loginState = useSelector((state) => state.account.status); const connectedToDaemon = useSelector((state) => state.userInterface.connectedToDaemon); + const isMacOs13OrNewer = useSelector((state) => state.userInterface.isMacOs13OrNewer); const showSubSettings = loginState.type === 'ok' && connectedToDaemon; diff --git a/gui/src/renderer/redux/userinterface/actions.ts b/gui/src/renderer/redux/userinterface/actions.ts index cc43990980..238835318e 100644 --- a/gui/src/renderer/redux/userinterface/actions.ts +++ b/gui/src/renderer/redux/userinterface/actions.ts @@ -56,6 +56,11 @@ export interface ISetSelectLocationView { selectLocationView: LocationType; } +export interface ISetIsMacOs13OrNewer { + type: 'SET_IS_MACOS13_OR_NEWER'; + isMacOs13OrNewer: boolean; +} + export type UserInterfaceAction = | IUpdateLocaleAction | IUpdateWindowArrowPositionAction @@ -67,7 +72,8 @@ export type UserInterfaceAction = | ISetChangelog | ISetForceShowChanges | ISetIsPerformingPostUpgrade - | ISetSelectLocationView; + | ISetSelectLocationView + | ISetIsMacOs13OrNewer; function updateLocale(locale: string): IUpdateLocaleAction { return { @@ -147,6 +153,13 @@ function setSelectLocationView(selectLocationView: LocationType): ISetSelectLoca }; } +function setIsMacOs13OrNewer(isMacOs13OrNewer: boolean): ISetIsMacOs13OrNewer { + return { + type: 'SET_IS_MACOS13_OR_NEWER', + isMacOs13OrNewer, + }; +} + export default { updateLocale, updateWindowArrowPosition, @@ -159,4 +172,5 @@ export default { setForceShowChanges, setIsPerformingPostUpgrade, setSelectLocationView, + setIsMacOs13OrNewer, }; diff --git a/gui/src/renderer/redux/userinterface/reducers.ts b/gui/src/renderer/redux/userinterface/reducers.ts index 622b7814aa..89427e9b06 100644 --- a/gui/src/renderer/redux/userinterface/reducers.ts +++ b/gui/src/renderer/redux/userinterface/reducers.ts @@ -15,6 +15,7 @@ export interface IUserInterfaceReduxState { forceShowChanges: boolean; isPerformingPostUpgrade: boolean; selectLocationView: LocationType; + isMacOs13OrNewer: boolean; } const initialState: IUserInterfaceReduxState = { @@ -28,6 +29,7 @@ const initialState: IUserInterfaceReduxState = { forceShowChanges: false, isPerformingPostUpgrade: false, selectLocationView: LocationType.exit, + isMacOs13OrNewer: true, }; export default function ( @@ -80,6 +82,12 @@ export default function ( selectLocationView: action.selectLocationView, }; + case 'SET_IS_MACOS13_OR_NEWER': + return { + ...state, + isMacOs13OrNewer: action.isMacOs13OrNewer, + }; + default: return state; } |
