mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
discord rpc changes (#958)
This commit is contained in:
parent
ae41fe99bb
commit
bea55d48a8
3 changed files with 113 additions and 188 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import isElectron from 'is-electron';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { NumberInput, Switch, TextInput } from '/@/renderer/components';
|
||||
import { Switch, TextInput } from '/@/renderer/components';
|
||||
import {
|
||||
SettingOption,
|
||||
SettingsSection,
|
||||
|
|
@ -73,58 +73,6 @@ export const DiscordSettings = () => {
|
|||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<NumberInput
|
||||
onChange={(e) => {
|
||||
let value = e ? Number(e) : 0;
|
||||
if (value < 15) {
|
||||
value = 15;
|
||||
}
|
||||
|
||||
setSettings({
|
||||
discord: {
|
||||
...settings,
|
||||
updateInterval: value,
|
||||
},
|
||||
});
|
||||
}}
|
||||
value={settings.updateInterval}
|
||||
/>
|
||||
),
|
||||
description: t('setting.discordUpdateInterval', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.discordUpdateInterval', {
|
||||
discord: 'Discord',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
checked={settings.enableIdle}
|
||||
onChange={(e) => {
|
||||
setSettings({
|
||||
discord: {
|
||||
...settings,
|
||||
enableIdle: e.currentTarget.checked,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.discordIdleStatus', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.discordIdleStatus', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue