Skip to content

Commit 200f8a9

Browse files
committed
refactor: update settings components for Tauri environment
- Update SystemSettings for Tauri compatibility - Update TraySettings for Tauri tray API
1 parent 20d3094 commit 200f8a9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/components/settings/SystemSettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ export const SystemSettings: FC = () => {
166166
tooltip={
167167
<Text>Launch {APPLICATION.NAME} automatically at startup.</Text>
168168
}
169-
visible={!window.gitify.platform.isLinux()}
169+
visible={
170+
typeof window !== 'undefined' && window.gitify !== undefined
171+
? !window.gitify.platform.isLinux()
172+
: true
173+
}
170174
/>
171175
</Stack>
172176
</fieldset>

src/components/settings/TraySettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ export const TraySettings: FC = () => {
3030
for a quick glance at unread activity.
3131
</Text>
3232
}
33-
visible={window.gitify.platform.isMacOS()}
33+
visible={
34+
typeof window !== 'undefined' && window.gitify !== undefined
35+
? window.gitify.platform.isMacOS()
36+
: true
37+
}
3438
/>
3539

3640
<Checkbox

0 commit comments

Comments
 (0)