discord rpc changes (#958)

This commit is contained in:
Benjamin 2025-06-21 14:38:06 -05:00 committed by GitHub
parent ae41fe99bb
commit bea55d48a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 113 additions and 188 deletions

View file

@ -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