disable single attribute per line

This commit is contained in:
jeffvli 2025-07-12 11:17:54 -07:00
parent 92ed8e20c9
commit 8b141d652c
154 changed files with 390 additions and 1800 deletions

View file

@ -22,11 +22,7 @@ export const ContextMenuSettings = () => {
<>
<SettingsOptions
control={
<Button
onClick={() => setOpen(!open)}
size="compact-md"
variant="filled"
>
<Button onClick={() => setOpen(!open)} size="compact-md" variant="filled">
{t(open ? 'common.close' : 'common.edit', { postProcess: 'titleCase' })}
</Button>
}

View file

@ -35,17 +35,8 @@ export const DraggableItem = ({ handleChangeDisabled, item, value }: DraggableIt
const dragControls = useDragControls();
return (
<Reorder.Item
as="div"
dragControls={dragControls}
dragListener={false}
value={item}
>
<Group
py="md"
style={{ boxShadow: '0 1px 3px rgba(0,0,0,.1)' }}
wrap="nowrap"
>
<Reorder.Item as="div" dragControls={dragControls} dragListener={false} value={item}>
<Group py="md" style={{ boxShadow: '0 1px 3px rgba(0,0,0,.1)' }} wrap="nowrap">
<Checkbox
checked={!item.disabled}
onChange={(e) => handleChangeDisabled(item.id, e.target.checked)}

View file

@ -73,20 +73,12 @@ export const RemoteSettings = () => {
/>
),
description: (
<Text
isMuted
isNoSelect
size="sm"
>
<Text isMuted isNoSelect size="sm">
{t('setting.enableRemote', {
context: 'description',
postProcess: 'sentenceCase',
})}{' '}
<a
href={url}
rel="noreferrer noopener"
target="_blank"
>
<a href={url} rel="noreferrer noopener" target="_blank">
{url}
</a>
</Text>

View file

@ -240,10 +240,7 @@ export const HotkeyManagerSettings = () => {
/>
<div className={styles.container}>
{filteredBindings.map((binding) => (
<Group
key={`hotkey-${binding}`}
wrap="nowrap"
>
<Group key={`hotkey-${binding}`} wrap="nowrap">
<TextInput
readOnly
style={{ userSelect: 'none' }}

View file

@ -244,10 +244,5 @@ export const AudioSettings = ({ hasFancyAudio }: { hasFancyAudio: boolean }) =>
},
];
return (
<SettingsSection
divider={!hasFancyAudio}
options={audioOptions}
/>
);
return <SettingsSection divider={!hasFancyAudio} options={audioOptions} />;
};

View file

@ -215,10 +215,5 @@ export const LyricSettings = () => {
},
];
return (
<SettingsSection
divider={false}
options={lyricOptions}
/>
);
return <SettingsSection divider={false} options={lyricOptions} />;
};

View file

@ -218,11 +218,7 @@ export const MpvSettings = () => {
),
description: (
<Stack gap={0}>
<Text
isMuted
isNoSelect
size="sm"
>
<Text isMuted isNoSelect size="sm">
{t('setting.mpvExtraParameters', {
context: 'description',
postProcess: 'sentenceCase',

View file

@ -86,10 +86,5 @@ export const TranscodeSettings = () => {
},
];
return (
<SettingsSection
divider
options={transcodeOptions}
/>
);
return <SettingsSection divider options={transcodeOptions} />;
};

View file

@ -44,16 +44,9 @@ export const SettingsHeader = ({ setSearch }: SettingsHeaderProps) => {
<Flex ref={cq.ref}>
<PageHeader>
<LibraryHeaderBar>
<Flex
align="center"
justify="space-between"
w="100%"
>
<Flex align="center" justify="space-between" w="100%">
<Group wrap="nowrap">
<Icon
icon="settings"
size="5xl"
/>
<Icon icon="settings" size="5xl" />
<LibraryHeaderBar.Title>
{t('common.setting', { count: 2, postProcess: 'titleCase' })}
</LibraryHeaderBar.Title>
@ -65,10 +58,7 @@ export const SettingsHeader = ({ setSearch }: SettingsHeaderProps) => {
setSearch(event.target.value.toLocaleLowerCase())
}
/>
<Button
onClick={openResetConfirmModal}
variant="default"
>
<Button onClick={openResetConfirmModal} variant="default">
{t('common.resetToDefault', { postProcess: 'sentenceCase' })}
</Button>
</Group>

View file

@ -16,11 +16,7 @@ interface SettingsOptionProps {
export const SettingsOptions = ({ control, description, note, title }: SettingsOptionProps) => {
return (
<>
<Group
justify="space-between"
style={{ alignItems: 'center' }}
wrap="nowrap"
>
<Group justify="space-between" style={{ alignItems: 'center' }} wrap="nowrap">
<Stack
gap="xs"
style={{
@ -30,17 +26,11 @@ export const SettingsOptions = ({ control, description, note, title }: SettingsO
}}
>
<Group>
<Text
isNoSelect
size="md"
>
<Text isNoSelect size="md">
{title}
</Text>
{note && (
<Tooltip
label={note}
openDelay={0}
>
<Tooltip label={note} openDelay={0}>
<Icon icon="info" />
</Tooltip>
)}
@ -48,11 +38,7 @@ export const SettingsOptions = ({ control, description, note, title }: SettingsO
{React.isValidElement(description) ? (
description
) : (
<Text
isMuted
isNoSelect
size="sm"
>
<Text isMuted isNoSelect size="sm">
{description}
</Text>
)}

View file

@ -28,10 +28,7 @@ export const SettingsSection = ({ divider, options }: SettingsSectionProps) => {
return (
<>
{values.map((option) => (
<SettingsOptions
key={`option-${option.title}`}
{...option}
/>
<SettingsOptions key={`option-${option.title}`} {...option} />
))}
{divider !== false && values.length > 0 && <Divider />}
</>

View file

@ -94,10 +94,5 @@ export const CacheSettings = () => {
},
];
return (
<SettingsSection
divider={false}
options={options}
/>
);
return <SettingsSection divider={false} options={options} />;
};

View file

@ -52,10 +52,5 @@ export const PasswordSettings = () => {
},
];
return (
<SettingsSection
divider={false}
options={updateOptions}
/>
);
return <SettingsSection divider={false} options={updateOptions} />;
};

View file

@ -44,10 +44,5 @@ export const UpdateSettings = () => {
},
];
return (
<SettingsSection
divider={utils?.isLinux()}
options={updateOptions}
/>
);
return <SettingsSection divider={utils?.isLinux()} options={updateOptions} />;
};