diff --git a/apps/readest-app/src/app/auth/page.tsx b/apps/readest-app/src/app/auth/page.tsx index 4d59e363..68009bee 100644 --- a/apps/readest-app/src/app/auth/page.tsx +++ b/apps/readest-app/src/app/auth/page.tsx @@ -334,8 +334,10 @@ export default function AuthPage() { return isTauriAppPlatform() ? (
diff --git a/apps/readest-app/src/app/library/page.tsx b/apps/readest-app/src/app/library/page.tsx index 99a4fcf3..beece06c 100644 --- a/apps/readest-app/src/app/library/page.tsx +++ b/apps/readest-app/src/app/library/page.tsx @@ -669,6 +669,7 @@ const LibraryPageContent = ({ searchParams }: { searchParams: ReadonlyURLSearchP className={clsx( 'library-page bg-base-200 text-base-content flex select-none flex-col overflow-hidden', appService?.isIOSApp ? 'h-[100vh]' : 'h-dvh', + appService?.isLinuxApp && 'window-border', appService?.hasRoundedWindow && 'rounded-window', )} > diff --git a/apps/readest-app/src/app/reader/components/BooksGrid.tsx b/apps/readest-app/src/app/reader/components/BooksGrid.tsx index fc4f1571..3089c471 100644 --- a/apps/readest-app/src/app/reader/components/BooksGrid.tsx +++ b/apps/readest-app/src/app/reader/components/BooksGrid.tsx @@ -31,7 +31,7 @@ const BooksGrid: React.FC = ({ bookKeys, onCloseBook }) => { const { getConfig, getBookData } = useBookDataStore(); const { getProgress, getViewState, getViewSettings } = useReaderStore(); const { setGridInsets, hoveredBookKey } = useReaderStore(); - const { isSideBarVisible, sideBarBookKey } = useSidebarStore(); + const { sideBarBookKey } = useSidebarStore(); const { isFontLayoutSettingsDialogOpen, setFontLayoutSettingsDialogOpen } = useSettingsStore(); const screenInsets = useSafeAreaInsets(); @@ -106,7 +106,7 @@ const BooksGrid: React.FC = ({ bookKeys, onCloseBook }) => { key={bookKey} className={clsx( 'relative h-full w-full overflow-hidden', - !isSideBarVisible && appService?.hasRoundedWindow && 'rounded-window', + appService?.hasRoundedWindow && 'rounded-window', )} > {isBookmarked && !hoveredBookKey && } diff --git a/apps/readest-app/src/app/reader/components/HeaderBar.tsx b/apps/readest-app/src/app/reader/components/HeaderBar.tsx index 879653f9..59800b4f 100644 --- a/apps/readest-app/src/app/reader/components/HeaderBar.tsx +++ b/apps/readest-app/src/app/reader/components/HeaderBar.tsx @@ -92,6 +92,7 @@ const HeaderBar: React.FC = ({
= ({ ids }) => { settings.globalReadSettings && (
diff --git a/apps/readest-app/src/app/reader/components/sidebar/TabNavigation.tsx b/apps/readest-app/src/app/reader/components/sidebar/TabNavigation.tsx index b16d6ae2..c6e6b526 100644 --- a/apps/readest-app/src/app/reader/components/sidebar/TabNavigation.tsx +++ b/apps/readest-app/src/app/reader/components/sidebar/TabNavigation.tsx @@ -4,6 +4,7 @@ import { MdBookmarkBorder as BookmarkIcon } from 'react-icons/md'; import { IoIosList as TOCIcon } from 'react-icons/io'; import { PiNotePencil as NoteIcon } from 'react-icons/pi'; +import { useEnv } from '@/context/EnvContext'; import { useTranslation } from '@/hooks/useTranslation'; const TabNavigation: React.FC<{ @@ -11,12 +12,16 @@ const TabNavigation: React.FC<{ onTabChange: (tab: string) => void; }> = ({ activeTab, onTabChange }) => { const _ = useTranslation(); + const { appService } = useEnv(); const tabs = ['toc', 'annotations', 'bookmarks']; return (
{ useTheme({ systemUIVisible: false }); - const { quotas, userPlan } = useQuotaStats(); + const { quotas, userPlan = 'free' } = useQuotaStats(); const handleGoBack = () => { if (showEmbeddedCheckout) { @@ -219,62 +219,66 @@ const ProfilePage = () => { return (
- -
- {loading && ( -
- -
- )} - {showEmbeddedCheckout ? ( -
- -
- ) : ( -
-
-
- +
+ +
+ {loading && ( +
+ +
+ )} + {showEmbeddedCheckout ? ( +
+ +
+ ) : ( +
+
+
+ - -
+ +
-
- -
+
+ +
-
- +
+ +
-
- )} + )} +
+
-
); }; diff --git a/apps/readest-app/src/components/Dialog.tsx b/apps/readest-app/src/components/Dialog.tsx index 50de3413..19d70ee1 100644 --- a/apps/readest-app/src/components/Dialog.tsx +++ b/apps/readest-app/src/components/Dialog.tsx @@ -160,7 +160,11 @@ const Dialog: React.FC = ({ dir={isRtl ? 'rtl' : undefined} >
{ const _ = useTranslation(); const { token, user } = useAuth(); const [quotas, setQuotas] = useState([]); - const [userPlan, setUserPlan] = useState('free'); + const [userPlan, setUserPlan] = useState(undefined); useEffect(() => { if (!user || !token) return; diff --git a/apps/readest-app/src/services/nativeAppService.ts b/apps/readest-app/src/services/nativeAppService.ts index 72260ea4..0fa61d44 100644 --- a/apps/readest-app/src/services/nativeAppService.ts +++ b/apps/readest-app/src/services/nativeAppService.ts @@ -220,7 +220,7 @@ export class NativeAppService extends BaseAppService { override hasWindow = !(OS_TYPE === 'ios' || OS_TYPE === 'android'); override hasWindowBar = !(OS_TYPE === 'ios' || OS_TYPE === 'android'); override hasContextMenu = !(OS_TYPE === 'ios' || OS_TYPE === 'android'); - override hasRoundedWindow = !(OS_TYPE === 'ios' || OS_TYPE === 'android') && !!window.IS_ROUNDED; + override hasRoundedWindow = OS_TYPE === 'linux'; override hasSafeAreaInset = OS_TYPE === 'ios' || OS_TYPE === 'android'; override hasHaptics = OS_TYPE === 'ios' || OS_TYPE === 'android'; override hasUpdater = diff --git a/apps/readest-app/src/styles/globals.css b/apps/readest-app/src/styles/globals.css index 82c70997..0e3ba5c9 100644 --- a/apps/readest-app/src/styles/globals.css +++ b/apps/readest-app/src/styles/globals.css @@ -6,6 +6,7 @@ border-radius: 10px; scrollbar-gutter: auto !important; overscroll-behavior: none; + background-color: transparent; --safe-area-inset-top: env(safe-area-inset-top); --safe-area-inset-right: env(safe-area-inset-right); @@ -97,6 +98,25 @@ foliate-view { border-bottom-right-radius: 10px; } +.window-border { + border-radius: 10px; + z-index: 999; + position: relative; +} + +.window-border::before { + content: ''; + z-index: 1000; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 1px solid theme('colors.base-300'); + border-radius: 10px; + pointer-events: none; +} + .dropdown-content { position: relative; @apply bg-base-100;