Remove incorrect "ListItemSecondaryAction" usage (#486)
This commit is contained in:
@@ -21,7 +21,6 @@ import Zoom from '@mui/material/Zoom';
|
|||||||
import { Divider, FormControl, MenuItem, Select, styled, Tooltip } from '@mui/material';
|
import { Divider, FormControl, MenuItem, Select, styled, Tooltip } from '@mui/material';
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ChapterOffset, IReaderSettings, TChapter, TManga } from '@/typings';
|
import { ChapterOffset, IReaderSettings, TChapter, TManga } from '@/typings';
|
||||||
@@ -247,20 +246,18 @@ export function ReaderNavBar(props: IProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListItemText primary={t('reader.settings.title.reader_settings')} />
|
<ListItemText primary={t('reader.settings.title.reader_settings')} />
|
||||||
<ListItemSecondaryAction>
|
<IconButton
|
||||||
<IconButton
|
edge="start"
|
||||||
edge="start"
|
color="inherit"
|
||||||
color="inherit"
|
aria-label="menu"
|
||||||
aria-label="menu"
|
disableRipple
|
||||||
disableRipple
|
disableFocusRipple
|
||||||
disableFocusRipple
|
onClick={() => setSettingsCollapseOpen(!settingsCollapseOpen)}
|
||||||
onClick={() => setSettingsCollapseOpen(!settingsCollapseOpen)}
|
size="large"
|
||||||
size="large"
|
>
|
||||||
>
|
{settingsCollapseOpen && <KeyboardArrowUpIcon />}
|
||||||
{settingsCollapseOpen && <KeyboardArrowUpIcon />}
|
{!settingsCollapseOpen && <KeyboardArrowDownIcon />}
|
||||||
{!settingsCollapseOpen && <KeyboardArrowDownIcon />}
|
</IconButton>
|
||||||
</IconButton>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<Collapse in={settingsCollapseOpen} timeout="auto" unmountOnExit>
|
<Collapse in={settingsCollapseOpen} timeout="auto" unmountOnExit>
|
||||||
<ReaderSettingsOptions
|
<ReaderSettingsOptions
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import Dialog from '@mui/material/Dialog';
|
|||||||
import Switch from '@mui/material/Switch';
|
import Switch from '@mui/material/Switch';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import FilterListIcon from '@mui/icons-material/FilterList';
|
import FilterListIcon from '@mui/icons-material/FilterList';
|
||||||
import { List, ListItemSecondaryAction, ListItemText, Tooltip } from '@mui/material';
|
import { List, ListItemText, Tooltip } from '@mui/material';
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { cloneObject } from '@/util/cloneObject';
|
import { cloneObject } from '@/util/cloneObject';
|
||||||
@@ -98,12 +98,10 @@ export function LangSelect(props: IProps) {
|
|||||||
<ListItem key={lang}>
|
<ListItem key={lang}>
|
||||||
<ListItemText primary={translateExtensionLanguage(lang)} />
|
<ListItemText primary={translateExtensionLanguage(lang)} />
|
||||||
|
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
checked={mShownLangs.indexOf(lang) !== -1}
|
||||||
checked={mShownLangs.indexOf(lang) !== -1}
|
onChange={(e) => handleChange(e, lang)}
|
||||||
onChange={(e) => handleChange(e, lang)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import Select from '@mui/material/Select';
|
import Select from '@mui/material/Select';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -39,66 +38,54 @@ export function ReaderSettingsOptions({
|
|||||||
<List>
|
<List>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.static_navigation')} />
|
<ListItemText primary={t('reader.settings.label.static_navigation')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={staticNav}
|
||||||
checked={staticNav}
|
onChange={(e) => setSettingValue('staticNav', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('staticNav', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.show_page_number')} />
|
<ListItemText primary={t('reader.settings.label.show_page_number')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={showPageNumber}
|
||||||
checked={showPageNumber}
|
onChange={(e) => setSettingValue('showPageNumber', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('showPageNumber', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.load_next_chapter')} />
|
<ListItemText primary={t('reader.settings.label.load_next_chapter')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={loadNextOnEnding}
|
||||||
checked={loadNextOnEnding}
|
onChange={(e) => setSettingValue('loadNextOnEnding', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('loadNextOnEnding', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.skip_dup_chapters')} />
|
<ListItemText primary={t('reader.settings.label.skip_dup_chapters')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={skipDupChapters}
|
||||||
checked={skipDupChapters}
|
onChange={(e) => setSettingValue('skipDupChapters', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('skipDupChapters', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{fitPageToWindowEligible ? (
|
{fitPageToWindowEligible ? (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.fit_page_to_window')} />
|
<ListItemText primary={t('reader.settings.label.fit_page_to_window')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={fitPageToWindow}
|
||||||
checked={fitPageToWindow}
|
onChange={(e) => setSettingValue('fitPageToWindow', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('fitPageToWindow', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
) : null}
|
) : null}
|
||||||
{readerType === 'DoubleLTR' || readerType === 'DoubleRTL' ? (
|
{readerType === 'DoubleLTR' || readerType === 'DoubleRTL' ? (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('reader.settings.label.offset_first_page')} />
|
<ListItemText primary={t('reader.settings.label.offset_first_page')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={offsetFirstPage}
|
||||||
checked={offsetFirstPage}
|
onChange={(e) => setSettingValue('offsetFirstPage', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('offsetFirstPage', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
) : null}
|
) : null}
|
||||||
<ListItem>
|
<ListItem>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
||||||
@@ -51,13 +50,7 @@ export const DownloadAheadSetting = () => {
|
|||||||
<List>
|
<List>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('download.settings.download_ahead.label.while_reading')} />
|
<ListItemText primary={t('download.settings.download_ahead.label.while_reading')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch edge="end" checked={shouldDownloadAhead} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
|
||||||
<Switch
|
|
||||||
edge="end"
|
|
||||||
checked={shouldDownloadAhead}
|
|
||||||
onChange={(e) => setDoAutoUpdates(e.target.checked)}
|
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<NumberSetting
|
<NumberSetting
|
||||||
settingTitle={t('download.settings.download_ahead.label.unread_chapters_to_download')}
|
settingTitle={t('download.settings.download_ahead.label.unread_chapters_to_download')}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import List from '@mui/material/List';
|
|||||||
import ListSubheader from '@mui/material/ListSubheader';
|
import ListSubheader from '@mui/material/ListSubheader';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ListItem, ListItemText, Switch } from '@mui/material';
|
import { ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { GlobalUpdateSettingsCategories } from '@/components/settings/globalUpdate/GlobalUpdateSettingsCategories.tsx';
|
import { GlobalUpdateSettingsCategories } from '@/components/settings/globalUpdate/GlobalUpdateSettingsCategories.tsx';
|
||||||
import { GlobalUpdateSettingsEntries } from '@/components/settings/globalUpdate/GlobalUpdateSettingsEntries.tsx';
|
import { GlobalUpdateSettingsEntries } from '@/components/settings/globalUpdate/GlobalUpdateSettingsEntries.tsx';
|
||||||
import { GlobalUpdateSettingsInterval } from '@/components/settings/globalUpdate/GlobalUpdateSettingsInterval.tsx';
|
import { GlobalUpdateSettingsInterval } from '@/components/settings/globalUpdate/GlobalUpdateSettingsInterval.tsx';
|
||||||
@@ -54,13 +53,11 @@ export const GlobalUpdateSettings = () => {
|
|||||||
primary={t('library.settings.global_update.metadata.label.title')}
|
primary={t('library.settings.global_update.metadata.label.title')}
|
||||||
secondary={t('library.settings.global_update.metadata.label.description')}
|
secondary={t('library.settings.global_update.metadata.label.description')}
|
||||||
/>
|
/>
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={updateMangas}
|
||||||
checked={updateMangas}
|
onChange={(e) => updateSetting('updateMangas', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('updateMangas', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
||||||
@@ -51,9 +50,7 @@ export const GlobalUpdateSettingsInterval = () => {
|
|||||||
<List>
|
<List>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('library.settings.global_update.auto_update.label.title')} />
|
<ListItemText primary={t('library.settings.global_update.auto_update.label.title')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch edge="end" checked={doAutoUpdates} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
|
||||||
<Switch edge="end" checked={doAutoUpdates} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<NumberSetting
|
<NumberSetting
|
||||||
settingTitle={t('library.settings.global_update.auto_update.interval.label.title')}
|
settingTitle={t('library.settings.global_update.auto_update.interval.label.title')}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
|
||||||
@@ -51,14 +50,12 @@ export const WebUIUpdateIntervalSetting = ({ disabled = false }: { disabled?: bo
|
|||||||
<List>
|
<List>
|
||||||
<ListItem disabled={disabled}>
|
<ListItem disabled={disabled}>
|
||||||
<ListItemText primary={t('settings.webui.auto_update.label.title')} />
|
<ListItemText primary={t('settings.webui.auto_update.label.title')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
disabled={disabled}
|
||||||
disabled={disabled}
|
edge="end"
|
||||||
edge="end"
|
checked={shouldAutoUpdate}
|
||||||
checked={shouldAutoUpdate}
|
onChange={(e) => setDoAutoUpdates(e.target.checked)}
|
||||||
onChange={(e) => setDoAutoUpdates(e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<NumberSetting
|
<NumberSetting
|
||||||
settingTitle={t('settings.webui.auto_update.label.interval')}
|
settingTitle={t('settings.webui.auto_update.label.interval')}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
import { createElement, useState, useEffect } from 'react';
|
import { createElement, useState, useEffect } from 'react';
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import Switch from '@mui/material/Switch';
|
import Switch from '@mui/material/Switch';
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
import { CheckBoxPreferenceProps, SwitchPreferenceCompatProps, TwoStatePreferenceProps } from '@/typings';
|
import { CheckBoxPreferenceProps, SwitchPreferenceCompatProps, TwoStatePreferenceProps } from '@/typings';
|
||||||
@@ -57,18 +56,16 @@ function TwoSatePreference(props: TwoStatePreferenceProps) {
|
|||||||
return (
|
return (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={title} secondary={summary} />
|
<ListItemText primary={title} secondary={summary} />
|
||||||
<ListItemSecondaryAction>
|
{createElement(getTwoStateType(twoStateType), {
|
||||||
{createElement(getTwoStateType(twoStateType), {
|
edge: 'end',
|
||||||
edge: 'end',
|
checked: internalCurrentValue,
|
||||||
checked: internalCurrentValue,
|
onChange: () => {
|
||||||
onChange: () => {
|
updateValue(twoStateType === 'Switch' ? 'switchState' : 'checkBoxState', !currentValue);
|
||||||
updateValue(twoStateType === 'Switch' ? 'switchState' : 'checkBoxState', !currentValue);
|
|
||||||
|
|
||||||
// appear smooth
|
// appear smooth
|
||||||
setInternalCurrentValue(!currentValue);
|
setInternalCurrentValue(!currentValue);
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import InfoIcon from '@mui/icons-material/Info';
|
|||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import Switch from '@mui/material/Switch';
|
import Switch from '@mui/material/Switch';
|
||||||
import FavoriteIcon from '@mui/icons-material/Favorite';
|
import FavoriteIcon from '@mui/icons-material/Favorite';
|
||||||
import { Link, ListItemButton, MenuItem, Select } from '@mui/material';
|
import { Link, ListItemButton, MenuItem, Select } from '@mui/material';
|
||||||
@@ -101,9 +100,7 @@ export function Settings() {
|
|||||||
<Brightness6Icon />
|
<Brightness6Icon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={t('settings.label.dark_theme')} />
|
<ListItemText primary={t('settings.label.dark_theme')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch edge="end" checked={darkTheme} onChange={() => setDarkTheme(!darkTheme)} />
|
||||||
<Switch edge="end" checked={darkTheme} onChange={() => setDarkTheme(!darkTheme)} />
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<NumberSetting
|
<NumberSetting
|
||||||
settingTitle={t('settings.label.manga_item_width')}
|
settingTitle={t('settings.label.manga_item_width')}
|
||||||
@@ -127,9 +124,7 @@ export function Settings() {
|
|||||||
primary={t('settings.label.show_nsfw')}
|
primary={t('settings.label.show_nsfw')}
|
||||||
secondary={t('settings.label.show_nsfw_description')}
|
secondary={t('settings.label.show_nsfw_description')}
|
||||||
/>
|
/>
|
||||||
<ListItemSecondaryAction>
|
<Switch edge="end" checked={showNsfw} onChange={() => setShowNsfw(!showNsfw)} />
|
||||||
<Switch edge="end" checked={showNsfw} onChange={() => setShowNsfw(!showNsfw)} />
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
@@ -146,19 +141,17 @@ export function Settings() {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<ListItemSecondaryAction>
|
<Select
|
||||||
<Select
|
MenuProps={{ PaperProps: { style: { maxHeight: 150 } } }}
|
||||||
MenuProps={{ PaperProps: { style: { maxHeight: 150 } } }}
|
value={i18n.language}
|
||||||
value={i18n.language}
|
onChange={({ target: { value: language } }) => i18n.changeLanguage(language)}
|
||||||
onChange={({ target: { value: language } }) => i18n.changeLanguage(language)}
|
>
|
||||||
>
|
{Object.keys(i18n.services.resourceStore.data).map((language) => (
|
||||||
{Object.keys(i18n.services.resourceStore.data).map((language) => (
|
<MenuItem key={language} value={language}>
|
||||||
<MenuItem key={language} value={language}>
|
{langCodeToName(language)}
|
||||||
{langCodeToName(language)}
|
</MenuItem>
|
||||||
</MenuItem>
|
))}
|
||||||
))}
|
</Select>
|
||||||
</Select>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItemButton disabled={isClearingServerCache} onClick={clearServerCache}>
|
<ListItemButton disabled={isClearingServerCache} onClick={clearServerCache}>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useContext, useEffect } from 'react';
|
import { useContext, useEffect } from 'react';
|
||||||
import List from '@mui/material/List';
|
import List from '@mui/material/List';
|
||||||
import { ListItem, ListItemText, Switch } from '@mui/material';
|
import { ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import ListSubheader from '@mui/material/ListSubheader';
|
import ListSubheader from '@mui/material/ListSubheader';
|
||||||
import { TextSetting } from '@/components/settings/TextSetting.tsx';
|
import { TextSetting } from '@/components/settings/TextSetting.tsx';
|
||||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||||
@@ -87,13 +86,11 @@ export const DownloadSettings = () => {
|
|||||||
/>
|
/>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('download.settings.file_type.label.cbz')} />
|
<ListItemText primary={t('download.settings.file_type.label.cbz')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!downloadSettings?.downloadAsCbz}
|
||||||
checked={!!downloadSettings?.downloadAsCbz}
|
onChange={(e) => updateSetting('downloadAsCbz', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('downloadAsCbz', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<List
|
<List
|
||||||
subheader={
|
subheader={
|
||||||
@@ -104,15 +101,11 @@ export const DownloadSettings = () => {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('download.settings.delete_chapters.label.manually_marked_as_read')} />
|
<ListItemText primary={t('download.settings.delete_chapters.label.manually_marked_as_read')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={metadataSettings.deleteChaptersManuallyMarkedRead}
|
||||||
checked={metadataSettings.deleteChaptersManuallyMarkedRead}
|
onChange={(e) => updateMetadataSetting('deleteChaptersManuallyMarkedRead', e.target.checked)}
|
||||||
onChange={(e) =>
|
/>
|
||||||
updateMetadataSetting('deleteChaptersManuallyMarkedRead', e.target.checked)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<DeleteChaptersWhileReadingSetting
|
<DeleteChaptersWhileReadingSetting
|
||||||
chapterToDelete={metadataSettings.deleteChaptersWhileReading}
|
chapterToDelete={metadataSettings.deleteChaptersWhileReading}
|
||||||
@@ -122,13 +115,11 @@ export const DownloadSettings = () => {
|
|||||||
/>
|
/>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('download.settings.delete_chapters.label.allow_deletion_of_bookmarked')} />
|
<ListItemText primary={t('download.settings.delete_chapters.label.allow_deletion_of_bookmarked')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={metadataSettings.deleteChaptersWithBookmark}
|
||||||
checked={metadataSettings.deleteChaptersWithBookmark}
|
onChange={(e) => updateMetadataSetting('deleteChaptersWithBookmark', e.target.checked)}
|
||||||
onChange={(e) => updateMetadataSetting('deleteChaptersWithBookmark', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<List
|
<List
|
||||||
@@ -140,24 +131,20 @@ export const DownloadSettings = () => {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('download.settings.auto_download.label.new_chapters')} />
|
<ListItemText primary={t('download.settings.auto_download.label.new_chapters')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!downloadSettings?.autoDownloadNewChapters}
|
||||||
checked={!!downloadSettings?.autoDownloadNewChapters}
|
onChange={(e) => updateSetting('autoDownloadNewChapters', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('autoDownloadNewChapters', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem disabled={!downloadSettings?.autoDownloadNewChapters}>
|
<ListItem disabled={!downloadSettings?.autoDownloadNewChapters}>
|
||||||
<ListItemText primary={t('download.settings.auto_download.label.ignore_with_unread_chapters')} />
|
<ListItemText primary={t('download.settings.auto_download.label.ignore_with_unread_chapters')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!downloadSettings?.excludeEntryWithUnreadChapters}
|
||||||
checked={!!downloadSettings?.excludeEntryWithUnreadChapters}
|
onChange={(e) => updateSetting('excludeEntryWithUnreadChapters', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('excludeEntryWithUnreadChapters', e.target.checked)}
|
disabled={!downloadSettings?.autoDownloadNewChapters}
|
||||||
disabled={!downloadSettings?.autoDownloadNewChapters}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<List
|
<List
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ListSubheader from '@mui/material/ListSubheader';
|
import ListSubheader from '@mui/material/ListSubheader';
|
||||||
import { SearchMetadataKeys } from '@/typings';
|
import { SearchMetadataKeys } from '@/typings';
|
||||||
@@ -37,13 +36,11 @@ export function SearchSettings() {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('search.label.ignore_filters')} />
|
<ListItemText primary={t('search.label.ignore_filters')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={settings.ignoreFilters}
|
||||||
checked={settings.ignoreFilters}
|
onChange={(e) => setSettingValue('ignoreFilters', e.target.checked)}
|
||||||
onChange={(e) => setSettingValue('ignoreFilters', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useContext, useEffect } from 'react';
|
import { useContext, useEffect } from 'react';
|
||||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListSubheader from '@mui/material/ListSubheader';
|
import ListSubheader from '@mui/material/ListSubheader';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { useLocalStorage } from '@/util/useLocalStorage.tsx';
|
import { useLocalStorage } from '@/util/useLocalStorage.tsx';
|
||||||
@@ -167,13 +166,11 @@ export const ServerSettings = () => {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('settings.server.socks_proxy.label.enable')} />
|
<ListItemText primary={t('settings.server.socks_proxy.label.enable')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!serverSettings?.socksProxyEnabled}
|
||||||
checked={!!serverSettings?.socksProxyEnabled}
|
onChange={(e) => updateSetting('socksProxyEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('socksProxyEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<TextSetting
|
<TextSetting
|
||||||
settingName={t('settings.server.socks_proxy.label.host')}
|
settingName={t('settings.server.socks_proxy.label.host')}
|
||||||
@@ -197,13 +194,11 @@ export const ServerSettings = () => {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('settings.server.auth.basic.label.enable')} />
|
<ListItemText primary={t('settings.server.auth.basic.label.enable')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!serverSettings?.basicAuthEnabled}
|
||||||
checked={!!serverSettings?.basicAuthEnabled}
|
onChange={(e) => updateSetting('basicAuthEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('basicAuthEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<TextSetting
|
<TextSetting
|
||||||
settingName={t('settings.server.auth.basic.label.username')}
|
settingName={t('settings.server.auth.basic.label.username')}
|
||||||
@@ -228,39 +223,33 @@ export const ServerSettings = () => {
|
|||||||
>
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('settings.server.misc.log_level.label.server')} />
|
<ListItemText primary={t('settings.server.misc.log_level.label.server')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!serverSettings?.debugLogsEnabled}
|
||||||
checked={!!serverSettings?.debugLogsEnabled}
|
onChange={(e) => updateSetting('debugLogsEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('debugLogsEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={t('settings.server.misc.log_level.graphql.label.title')}
|
primary={t('settings.server.misc.log_level.graphql.label.title')}
|
||||||
secondary={t('settings.server.misc.log_level.graphql.label.description')}
|
secondary={t('settings.server.misc.log_level.graphql.label.description')}
|
||||||
/>
|
/>
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!serverSettings?.gqlDebugLogsEnabled}
|
||||||
checked={!!serverSettings?.gqlDebugLogsEnabled}
|
onChange={(e) => updateSetting('gqlDebugLogsEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('gqlDebugLogsEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={t('settings.server.misc.tray_icon.label.title')}
|
primary={t('settings.server.misc.tray_icon.label.title')}
|
||||||
secondary={t('settings.server.misc.tray_icon.label.description')}
|
secondary={t('settings.server.misc.tray_icon.label.description')}
|
||||||
/>
|
/>
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!serverSettings?.systemTrayEnabled}
|
||||||
checked={!!serverSettings?.systemTrayEnabled}
|
onChange={(e) => updateSetting('systemTrayEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('systemTrayEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useContext, useEffect } from 'react';
|
import { useContext, useEffect } from 'react';
|
||||||
import List from '@mui/material/List';
|
import List from '@mui/material/List';
|
||||||
import { ListItem, ListItemText, Switch } from '@mui/material';
|
import { ListItem, ListItemText, Switch } from '@mui/material';
|
||||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
||||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||||
import { ServerSettings } from '@/typings.ts';
|
import { ServerSettings } from '@/typings.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
@@ -134,13 +133,11 @@ export const WebUISettings = () => {
|
|||||||
/>
|
/>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t('settings.webui.label.initial_open_browser')} />
|
<ListItemText primary={t('settings.webui.label.initial_open_browser')} />
|
||||||
<ListItemSecondaryAction>
|
<Switch
|
||||||
<Switch
|
edge="end"
|
||||||
edge="end"
|
checked={!!webUISettings?.initialOpenInBrowserEnabled}
|
||||||
checked={!!webUISettings?.initialOpenInBrowserEnabled}
|
onChange={(e) => updateSetting('initialOpenInBrowserEnabled', e.target.checked)}
|
||||||
onChange={(e) => updateSetting('initialOpenInBrowserEnabled', e.target.checked)}
|
/>
|
||||||
/>
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<SelectSetting<WebUiInterface>
|
<SelectSetting<WebUiInterface>
|
||||||
settingName={t('settings.webui.interface.label.title')}
|
settingName={t('settings.webui.interface.label.title')}
|
||||||
|
|||||||
Reference in New Issue
Block a user