From 310bc89322380d05b545d207eb2ac4fe71c7b680 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 17 May 2026 12:22:35 +0200 Subject: [PATCH] Group "browse setting" settings --- .../browse/screens/BrowseSettings.tsx | 156 ++++++++++-------- src/i18n/locales/en.po | 24 ++- 2 files changed, 107 insertions(+), 73 deletions(-) diff --git a/src/features/browse/screens/BrowseSettings.tsx b/src/features/browse/screens/BrowseSettings.tsx index 448917ae..09f140bc 100644 --- a/src/features/browse/screens/BrowseSettings.tsx +++ b/src/features/browse/screens/BrowseSettings.tsx @@ -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 { getErrorMessage } from '@/lib/HelperFunctions.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; @@ -73,73 +77,95 @@ export const BrowseSettings = () => { return ( - - - updateMetadataServerSettings('hideLibraryEntries', !hideLibraryEntries)} - /> - - - - updateMetadataServerSettings('showNsfw', !showNsfw)} - /> - - updateSetting('maxSourcesInParallel', parallelSources)} - /> - - Suwayomi does not provide any support for 3rd party repositories or extensions! -
- Use with caution as there could be malicious actors making those repositories. -
- You as the user need to verify the security and that you trust any repository or extension. - + + {t`Sources`} + } - handleChange={(repos) => { - updateSetting('extensionRepos', repos); - requestManager.clearExtensionCache(); - }} - valueInfos={serverSettings.extensionRepos.map((extensionRepo) => [extensionRepo])} - addItemButtonTitle={t`Add repository`} - placeholder="https://github.com/MY_ACCOUNT/MY_REPO/tree/repo" - validateItem={(repo) => - !!repo.match( - /https:\/\/(www\.|raw\.)?(github|githubusercontent)\.com\/([^/]+)\/([^/]+)((\/tree|\/blob)?\/([^/\n]*))?(\/([^/\n]*\.json)?)?/g, - ) + sx={{ pb: 0 }} + > + + + updateMetadataServerSettings('hideLibraryEntries', !hideLibraryEntries)} + /> + + updateSetting('maxSourcesInParallel', parallelSources)} + /> + + + Suwayomi does not provide any support for 3rd party repositories or extensions! + +
+ Use with caution as there could be malicious actors making those repositories. +
+ You as the user need to verify the security and that you trust any repository or extension. + + } + handleChange={(repos) => { + updateSetting('extensionRepos', repos); + requestManager.clearExtensionCache(); + }} + valueInfos={serverSettings.extensionRepos.map((extensionRepo) => [extensionRepo])} + addItemButtonTitle={t`Add repository`} + placeholder="https://github.com/MY_ACCOUNT/MY_REPO/tree/repo" + validateItem={(repo) => + !!repo.match( + /https:\/\/(www\.|raw\.)?(github|githubusercontent)\.com\/([^/]+)\/([^/]+)((\/tree|\/blob)?\/([^/\n]*))?(\/([^/\n]*\.json)?)?/g, + ) + } + invalidItemError={t`Invalid repository url`} + /> + updateSetting('localSourcePath', path)} + /> +
+ + {t`NSFW (18+) sources`} + } - invalidItemError={t`Invalid repository url`} - /> - updateSetting('localSourcePath', path)} - /> + > + + + updateMetadataServerSettings('showNsfw', !showNsfw)} + /> + + + + {t`This does not prevent unofficial or potentially incorrectly flagged extensions from surfacing NSFW (18+) content within the app.`} + +
); }; diff --git a/src/i18n/locales/en.po b/src/i18n/locales/en.po index b182c376..eb495e4d 100644 --- a/src/i18n/locales/en.po +++ b/src/i18n/locales/en.po @@ -2493,6 +2493,10 @@ msgstr "Not yet released" msgid "Novel" msgstr "Novel" +#: src/features/browse/screens/BrowseSettings.tsx +msgid "NSFW (18+) sources" +msgstr "NSFW (18+) sources" + #: src/features/settings/screens/ServerSettings.tsx msgid "" "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" 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/features/tracker/components/cards/TrackerMangaCard.tsx msgid "Show less" @@ -3185,14 +3193,6 @@ msgstr "Show less" msgid "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 msgid "Show number of items" msgstr "Show number of items" @@ -3326,6 +3326,10 @@ msgstr "Source entry - {sourceTitle}" msgid "Source title" msgstr "Source title" +#: src/features/browse/screens/BrowseSettings.tsx +msgid "Sources" +msgstr "Sources" + #: src/features/settings/Settings.constants.ts msgid "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" 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 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"