Remove incorrect "ListItemSecondaryAction" usage (#486)

This commit is contained in:
schroda
2023-12-09 14:16:59 +01:00
committed by GitHub
parent fbf627b3aa
commit 2caf88ce51
13 changed files with 143 additions and 217 deletions

View File

@@ -8,7 +8,6 @@
import { useTranslation } from 'react-i18next';
import { List, ListItem, ListItemText, Switch } from '@mui/material';
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
import { useCallback } from 'react';
import { requestManager } from '@/lib/requests/RequestManager.ts';
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
@@ -51,13 +50,7 @@ export const DownloadAheadSetting = () => {
<List>
<ListItem>
<ListItemText primary={t('download.settings.download_ahead.label.while_reading')} />
<ListItemSecondaryAction>
<Switch
edge="end"
checked={shouldDownloadAhead}
onChange={(e) => setDoAutoUpdates(e.target.checked)}
/>
</ListItemSecondaryAction>
<Switch edge="end" checked={shouldDownloadAhead} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
</ListItem>
<NumberSetting
settingTitle={t('download.settings.download_ahead.label.unread_chapters_to_download')}

View File

@@ -10,7 +10,6 @@ import List from '@mui/material/List';
import ListSubheader from '@mui/material/ListSubheader';
import { useTranslation } from 'react-i18next';
import { ListItem, ListItemText, Switch } from '@mui/material';
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
import { GlobalUpdateSettingsCategories } from '@/components/settings/globalUpdate/GlobalUpdateSettingsCategories.tsx';
import { GlobalUpdateSettingsEntries } from '@/components/settings/globalUpdate/GlobalUpdateSettingsEntries.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')}
secondary={t('library.settings.global_update.metadata.label.description')}
/>
<ListItemSecondaryAction>
<Switch
edge="end"
checked={updateMangas}
onChange={(e) => updateSetting('updateMangas', e.target.checked)}
/>
</ListItemSecondaryAction>
<Switch
edge="end"
checked={updateMangas}
onChange={(e) => updateSetting('updateMangas', e.target.checked)}
/>
</ListItem>
</List>
);

View File

@@ -8,7 +8,6 @@
import { useTranslation } from 'react-i18next';
import { List, ListItem, ListItemText, Switch } from '@mui/material';
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
import { useCallback } from 'react';
import { requestManager } from '@/lib/requests/RequestManager.ts';
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
@@ -51,9 +50,7 @@ export const GlobalUpdateSettingsInterval = () => {
<List>
<ListItem>
<ListItemText primary={t('library.settings.global_update.auto_update.label.title')} />
<ListItemSecondaryAction>
<Switch edge="end" checked={doAutoUpdates} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
</ListItemSecondaryAction>
<Switch edge="end" checked={doAutoUpdates} onChange={(e) => setDoAutoUpdates(e.target.checked)} />
</ListItem>
<NumberSetting
settingTitle={t('library.settings.global_update.auto_update.interval.label.title')}

View File

@@ -8,7 +8,6 @@
import { useTranslation } from 'react-i18next';
import { List, ListItem, ListItemText, Switch } from '@mui/material';
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
import { useCallback } from 'react';
import { requestManager } from '@/lib/requests/RequestManager.ts';
import { NumberSetting } from '@/components/settings/NumberSetting.tsx';
@@ -51,14 +50,12 @@ export const WebUIUpdateIntervalSetting = ({ disabled = false }: { disabled?: bo
<List>
<ListItem disabled={disabled}>
<ListItemText primary={t('settings.webui.auto_update.label.title')} />
<ListItemSecondaryAction>
<Switch
disabled={disabled}
edge="end"
checked={shouldAutoUpdate}
onChange={(e) => setDoAutoUpdates(e.target.checked)}
/>
</ListItemSecondaryAction>
<Switch
disabled={disabled}
edge="end"
checked={shouldAutoUpdate}
onChange={(e) => setDoAutoUpdates(e.target.checked)}
/>
</ListItem>
<NumberSetting
settingTitle={t('settings.webui.auto_update.label.interval')}