mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
hide mediasession setting on desktop non-windows
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import isElectron from 'is-electron';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -7,6 +8,9 @@ import {
|
|||||||
import { usePlaybackSettings, useSettingsStoreActions } from '/@/renderer/store/settings.store';
|
import { usePlaybackSettings, useSettingsStoreActions } from '/@/renderer/store/settings.store';
|
||||||
import { Switch } from '/@/shared/components/switch/switch';
|
import { Switch } from '/@/shared/components/switch/switch';
|
||||||
|
|
||||||
|
const isWindows = window.api.utils.isWindows();
|
||||||
|
const isDesktop = isElectron();
|
||||||
|
|
||||||
export const MediaSessionSettings = () => {
|
export const MediaSessionSettings = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { mediaSession } = usePlaybackSettings();
|
const { mediaSession } = usePlaybackSettings();
|
||||||
@@ -31,6 +35,7 @@ export const MediaSessionSettings = () => {
|
|||||||
context: 'description',
|
context: 'description',
|
||||||
postProcess: 'sentenceCase',
|
postProcess: 'sentenceCase',
|
||||||
}),
|
}),
|
||||||
|
isHidden: isDesktop && !isWindows,
|
||||||
note: t('common.restartRequired', { postProcess: 'sentenceCase' }),
|
note: t('common.restartRequired', { postProcess: 'sentenceCase' }),
|
||||||
title: t('setting.mediaSession', { postProcess: 'sentenceCase' }),
|
title: t('setting.mediaSession', { postProcess: 'sentenceCase' }),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user