mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-17 06:00:20 +02:00
allow disabling web audio
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { SelectItem } from '@mantine/core';
|
||||
import { SelectItem, Switch } from '@mantine/core';
|
||||
import isElectron from 'is-electron';
|
||||
import { Select, Slider, toast } from '/@/renderer/components';
|
||||
import {
|
||||
@@ -132,6 +132,27 @@ export const AudioSettings = ({ hasFancyAudio }: { hasFancyAudio: boolean }) =>
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
defaultChecked={settings.webAudio}
|
||||
onChange={(e) => {
|
||||
setSettings({
|
||||
playback: { ...settings, webAudio: e.currentTarget.checked },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.webAudio', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: settings.type !== PlaybackType.WEB,
|
||||
note: t('common.restartRequired', { postProcess: 'sentenceCase' }),
|
||||
title: t('setting.webAudio', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Slider
|
||||
|
||||
Reference in New Issue
Block a user