mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Add volume wheel scroll & new slider component
This commit is contained in:
parent
01fdd25406
commit
4cbc28a087
8 changed files with 178 additions and 103 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Divider, Stack } from '@mantine/core';
|
||||
import { Select, Switch } from '/@/renderer/components';
|
||||
import { Select, Slider, Switch } from '/@/renderer/components';
|
||||
import isElectron from 'is-electron';
|
||||
import { SettingsOptions } from '/@/renderer/features/settings/components/settings-option';
|
||||
import { THEME_DATA } from '/@/renderer/hooks';
|
||||
|
|
@ -195,6 +195,31 @@ export const GeneralTab = () => {
|
|||
},
|
||||
];
|
||||
|
||||
const miscOptions = [
|
||||
{
|
||||
control: (
|
||||
<Slider
|
||||
defaultValue={settings.volumeWheelStep}
|
||||
max={20}
|
||||
min={1}
|
||||
w={100}
|
||||
onChangeEnd={(e) => {
|
||||
setSettings({
|
||||
general: {
|
||||
...settings,
|
||||
volumeWheelStep: e,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description:
|
||||
'The amount of volume to change when scrolling the mouse wheel on the volume slider',
|
||||
isHidden: false,
|
||||
title: 'Volume wheel step',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Stack spacing="md">
|
||||
{options
|
||||
|
|
@ -223,6 +248,15 @@ export const GeneralTab = () => {
|
|||
{...option}
|
||||
/>
|
||||
))}
|
||||
<Divider />
|
||||
{miscOptions
|
||||
.filter((o) => !o.isHidden)
|
||||
.map((option) => (
|
||||
<SettingsOptions
|
||||
key={`general-${option.title}`}
|
||||
{...option}
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue