mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
fix album art res 0 and allow resizing volume bar
This commit is contained in:
parent
37b0407188
commit
028ccfb1cd
4 changed files with 35 additions and 5 deletions
|
|
@ -71,14 +71,15 @@ export const ControlSettings = () => {
|
|||
<NumberInput
|
||||
defaultValue={settings.albumArtRes || undefined}
|
||||
max={2500}
|
||||
min={175}
|
||||
placeholder="0"
|
||||
rightSection="px"
|
||||
value={settings.albumArtRes ?? 0}
|
||||
width={75}
|
||||
onBlur={(e) => {
|
||||
const newVal = e.currentTarget.value
|
||||
? Math.min(Math.max(Number(e.currentTarget.value), 175), 2500)
|
||||
: null;
|
||||
const newVal =
|
||||
e.currentTarget.value !== '0'
|
||||
? Math.min(Math.max(Number(e.currentTarget.value), 175), 2500)
|
||||
: null;
|
||||
setSettings({ general: { ...settings, albumArtRes: newVal } });
|
||||
}}
|
||||
/>
|
||||
|
|
@ -322,6 +323,29 @@ export const ControlSettings = () => {
|
|||
isHidden: false,
|
||||
title: t('setting.volumeWheelStep', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<NumberInput
|
||||
defaultValue={settings.volumeWidth}
|
||||
max={180}
|
||||
min={30}
|
||||
placeholder="0"
|
||||
rightSection="px"
|
||||
width={75}
|
||||
onBlur={(e) => {
|
||||
setSettings({
|
||||
general: { ...settings, volumeWidth: Number(e.currentTarget.value) },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.volumeWidth', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: false,
|
||||
title: t('setting.volumeWidth', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue