Group "browse setting" settings
This commit is contained in:
@@ -28,6 +28,10 @@ import type { MetadataBrowseSettings } from '@/features/browse/Browse.types.ts';
|
|||||||
import type { ServerSettings as GqlServerSettings } from '@/features/settings/Settings.types.ts';
|
import type { ServerSettings as GqlServerSettings } from '@/features/settings/Settings.types.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { useAppTitle } from '@/features/navigation-bar/hooks/useAppTitle.ts';
|
import { useAppTitle } from '@/features/navigation-bar/hooks/useAppTitle.ts';
|
||||||
|
import Typography from '@mui/material/Typography';
|
||||||
|
import Stack from '@mui/material/Stack';
|
||||||
|
import ErrorOutlineOutlinedIcon from '@mui/icons-material/ErrorOutlineOutlined';
|
||||||
|
import ListSubheader from '@mui/material/ListSubheader';
|
||||||
|
|
||||||
type ExtensionsSettings = Pick<GqlServerSettings, 'maxSourcesInParallel' | 'localSourcePath' | 'extensionRepos'>;
|
type ExtensionsSettings = Pick<GqlServerSettings, 'maxSourcesInParallel' | 'localSourcePath' | 'extensionRepos'>;
|
||||||
|
|
||||||
@@ -73,6 +77,14 @@ export const BrowseSettings = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<List sx={{ pt: 0 }}>
|
<List sx={{ pt: 0 }}>
|
||||||
|
<List
|
||||||
|
subheader={
|
||||||
|
<ListSubheader component="div" id="browse-settings-source">
|
||||||
|
{t`Sources`}
|
||||||
|
</ListSubheader>
|
||||||
|
}
|
||||||
|
sx={{ pb: 0 }}
|
||||||
|
>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary={t`Hide entries already in library`} />
|
<ListItemText primary={t`Hide entries already in library`} />
|
||||||
<Switch
|
<Switch
|
||||||
@@ -81,17 +93,6 @@ export const BrowseSettings = () => {
|
|||||||
onChange={() => updateMetadataServerSettings('hideLibraryEntries', !hideLibraryEntries)}
|
onChange={() => updateMetadataServerSettings('hideLibraryEntries', !hideLibraryEntries)}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
|
||||||
<ListItemText
|
|
||||||
primary={t`Show NSFW (18+)`}
|
|
||||||
secondary={t`Show NSFW (18+) sources in sources and extensions lists`}
|
|
||||||
/>
|
|
||||||
<Switch
|
|
||||||
edge="end"
|
|
||||||
checked={showNsfw}
|
|
||||||
onChange={() => updateMetadataServerSettings('showNsfw', !showNsfw)}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
<NumberSetting
|
<NumberSetting
|
||||||
settingTitle={t`Parallel source requests`}
|
settingTitle={t`Parallel source requests`}
|
||||||
settingValue={plural(serverSettings.maxSourcesInParallel, {
|
settingValue={plural(serverSettings.maxSourcesInParallel, {
|
||||||
@@ -112,7 +113,9 @@ export const BrowseSettings = () => {
|
|||||||
description={t`Add repositories from which extensions can be installed`}
|
description={t`Add repositories from which extensions can be installed`}
|
||||||
dialogDisclaimer={
|
dialogDisclaimer={
|
||||||
<Trans>
|
<Trans>
|
||||||
<strong>Suwayomi does not provide any support for 3rd party repositories or extensions!</strong>
|
<strong>
|
||||||
|
Suwayomi does not provide any support for 3rd party repositories or extensions!
|
||||||
|
</strong>
|
||||||
<br />
|
<br />
|
||||||
Use with caution as there could be malicious actors making those repositories.
|
Use with caution as there could be malicious actors making those repositories.
|
||||||
<br />
|
<br />
|
||||||
@@ -137,9 +140,32 @@ export const BrowseSettings = () => {
|
|||||||
settingName={t`Local source location`}
|
settingName={t`Local source location`}
|
||||||
dialogDescription={t`The path to the directory on the server where local source files are saved in`}
|
dialogDescription={t`The path to the directory on the server where local source files are saved in`}
|
||||||
value={serverSettings.localSourcePath}
|
value={serverSettings.localSourcePath}
|
||||||
settingDescription={serverSettings.localSourcePath.length ? serverSettings.localSourcePath : t`Default`}
|
settingDescription={
|
||||||
|
serverSettings.localSourcePath.length ? serverSettings.localSourcePath : t`Default`
|
||||||
|
}
|
||||||
handleChange={(path) => updateSetting('localSourcePath', path)}
|
handleChange={(path) => updateSetting('localSourcePath', path)}
|
||||||
/>
|
/>
|
||||||
</List>
|
</List>
|
||||||
|
<List
|
||||||
|
subheader={
|
||||||
|
<ListSubheader component="div" id="browse-settings-source">
|
||||||
|
{t`NSFW (18+) sources`}
|
||||||
|
</ListSubheader>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<ListItem>
|
||||||
|
<ListItemText primary={t`Show in sources and extensions lists`} />
|
||||||
|
<Switch
|
||||||
|
edge="end"
|
||||||
|
checked={showNsfw}
|
||||||
|
onChange={() => updateMetadataServerSettings('showNsfw', !showNsfw)}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
<Stack sx={{ px: 2, gap: 1 }}>
|
||||||
|
<ErrorOutlineOutlinedIcon />
|
||||||
|
<Typography color="textSecondary">{t`This does not prevent unofficial or potentially incorrectly flagged extensions from surfacing NSFW (18+) content within the app.`}</Typography>
|
||||||
|
</Stack>
|
||||||
|
</List>
|
||||||
|
</List>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2493,6 +2493,10 @@ msgstr "Not yet released"
|
|||||||
msgid "Novel"
|
msgid "Novel"
|
||||||
msgstr "Novel"
|
msgstr "Novel"
|
||||||
|
|
||||||
|
#: src/features/browse/screens/BrowseSettings.tsx
|
||||||
|
msgid "NSFW (18+) sources"
|
||||||
|
msgstr "NSFW (18+) sources"
|
||||||
|
|
||||||
#: src/features/settings/screens/ServerSettings.tsx
|
#: src/features/settings/screens/ServerSettings.tsx
|
||||||
msgid ""
|
msgid ""
|
||||||
"Number of items per page in OPDS feeds (e.g., Library History, Manga Chapters).\n"
|
"Number of items per page in OPDS feeds (e.g., Library History, Manga Chapters).\n"
|
||||||
@@ -3172,6 +3176,10 @@ msgstr "Show entry"
|
|||||||
msgid "Show icon in system tray"
|
msgid "Show icon in system tray"
|
||||||
msgstr "Show icon in system tray"
|
msgstr "Show icon in system tray"
|
||||||
|
|
||||||
|
#: src/features/browse/screens/BrowseSettings.tsx
|
||||||
|
msgid "Show in sources and extensions lists"
|
||||||
|
msgstr "Show in sources and extensions lists"
|
||||||
|
|
||||||
#: src/base/components/feedback/EmptyView.tsx
|
#: src/base/components/feedback/EmptyView.tsx
|
||||||
#: src/features/tracker/components/cards/TrackerMangaCard.tsx
|
#: src/features/tracker/components/cards/TrackerMangaCard.tsx
|
||||||
msgid "Show less"
|
msgid "Show less"
|
||||||
@@ -3185,14 +3193,6 @@ msgstr "Show less"
|
|||||||
msgid "Show more"
|
msgid "Show more"
|
||||||
msgstr "Show more"
|
msgstr "Show more"
|
||||||
|
|
||||||
#: src/features/browse/screens/BrowseSettings.tsx
|
|
||||||
msgid "Show NSFW (18+)"
|
|
||||||
msgstr "Show NSFW (18+)"
|
|
||||||
|
|
||||||
#: src/features/browse/screens/BrowseSettings.tsx
|
|
||||||
msgid "Show NSFW (18+) sources in sources and extensions lists"
|
|
||||||
msgstr "Show NSFW (18+) sources in sources and extensions lists"
|
|
||||||
|
|
||||||
#: src/features/library/components/LibraryOptionsPanel.tsx
|
#: src/features/library/components/LibraryOptionsPanel.tsx
|
||||||
msgid "Show number of items"
|
msgid "Show number of items"
|
||||||
msgstr "Show number of items"
|
msgstr "Show number of items"
|
||||||
@@ -3326,6 +3326,10 @@ msgstr "Source entry - {sourceTitle}"
|
|||||||
msgid "Source title"
|
msgid "Source title"
|
||||||
msgstr "Source title"
|
msgstr "Source title"
|
||||||
|
|
||||||
|
#: src/features/browse/screens/BrowseSettings.tsx
|
||||||
|
msgid "Sources"
|
||||||
|
msgstr "Sources"
|
||||||
|
|
||||||
#: src/features/settings/Settings.constants.ts
|
#: src/features/settings/Settings.constants.ts
|
||||||
msgid "Stable"
|
msgid "Stable"
|
||||||
msgstr "Stable"
|
msgstr "Stable"
|
||||||
@@ -3547,6 +3551,10 @@ msgstr "These options are slow and dangerous and may lead to restrictions from s
|
|||||||
msgid "Third to last read chapter"
|
msgid "Third to last read chapter"
|
||||||
msgstr "Third to last read chapter"
|
msgstr "Third to last read chapter"
|
||||||
|
|
||||||
|
#: src/features/browse/screens/BrowseSettings.tsx
|
||||||
|
msgid "This does not prevent unofficial or potentially incorrectly flagged extensions from surfacing NSFW (18+) content within the app."
|
||||||
|
msgstr "This does not prevent unofficial or potentially incorrectly flagged extensions from surfacing NSFW (18+) content within the app."
|
||||||
|
|
||||||
#: src/features/settings/screens/ServerSettings.tsx
|
#: src/features/settings/screens/ServerSettings.tsx
|
||||||
msgid "This icon will be shown on the system that is running the server"
|
msgid "This icon will be shown on the system that is running the server"
|
||||||
msgstr "This icon will be shown on the system that is running the server"
|
msgstr "This icon will be shown on the system that is running the server"
|
||||||
|
|||||||
Reference in New Issue
Block a user