From 4b54b0939576490948620f01996e593a73581985 Mon Sep 17 00:00:00 2001
From: schroda <50052685+schroda@users.noreply.github.com>
Date: Fri, 16 Feb 2024 19:53:00 +0100
Subject: [PATCH] Rename "ExtensionSettings" to "BrowseSettings" (#600)
---
src/App.tsx | 4 ++--
src/i18n/locale/en.json | 6 ++++--
src/screens/Extensions.tsx | 2 +-
src/screens/Settings.tsx | 2 +-
.../{ExtensionSettings.tsx => BrowseSettings.tsx} | 8 ++++----
5 files changed, 12 insertions(+), 10 deletions(-)
rename src/screens/settings/{ExtensionSettings.tsx => BrowseSettings.tsx} (95%)
diff --git a/src/App.tsx b/src/App.tsx
index da2fb48d35..8c75487fe0 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -35,7 +35,7 @@ import { DownloadSettings } from '@/screens/settings/DownloadSettings.tsx';
import { ServerSettings } from '@/screens/settings/ServerSettings.tsx';
import { ServerUpdateChecker } from '@/components/settings/ServerUpdateChecker.tsx';
import { requestManager } from '@/lib/requests/RequestManager.ts';
-import { ExtensionSettings } from '@/screens/settings/ExtensionSettings.tsx';
+import { BrowseSettings } from '@/screens/settings/BrowseSettings.tsx';
import { WebUISettings } from '@/screens/settings/WebUISettings.tsx';
import { Migrate } from '@/screens/Migrate.tsx';
@@ -101,7 +101,7 @@ export const App: React.FC = () => (
} />
} />
} />
- } />
+ } />
{/* Manga Routes */}
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json
index f09158db8a..1a5cddd462 100644
--- a/src/i18n/locale/en.json
+++ b/src/i18n/locale/en.json
@@ -275,8 +275,7 @@
"title": "Extension repositories"
}
}
- },
- "title": "Extension Settings"
+ }
},
"state": {
"label": {
@@ -684,6 +683,9 @@
}
},
"settings": {
+ "browse": {
+ "title": "Browse settings"
+ },
"about": {
"server": {
"label": {
diff --git a/src/screens/Extensions.tsx b/src/screens/Extensions.tsx
index cd35a8a709..b163664e2b 100644
--- a/src/screens/Extensions.tsx
+++ b/src/screens/Extensions.tsx
@@ -237,7 +237,7 @@ export function Extensions() {
{FileInputComponent}
{t('extension.label.add_repository_info')}
-
diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx
index 4a72e23599..6ec6eece48 100644
--- a/src/screens/Settings.tsx
+++ b/src/screens/Settings.tsx
@@ -155,7 +155,7 @@ export function Settings() {
secondary={t('settings.clear_cache.label.description')}
/>
-
+
diff --git a/src/screens/settings/ExtensionSettings.tsx b/src/screens/settings/BrowseSettings.tsx
similarity index 95%
rename from src/screens/settings/ExtensionSettings.tsx
rename to src/screens/settings/BrowseSettings.tsx
index dedec0b93f..707cb7f72d 100644
--- a/src/screens/settings/ExtensionSettings.tsx
+++ b/src/screens/settings/BrowseSettings.tsx
@@ -22,27 +22,27 @@ import { useLocalStorage } from '@/util/useLocalStorage.tsx';
type ExtensionsSettings = Pick;
-const extractExtensionSettings = (settings: GqlServerSettings): ExtensionsSettings => ({
+const extractBrowseSettings = (settings: GqlServerSettings): ExtensionsSettings => ({
maxSourcesInParallel: settings.maxSourcesInParallel,
localSourcePath: settings.localSourcePath,
extensionRepos: settings.extensionRepos,
});
-export const ExtensionSettings = () => {
+export const BrowseSettings = () => {
const { t } = useTranslation();
const { setTitle, setAction } = useContext(NavBarContext);
useSetDefaultBackTo('settings');
useEffect(() => {
- setTitle(t('extension.settings.title'));
+ setTitle(t('settings.browse.title'));
setAction(null);
}, [t]);
const [showNsfw, setShowNsfw] = useLocalStorage('showNsfw', true);
const { data } = requestManager.useGetServerSettings();
- const serverSettings = data ? extractExtensionSettings(data.settings) : undefined;
+ const serverSettings = data ? extractBrowseSettings(data.settings) : undefined;
const [mutateSettings] = requestManager.useUpdateServerSettings();
const updateSetting = (