mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
feat: discord presence display type
This commit is contained in:
parent
7ff74b8d5e
commit
76770de7d8
4 changed files with 69 additions and 2 deletions
|
|
@ -6,10 +6,12 @@ import {
|
|||
SettingsSection,
|
||||
} from '/@/renderer/features/settings/components/settings-section';
|
||||
import {
|
||||
DiscordDisplayType,
|
||||
useDiscordSetttings,
|
||||
useGeneralSettings,
|
||||
useSettingsStoreActions,
|
||||
} from '/@/renderer/store';
|
||||
import { Select } from '/@/shared/components/select/select';
|
||||
import { Switch } from '/@/shared/components/switch/switch';
|
||||
import { TextInput } from '/@/shared/components/text-input/text-input';
|
||||
|
||||
|
|
@ -120,6 +122,50 @@ export const DiscordSettings = () => {
|
|||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Select
|
||||
aria-label={t('setting.discordDisplayType')}
|
||||
clearable={false}
|
||||
data={[
|
||||
{ label: 'Feishin', value: DiscordDisplayType.FEISHIN },
|
||||
{
|
||||
label: t('setting.discordDisplayType', {
|
||||
context: 'songname',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
value: DiscordDisplayType.SONG_NAME,
|
||||
},
|
||||
{
|
||||
label: t('setting.discordDisplayType_artistname', {
|
||||
context: 'artistname',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
value: DiscordDisplayType.ARTIST_NAME,
|
||||
},
|
||||
]}
|
||||
defaultValue={settings.displayType}
|
||||
onChange={(e) => {
|
||||
if (!e) return;
|
||||
setSettings({
|
||||
discord: {
|
||||
...settings,
|
||||
displayType: e as DiscordDisplayType,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.discordDisplayType', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.discordDisplayType', {
|
||||
discord: 'Discord',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue