Male library "grid layout" setting global

This commit is contained in:
schroda
2025-01-25 00:12:56 +01:00
parent b60b799649
commit ce6722d584
5 changed files with 11 additions and 14 deletions

View File

@@ -68,7 +68,7 @@ export const LibraryOptionsPanel = ({
);
const {
settings: { showTabSize, showContinueReadingButton, showDownloadBadge, showUnreadBadge },
settings: { showTabSize, showContinueReadingButton, showDownloadBadge, showUnreadBadge, gridLayout },
} = useMetadataServerSettings();
const setSettingValue = createUpdateMetadataServerSettings((e) =>
makeToast(t('search.error.label.failed_to_save_settings'), 'error', getErrorMessage(e)),
@@ -156,12 +156,11 @@ export const LibraryOptionsPanel = ({
));
}
if (key === 'display') {
const { gridLayout } = categoryLibraryOptions;
return (
<>
<FormLabel>{t('global.grid_layout.title')}</FormLabel>
<RadioGroup
onChange={(e) => updateCategoryLibraryOptions('gridLayout', Number(e.target.value))}
onChange={(e) => updateMetadataServerSettings('gridLayout', Number(e.target.value))}
value={gridLayout}
>
<RadioInput