mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-20 09:26:32 +02:00
add setting for lyrics container padding
This commit is contained in:
@@ -51,7 +51,14 @@ export const MobileFullscreenPlayerHeader = memo(
|
||||
const lyricConfig = { ...lyricsSettings, ...displaySettings };
|
||||
|
||||
const handleLyricsSettings = (property: string, value: any) => {
|
||||
const displayProperties = ['fontSize', 'fontSizeUnsync', 'gap', 'gapUnsync'];
|
||||
const displayProperties = [
|
||||
'fontSize',
|
||||
'fontSizeUnsync',
|
||||
'gap',
|
||||
'gapUnsync',
|
||||
'paddingLeft',
|
||||
'paddingRight',
|
||||
];
|
||||
if (displayProperties.includes(property)) {
|
||||
const currentDisplay = useSettingsStore.getState().lyricsDisplay;
|
||||
setSettings({
|
||||
@@ -284,6 +291,42 @@ export const MobileFullscreenPlayerHeader = memo(
|
||||
</Group>
|
||||
</Option.Control>
|
||||
</Option>
|
||||
<Option>
|
||||
<Option.Label>
|
||||
{t('page.fullscreenPlayer.config.lyricPaddingLeft')}
|
||||
</Option.Label>
|
||||
<Option.Control>
|
||||
<Slider
|
||||
defaultValue={lyricConfig.paddingLeft ?? 0}
|
||||
label={(value) => `${value}%`}
|
||||
max={20}
|
||||
min={0}
|
||||
onChangeEnd={(value) =>
|
||||
handleLyricsSettings('paddingLeft', value)
|
||||
}
|
||||
step={1}
|
||||
w="100%"
|
||||
/>
|
||||
</Option.Control>
|
||||
</Option>
|
||||
<Option>
|
||||
<Option.Label>
|
||||
{t('page.fullscreenPlayer.config.lyricPaddingRight')}
|
||||
</Option.Label>
|
||||
<Option.Control>
|
||||
<Slider
|
||||
defaultValue={lyricConfig.paddingRight ?? 0}
|
||||
label={(value) => `${value}%`}
|
||||
max={20}
|
||||
min={0}
|
||||
onChangeEnd={(value) =>
|
||||
handleLyricsSettings('paddingRight', value)
|
||||
}
|
||||
step={1}
|
||||
w="100%"
|
||||
/>
|
||||
</Option.Control>
|
||||
</Option>
|
||||
<Option>
|
||||
<Option.Label>
|
||||
{t('page.fullscreenPlayer.config.lyricAlignment')}
|
||||
|
||||
Reference in New Issue
Block a user