Remove incorrect "ListItemSecondaryAction" usage (#486)
This commit is contained in:
@@ -16,7 +16,6 @@ import InfoIcon from '@mui/icons-material/Info';
|
||||
import ListItem from '@mui/material/ListItem';
|
||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Switch from '@mui/material/Switch';
|
||||
import FavoriteIcon from '@mui/icons-material/Favorite';
|
||||
import { Link, ListItemButton, MenuItem, Select } from '@mui/material';
|
||||
@@ -101,9 +100,7 @@ export function Settings() {
|
||||
<Brightness6Icon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t('settings.label.dark_theme')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch edge="end" checked={darkTheme} onChange={() => setDarkTheme(!darkTheme)} />
|
||||
</ListItemSecondaryAction>
|
||||
<Switch edge="end" checked={darkTheme} onChange={() => setDarkTheme(!darkTheme)} />
|
||||
</ListItem>
|
||||
<NumberSetting
|
||||
settingTitle={t('settings.label.manga_item_width')}
|
||||
@@ -127,9 +124,7 @@ export function Settings() {
|
||||
primary={t('settings.label.show_nsfw')}
|
||||
secondary={t('settings.label.show_nsfw_description')}
|
||||
/>
|
||||
<ListItemSecondaryAction>
|
||||
<Switch edge="end" checked={showNsfw} onChange={() => setShowNsfw(!showNsfw)} />
|
||||
</ListItemSecondaryAction>
|
||||
<Switch edge="end" checked={showNsfw} onChange={() => setShowNsfw(!showNsfw)} />
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemIcon>
|
||||
@@ -146,19 +141,17 @@ export function Settings() {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<ListItemSecondaryAction>
|
||||
<Select
|
||||
MenuProps={{ PaperProps: { style: { maxHeight: 150 } } }}
|
||||
value={i18n.language}
|
||||
onChange={({ target: { value: language } }) => i18n.changeLanguage(language)}
|
||||
>
|
||||
{Object.keys(i18n.services.resourceStore.data).map((language) => (
|
||||
<MenuItem key={language} value={language}>
|
||||
{langCodeToName(language)}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</ListItemSecondaryAction>
|
||||
<Select
|
||||
MenuProps={{ PaperProps: { style: { maxHeight: 150 } } }}
|
||||
value={i18n.language}
|
||||
onChange={({ target: { value: language } }) => i18n.changeLanguage(language)}
|
||||
>
|
||||
{Object.keys(i18n.services.resourceStore.data).map((language) => (
|
||||
<MenuItem key={language} value={language}>
|
||||
{langCodeToName(language)}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</ListItem>
|
||||
<ListItemButton disabled={isClearingServerCache} onClick={clearServerCache}>
|
||||
<ListItemIcon>
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useContext, useEffect } from 'react';
|
||||
import List from '@mui/material/List';
|
||||
import { ListItem, ListItemText, Switch } from '@mui/material';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import ListSubheader from '@mui/material/ListSubheader';
|
||||
import { TextSetting } from '@/components/settings/TextSetting.tsx';
|
||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||
@@ -87,13 +86,11 @@ export const DownloadSettings = () => {
|
||||
/>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('download.settings.file_type.label.cbz')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.downloadAsCbz}
|
||||
onChange={(e) => updateSetting('downloadAsCbz', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.downloadAsCbz}
|
||||
onChange={(e) => updateSetting('downloadAsCbz', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<List
|
||||
subheader={
|
||||
@@ -104,15 +101,11 @@ export const DownloadSettings = () => {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('download.settings.delete_chapters.label.manually_marked_as_read')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={metadataSettings.deleteChaptersManuallyMarkedRead}
|
||||
onChange={(e) =>
|
||||
updateMetadataSetting('deleteChaptersManuallyMarkedRead', e.target.checked)
|
||||
}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={metadataSettings.deleteChaptersManuallyMarkedRead}
|
||||
onChange={(e) => updateMetadataSetting('deleteChaptersManuallyMarkedRead', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<DeleteChaptersWhileReadingSetting
|
||||
chapterToDelete={metadataSettings.deleteChaptersWhileReading}
|
||||
@@ -122,13 +115,11 @@ export const DownloadSettings = () => {
|
||||
/>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('download.settings.delete_chapters.label.allow_deletion_of_bookmarked')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={metadataSettings.deleteChaptersWithBookmark}
|
||||
onChange={(e) => updateMetadataSetting('deleteChaptersWithBookmark', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={metadataSettings.deleteChaptersWithBookmark}
|
||||
onChange={(e) => updateMetadataSetting('deleteChaptersWithBookmark', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
<List
|
||||
@@ -140,24 +131,20 @@ export const DownloadSettings = () => {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('download.settings.auto_download.label.new_chapters')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.autoDownloadNewChapters}
|
||||
onChange={(e) => updateSetting('autoDownloadNewChapters', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.autoDownloadNewChapters}
|
||||
onChange={(e) => updateSetting('autoDownloadNewChapters', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem disabled={!downloadSettings?.autoDownloadNewChapters}>
|
||||
<ListItemText primary={t('download.settings.auto_download.label.ignore_with_unread_chapters')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.excludeEntryWithUnreadChapters}
|
||||
onChange={(e) => updateSetting('excludeEntryWithUnreadChapters', e.target.checked)}
|
||||
disabled={!downloadSettings?.autoDownloadNewChapters}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!downloadSettings?.excludeEntryWithUnreadChapters}
|
||||
onChange={(e) => updateSetting('excludeEntryWithUnreadChapters', e.target.checked)}
|
||||
disabled={!downloadSettings?.autoDownloadNewChapters}
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
<List
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ListSubheader from '@mui/material/ListSubheader';
|
||||
import { SearchMetadataKeys } from '@/typings';
|
||||
@@ -37,13 +36,11 @@ export function SearchSettings() {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('search.label.ignore_filters')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={settings.ignoreFilters}
|
||||
onChange={(e) => setSettingValue('ignoreFilters', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={settings.ignoreFilters}
|
||||
onChange={(e) => setSettingValue('ignoreFilters', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useContext, useEffect } from 'react';
|
||||
import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||
import ListSubheader from '@mui/material/ListSubheader';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||
import { useLocalStorage } from '@/util/useLocalStorage.tsx';
|
||||
@@ -167,13 +166,11 @@ export const ServerSettings = () => {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('settings.server.socks_proxy.label.enable')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.socksProxyEnabled}
|
||||
onChange={(e) => updateSetting('socksProxyEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.socksProxyEnabled}
|
||||
onChange={(e) => updateSetting('socksProxyEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<TextSetting
|
||||
settingName={t('settings.server.socks_proxy.label.host')}
|
||||
@@ -197,13 +194,11 @@ export const ServerSettings = () => {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('settings.server.auth.basic.label.enable')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.basicAuthEnabled}
|
||||
onChange={(e) => updateSetting('basicAuthEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.basicAuthEnabled}
|
||||
onChange={(e) => updateSetting('basicAuthEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<TextSetting
|
||||
settingName={t('settings.server.auth.basic.label.username')}
|
||||
@@ -228,39 +223,33 @@ export const ServerSettings = () => {
|
||||
>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('settings.server.misc.log_level.label.server')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.debugLogsEnabled}
|
||||
onChange={(e) => updateSetting('debugLogsEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.debugLogsEnabled}
|
||||
onChange={(e) => updateSetting('debugLogsEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemText
|
||||
primary={t('settings.server.misc.log_level.graphql.label.title')}
|
||||
secondary={t('settings.server.misc.log_level.graphql.label.description')}
|
||||
/>
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.gqlDebugLogsEnabled}
|
||||
onChange={(e) => updateSetting('gqlDebugLogsEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.gqlDebugLogsEnabled}
|
||||
onChange={(e) => updateSetting('gqlDebugLogsEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemText
|
||||
primary={t('settings.server.misc.tray_icon.label.title')}
|
||||
secondary={t('settings.server.misc.tray_icon.label.description')}
|
||||
/>
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.systemTrayEnabled}
|
||||
onChange={(e) => updateSetting('systemTrayEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!serverSettings?.systemTrayEnabled}
|
||||
onChange={(e) => updateSetting('systemTrayEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
</List>
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useContext, useEffect } from 'react';
|
||||
import List from '@mui/material/List';
|
||||
import { ListItem, ListItemText, Switch } from '@mui/material';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import { NavBarContext, useSetDefaultBackTo } from '@/components/context/NavbarContext.tsx';
|
||||
import { ServerSettings } from '@/typings.ts';
|
||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||
@@ -134,13 +133,11 @@ export const WebUISettings = () => {
|
||||
/>
|
||||
<ListItem>
|
||||
<ListItemText primary={t('settings.webui.label.initial_open_browser')} />
|
||||
<ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!webUISettings?.initialOpenInBrowserEnabled}
|
||||
onChange={(e) => updateSetting('initialOpenInBrowserEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItemSecondaryAction>
|
||||
<Switch
|
||||
edge="end"
|
||||
checked={!!webUISettings?.initialOpenInBrowserEnabled}
|
||||
onChange={(e) => updateSetting('initialOpenInBrowserEnabled', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<SelectSetting<WebUiInterface>
|
||||
settingName={t('settings.webui.interface.label.title')}
|
||||
|
||||
Reference in New Issue
Block a user