From dd1199f3be04bbc7d86748a1ddd37340931ac75e Mon Sep 17 00:00:00 2001
From: schroda <50052685+schroda@users.noreply.github.com>
Date: Wed, 1 Jul 2026 15:10:36 +0200
Subject: [PATCH] Integrate extension api v1.6 changes
---
CHANGELOG.md | 1 +
src/App.tsx | 12 +-
src/assets/icons/svg/DiscordIcon.tsx | 22 ++
src/base/AppRoute.constants.ts | 6 +
.../settings/text/TextSettingDialog.tsx | 21 +-
src/features/browse/extensions/Extensions.tsx | 43 +--
.../extensions/components/ExtensionCard.tsx | 31 +-
.../browse/screens/BrowseSettings.tsx | 50 ++-
src/features/browse/sources/Sources.tsx | 2 +-
.../browse/sources/components/SourceCard.tsx | 11 +-
src/features/extension/Extensions.types.ts | 9 +-
src/features/extension/Extensions.utils.ts | 5 +-
.../extension/info/components/Header.tsx | 12 +-
.../extension/info/components/Meta.tsx | 7 +-
.../store/screens/ExtensionStores.tsx | 286 ++++++++++++++++++
src/features/source/Source.types.ts | 4 +-
.../source/browse/screens/SourceMangas.tsx | 6 +-
src/features/source/services/Sources.ts | 13 +-
src/i18n/locales/en.po | 73 +++--
.../graphql/extension/ExtensionFragments.ts | 11 +-
.../graphql/extension/ExtensionMutation.ts | 5 +
.../store/ExtensionStoreFragments.ts | 25 ++
.../extension/store/ExtensionStoreMutation.ts | 34 +++
.../extension/store/ExtensionStoreQuery.ts | 38 +++
src/lib/graphql/generated/apollo-helpers.ts | 111 +++++++
.../graphql/generated/graphql-base.types.ts | 166 +++++++++-
src/lib/graphql/generated/graphql.ts | 202 +++++++++++--
src/lib/graphql/settings/SettingsFragments.ts | 5 +-
src/lib/graphql/source/SourceFragments.ts | 10 +-
src/lib/requests/RequestManager.ts | 136 ++++++++-
src/lib/requests/client/GraphQLClient.ts | 7 +
versionToServerVersionMapping.json | 2 +-
32 files changed, 1190 insertions(+), 176 deletions(-)
create mode 100644 src/assets/icons/svg/DiscordIcon.tsx
create mode 100644 src/features/extension/store/screens/ExtensionStores.tsx
create mode 100644 src/lib/graphql/extension/store/ExtensionStoreFragments.ts
create mode 100644 src/lib/graphql/extension/store/ExtensionStoreMutation.ts
create mode 100644 src/lib/graphql/extension/store/ExtensionStoreQuery.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33b01bbd..d910119e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Migration**) Show dialog on manual search selection to optionally open the search result entry instead of selecting it
- (**Migration**) Show "manual search matches" under "other matches"
- (**Source/Extension**) Rename language "All" to "Multi"
+- (**Extension/Settings**) Renamed "extension repo" to "extension stores"
- (**Reader**) Simplify changing settings in desktop sidebar
- (**Reader**) Ignore tap zone clicks while window does not have focus
- (**Reader**) Improve preloading pages from the previous/next chapter
diff --git a/src/App.tsx b/src/App.tsx
index 192f9727..bf873aca 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -100,6 +100,10 @@ const { GlobalReaderSettings } = loadable(
const { More } = loadable(() => import('@/features/settings/screens/More.tsx'), lazyLoadFallback);
const { Reader } = loadable(() => import('@/features/reader/screens/Reader.tsx'), lazyLoadFallback);
const { HistorySettings } = loadable(() => import('@/features/history/screens/HistorySettings.tsx'), lazyLoadFallback);
+const { ExtensionStores } = loadable(
+ () => import('@/features/extension/store/screens/ExtensionStores.tsx'),
+ lazyLoadFallback,
+);
if (import.meta.env.DEV) {
// Adds messages only in a dev environment
@@ -323,7 +327,13 @@ const MainApp = () => {
} />
} />
} />
- } />
+
+ } />
+ }
+ />
+
} />
} />
} />
diff --git a/src/assets/icons/svg/DiscordIcon.tsx b/src/assets/icons/svg/DiscordIcon.tsx
new file mode 100644
index 00000000..c6de6675
--- /dev/null
+++ b/src/assets/icons/svg/DiscordIcon.tsx
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) Contributors to the Suwayomi project
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+import type { SvgIconProps } from '@mui/material/SvgIcon';
+import SvgIcon from '@mui/material/SvgIcon';
+
+export const DiscordIcon = (props: SvgIconProps) => (
+
+
+
+);
diff --git a/src/base/AppRoute.constants.ts b/src/base/AppRoute.constants.ts
index e410bedd..327cd6de 100644
--- a/src/base/AppRoute.constants.ts
+++ b/src/base/AppRoute.constants.ts
@@ -109,6 +109,12 @@ export const AppRoutes = {
browse: {
match: 'browse',
path: '/settings/browse',
+ children: {
+ extensionStores: {
+ match: 'extension-stores',
+ path: '/settings/browse/extension-stores',
+ },
+ },
},
device: {
match: 'device',
diff --git a/src/base/components/settings/text/TextSettingDialog.tsx b/src/base/components/settings/text/TextSettingDialog.tsx
index 67417592..efcc02c0 100644
--- a/src/base/components/settings/text/TextSettingDialog.tsx
+++ b/src/base/components/settings/text/TextSettingDialog.tsx
@@ -28,6 +28,9 @@ export type TextSettingDialogProps = {
isDialogOpen: boolean;
setIsDialogOpen: (open: boolean) => void;
validate?: (value: string) => boolean;
+ onExitComplete?: () => void;
+ onDismiss?: () => void;
+ disabled?: boolean;
};
export const TextSettingDialog = ({
@@ -41,6 +44,9 @@ export const TextSettingDialog = ({
isDialogOpen,
setIsDialogOpen,
validate = () => true,
+ onExitComplete,
+ onDismiss,
+ disabled,
}: TextSettingDialogProps) => {
const { t } = useLingui();
@@ -60,12 +66,21 @@ export const TextSettingDialog = ({
}, [value]);
const closeDialog = (resetValue: boolean = true) => {
+ if (disabled) {
+ return;
+ }
+
if (resetValue) {
setDialogValue(value ?? '');
setIsValidValue(true);
}
setIsDialogOpen(false);
+
+ const rejected = resetValue;
+ if (rejected) {
+ onDismiss?.();
+ }
};
const updateSetting = () => {
@@ -74,7 +89,7 @@ export const TextSettingDialog = ({
};
return (
-