mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-16 00:14:23 +02:00
Hide electron-only settings
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Divider, Stack } from '@mantine/core';
|
import { Divider, Stack } from '@mantine/core';
|
||||||
|
import isElectron from 'is-electron';
|
||||||
import { Switch, Select } from '@/renderer/components';
|
import { Switch, Select } from '@/renderer/components';
|
||||||
import { SettingsOptions } from '@/renderer/features/settings/components/settings-option';
|
import { SettingsOptions } from '@/renderer/features/settings/components/settings-option';
|
||||||
import { THEME_DATA } from '@/renderer/hooks';
|
import { THEME_DATA } from '@/renderer/hooks';
|
||||||
@@ -41,7 +42,7 @@ export const GeneralTab = () => {
|
|||||||
<Select disabled data={['Windows', 'macOS']} defaultValue="Windows" />
|
<Select disabled data={['Windows', 'macOS']} defaultValue="Windows" />
|
||||||
),
|
),
|
||||||
description: 'Adjust the style of the titlebar',
|
description: 'Adjust the style of the titlebar',
|
||||||
isHidden: false,
|
isHidden: !isElectron(),
|
||||||
title: 'Titlebar style',
|
title: 'Titlebar style',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -172,9 +173,11 @@ export const GeneralTab = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack spacing="xl">
|
<Stack spacing="xl">
|
||||||
{options.map((option) => (
|
{options
|
||||||
<SettingsOptions key={`general-${option.title}`} {...option} />
|
.filter((o) => !o.isHidden)
|
||||||
))}
|
.map((option) => (
|
||||||
|
<SettingsOptions key={`general-${option.title}`} {...option} />
|
||||||
|
))}
|
||||||
<Divider />
|
<Divider />
|
||||||
{themeOptions
|
{themeOptions
|
||||||
.filter((o) => !o.isHidden)
|
.filter((o) => !o.isHidden)
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ export const PlaybackTab = () => {
|
|||||||
),
|
),
|
||||||
description:
|
description:
|
||||||
'Enable or disable the usage of your system media hotkeys to control the audio player (desktop only)',
|
'Enable or disable the usage of your system media hotkeys to control the audio player (desktop only)',
|
||||||
isHidden: false,
|
isHidden: !isElectron(),
|
||||||
title: 'Global media hotkeys',
|
title: 'Global media hotkeys',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user