diff --git a/CHANGELOG.md b/CHANGELOG.md index bc13c8b3..705abb7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed +- (**Migration**) Fix aborting bulk migration search/execution while webUI is served on a subpath - (**Reader**) Fix scrollbar appearing with "fit to widt/height/screen" page scale mode and applied safe area insets - (**Reader**) Fix wrongly positioned mobile progress bar current page indicator - (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled diff --git a/src/features/app-updates/components/ServerUpdateChecker.tsx b/src/features/app-updates/components/ServerUpdateChecker.tsx index 5df33402..0572de30 100644 --- a/src/features/app-updates/components/ServerUpdateChecker.tsx +++ b/src/features/app-updates/components/ServerUpdateChecker.tsx @@ -21,6 +21,7 @@ import { useMetadataServerSettings } from '@/features/settings/services/ServerSe import { useLocalStorage } from '@/base/hooks/useStorage.tsx'; import { AppRoutes } from '@/base/AppRoute.constants.ts'; import { STABLE_EMPTY_OBJECT } from '@/base/Base.constants.ts'; +import { SubpathUtil } from '@/lib/utils/SubpathUtil.ts'; const disabledUpdateCheck = () => Promise.resolve(); @@ -92,7 +93,7 @@ export const ServerUpdateChecker = () => { return null; } - const isAboutPage = window.location.pathname === AppRoutes.about.path; + const isAboutPage = SubpathUtil.getPathname() === AppRoutes.about.path; if (isAboutPage) { return null; } diff --git a/src/features/migration/screens/Migration.tsx b/src/features/migration/screens/Migration.tsx index f3286f24..14ba8038 100644 --- a/src/features/migration/screens/Migration.tsx +++ b/src/features/migration/screens/Migration.tsx @@ -19,13 +19,14 @@ import { BrowseTab } from '@/features/browse/Browse.types.ts'; import { useAppPageHistoryContext } from '@/base/contexts/AppPageHistoryContext.tsx'; import { useEffect } from 'react'; import { ReactRouter } from '@/lib/react-router/ReactRouter.ts'; +import { SubpathUtil } from '@/lib/utils/SubpathUtil.ts'; export const Migration = ({ tabsMenuHeight = 0 }: { tabsMenuHeight?: number }) => { const phase = MigrationManager.usePhase(); const { setOnBack } = useAppPageHistoryContext(); useEffect(() => { - if (window.location.pathname !== AppRoutes.migrate.path) { + if (SubpathUtil.getPathname() !== AppRoutes.migrate.path) { if (!MigrationManager.isActive()) { MigrationManager.reset(); } else { diff --git a/src/lib/utils/SubpathUtil.ts b/src/lib/utils/SubpathUtil.ts index f4ff8129..214f4a72 100644 --- a/src/lib/utils/SubpathUtil.ts +++ b/src/lib/utils/SubpathUtil.ts @@ -44,4 +44,10 @@ export class SubpathUtil { return `${baseUrl}${subpath}`; } + + public static getPathname(): string { + const subpath = this.getSubpath(); + + return window.location.pathname.replace(subpath, ''); + } }