From 23fc4ad78a44c2399f0faed888de399ee03e17c9 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 12 Oct 2024 15:16:18 +0800 Subject: [PATCH 01/18] chore: update changelogithub Signed-off-by: Innei --- .github/workflows/build.yml | 2 +- changelogithub.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fade4a1e5..e73176ce85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,7 +150,7 @@ jobs: out/make/**/*.AppImage out/make/**/*.yml - - run: npx @innei/changelogithub + - run: npx changelogithub if: github.ref_type == 'tag' || github.event.inputs.tag_version != '' continue-on-error: true env: diff --git a/changelogithub.config.ts b/changelogithub.config.ts index 40322ada1e..726e583e36 100644 --- a/changelogithub.config.ts +++ b/changelogithub.config.ts @@ -1,4 +1,4 @@ export default { tagFilter: (tag: string) => tag.startsWith("v") && !tag.includes("nightly"), - dry: true, + dry: !process.env.CI, } From fc38072320f8225e6ae60f4e25719eaeb9ff5e6a Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 12 Oct 2024 15:26:26 +0800 Subject: [PATCH 02/18] fix(vercel): filter subpath Signed-off-by: Innei --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index c856092012..de5710a185 100644 --- a/vercel.json +++ b/vercel.json @@ -9,7 +9,7 @@ "destination": "/__debug_proxy.html" }, { - "source": "/(.*)", + "source": "/((?!assets|vendor|locales/).*)", "destination": "/index.html" } ], From 079043f423a5e4043012a32f8e4f6abf4941e480 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 12 Oct 2024 16:13:56 +0800 Subject: [PATCH 03/18] chore: add VITE_FIREBASE_CONFIG --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e73176ce85..250a75abe0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ env: VITE_IMGPROXY_URL: ${{ vars.VITE_IMGPROXY_URL }} VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }} VITE_POSTHOG_KEY: ${{ vars.VITE_POSTHOG_KEY }} + VITE_FIREBASE_CONFIG: ${{ vars.VITE_FIREBASE_CONFIG }} NODE_OPTIONS: --max-old-space-size=8192 jobs: From 97041abab5f0846249343de07f592ba6fc421870 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 12 Oct 2024 17:09:55 +0800 Subject: [PATCH 04/18] feat: notifications logger --- apps/main/src/init.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index b7d28879d6..997800b3d4 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -12,6 +12,7 @@ import { getIconPath } from "./helper" import { t } from "./lib/i18n" import { store } from "./lib/store" import { updateNotificationsToken } from "./lib/user" +import { logger } from "./logger" import { registerAppMenu } from "./menu" import type { RendererHandlers } from "./renderer-handlers" import { initializeSentry } from "./sentry" @@ -154,12 +155,15 @@ const registerPushNotifications = async () => { persistentIds: persistentIds || [], credentials, }) + logger.info(`PushReceiver initialized with token ${credentials?.fcm?.token}`) instance.onCredentialsChanged(({ newCredentials }) => { + logger.info(`PushReceiver credentials changed to ${newCredentials?.fcm?.token}`) updateNotificationsToken(newCredentials) }) instance.onNotification((notification) => { + logger.info(`PushReceiver received notification: ${JSON.stringify(notification.message.data)}`) const data = notification.message.data as MessagingData switch (data.type) { case "new-entry": { From 75e02472908529259e13292cce685692832d9d9a Mon Sep 17 00:00:00 2001 From: Whitewater Date: Sat, 12 Oct 2024 02:33:40 -0800 Subject: [PATCH 05/18] refactor: revamp z-index usage (#864) * refactor: revamp z-index usage in root container * refactor: simplify modal structure and overlay handling * refactor: remove unnecessary z-index from SelectContent component * fix: update ModalOverlay to use Dialog.Overlay for improved dimiss behavior * feat: integrate ModalOverlay with default modal * refactor: extract ModalOverlay rendering into a variable for cleaner code * update Signed-off-by: Innei --------- Signed-off-by: Innei Co-authored-by: Innei --- .../ui/context-menu/context-menu.tsx | 2 +- .../ui/modal/stacked/declarative-modal.tsx | 11 ++---- .../src/components/ui/modal/stacked/modal.tsx | 32 +++++++++------ .../components/ui/modal/stacked/overlay.tsx | 11 ++++-- .../components/ui/modal/stacked/provider.tsx | 17 +------- apps/renderer/src/components/ui/select.tsx | 2 +- apps/renderer/src/modules/panel/cmdf.tsx | 39 ++++++++++--------- apps/renderer/src/pages/(main)/layout.tsx | 10 ++--- .../app-grid-layout-container-provider.tsx | 2 +- .../renderer/src/providers/root-providers.tsx | 13 ++++--- 10 files changed, 67 insertions(+), 72 deletions(-) diff --git a/apps/renderer/src/components/ui/context-menu/context-menu.tsx b/apps/renderer/src/components/ui/context-menu/context-menu.tsx index 1cec540a9f..8134de6d59 100644 --- a/apps/renderer/src/components/ui/context-menu/context-menu.tsx +++ b/apps/renderer/src/components/ui/context-menu/context-menu.tsx @@ -46,7 +46,7 @@ const ContextMenuSubContent = React.forwardRef< { @@ -40,12 +38,9 @@ const DeclarativeModalImpl: FC = ({ return ( {open && ( - <> - - {children} - - - + + {children} + )} ) diff --git a/apps/renderer/src/components/ui/modal/stacked/modal.tsx b/apps/renderer/src/components/ui/modal/stacked/modal.tsx index fcdd01cdb0..1a5189d427 100644 --- a/apps/renderer/src/components/ui/modal/stacked/modal.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/modal.tsx @@ -34,11 +34,12 @@ import { Divider } from "../../divider" import { RootPortalProvider } from "../../portal/provider" import { EllipsisHorizontalTextWithTooltip } from "../../typography" import { modalStackAtom } from "./atom" -import { MODAL_STACK_Z_INDEX, modalMontionConfig } from "./constants" +import { modalMontionConfig } from "./constants" import type { CurrentModalContentProps, ModalActionsInternal } from "./context" import { CurrentModalContext } from "./context" import { useResizeableModal } from "./hooks" -import type { ModalProps } from "./types" +import { ModalOverlay } from "./overlay" +import type { ModalOverlayOptions, ModalProps } from "./types" const DragBar = isElectronBuild ? ( @@ -51,9 +52,10 @@ export const ModalInternal = memo( index: number isTop: boolean + overlayOptions?: ModalOverlayOptions onClose?: (open: boolean) => void } & PropsWithChildren - >(function Modal({ item, index, onClose: onPropsClose, children, isTop }, ref) { + >(function Modal({ item, overlayOptions, onClose: onPropsClose, children, isTop }, ref) { const { CustomModalComponent, modalClassName, @@ -96,8 +98,8 @@ export const ModalInternal = memo( ) const opaque = useUISettingKey("modalOpaque") + const modalSettingOverlay = useUISettingKey("modalOverlay") - const zIndexStyle = useMemo(() => ({ zIndex: MODAL_STACK_Z_INDEX + index + 1 }), [index]) const dismiss = useCallback( (e: SyntheticEvent) => { e.stopPropagation() @@ -224,10 +226,7 @@ export const ModalInternal = memo( } }, [switchHotkeyScope]) - const modalStyle = useMemo( - () => ({ ...zIndexStyle, ...resizeableStyle }), - [resizeableStyle, zIndexStyle], - ) + const modalStyle = resizeableStyle const isSelectingRef = useRef(false) const handleSelectStart = useCallback(() => { isSelectingRef.current = true @@ -269,17 +268,27 @@ export const ModalInternal = memo( }, []) useImperativeHandle(ref, () => modalElementRef.current!) + + const Overlay = ( + + ) if (CustomModalComponent) { return ( + {Overlay} {title}
{DragBar}
+ {Overlay}
, ) => ( - + - + ), ) diff --git a/apps/renderer/src/components/ui/modal/stacked/provider.tsx b/apps/renderer/src/components/ui/modal/stacked/provider.tsx index 97996ba116..076fcec21e 100644 --- a/apps/renderer/src/components/ui/modal/stacked/provider.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/provider.tsx @@ -2,12 +2,8 @@ import { AnimatePresence } from "framer-motion" import { useAtomValue } from "jotai" import type { FC, PropsWithChildren } from "react" -import { useUISettingKey } from "~/atoms/settings/ui" - import { modalStackAtom } from "./atom" -import { MODAL_STACK_Z_INDEX } from "./constants" import { ModalInternal } from "./modal" -import { ModalOverlay } from "./overlay" export const ModalStackProvider: FC = ({ children }) => ( <> @@ -19,11 +15,6 @@ export const ModalStackProvider: FC = ({ children }) => ( const ModalStack = () => { const stack = useAtomValue(modalStackAtom) - const modalSettingOverlay = useUISettingKey("modalOverlay") - - const forceOverlay = stack.some((item) => item.overlay) - const allForceHideOverlay = stack.every((item) => item.overlay === false) - const topModalIndex = stack.findLastIndex((item) => item.modal) const overlayIndex = stack.findLastIndex((item) => item.overlay || item.modal) const overlayOptions = stack[overlayIndex]?.overlayOptions @@ -35,15 +26,9 @@ const ModalStack = () => { item={item} index={index * 2} isTop={index === topModalIndex * 2} + overlayOptions={overlayOptions} /> ))} - {stack.length > 0 && (modalSettingOverlay || forceOverlay) && !allForceHideOverlay && ( - - )} ) } diff --git a/apps/renderer/src/components/ui/select.tsx b/apps/renderer/src/components/ui/select.tsx index 7fd0af8b59..b4261c1d02 100644 --- a/apps/renderer/src/components/ui/select.tsx +++ b/apps/renderer/src/components/ui/select.tsx @@ -71,7 +71,7 @@ const SelectContent = React.forwardRef<
{ setShow(true) }) return ( - - {show && ( - - { - setShow(false) - }} - /> - - )} - + + + {show && ( + + { + setShow(false) + }} + /> + + )} + + ) } diff --git a/apps/renderer/src/pages/(main)/layout.tsx b/apps/renderer/src/pages/(main)/layout.tsx index f49abbf1c8..76144111e8 100644 --- a/apps/renderer/src/pages/(main)/layout.tsx +++ b/apps/renderer/src/pages/(main)/layout.tsx @@ -123,10 +123,6 @@ export function Component() { - - - {ELECTRON && } - {isAuthFail && !user && ( )} + + + + {ELECTRON && } ) } @@ -155,7 +155,7 @@ const RootContainer = forwardRef(({ children "--fo-feed-col-w": `${feedColWidth}px`, } as any } - className="flex h-screen overflow-hidden" + className="relative z-0 flex h-screen overflow-hidden" onContextMenu={preventDefault} > {children} diff --git a/apps/renderer/src/providers/app-grid-layout-container-provider.tsx b/apps/renderer/src/providers/app-grid-layout-container-provider.tsx index 3e1a9472cb..1a93092a35 100644 --- a/apps/renderer/src/providers/app-grid-layout-container-provider.tsx +++ b/apps/renderer/src/providers/app-grid-layout-container-provider.tsx @@ -28,7 +28,7 @@ export const AppLayoutGridContainerProvider: FC = ({ children return ( -
+
{children}
diff --git a/apps/renderer/src/providers/root-providers.tsx b/apps/renderer/src/providers/root-providers.tsx index c8076f7c38..c40cfbeef8 100644 --- a/apps/renderer/src/providers/root-providers.tsx +++ b/apps/renderer/src/providers/root-providers.tsx @@ -62,6 +62,13 @@ export const RootProviders: FC = ({ children }) => ( + + + + + {import.meta.env.DEV && } + {children} + @@ -69,12 +76,6 @@ export const RootProviders: FC = ({ children }) => ( - - - - - {import.meta.env.DEV && } - {children} From 45b4bd8085377e8178b6804c0718726ecc15145b Mon Sep 17 00:00:00 2001 From: cos Date: Sat, 12 Oct 2024 18:50:13 +0800 Subject: [PATCH 06/18] fix: windows web mark all read ui (#908) --- .../src/modules/entry-column/components/mark-all-button.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/modules/entry-column/components/mark-all-button.tsx b/apps/renderer/src/modules/entry-column/components/mark-all-button.tsx index 9614579733..f5cf458760 100644 --- a/apps/renderer/src/modules/entry-column/components/mark-all-button.tsx +++ b/apps/renderer/src/modules/entry-column/components/mark-all-button.tsx @@ -9,7 +9,7 @@ import { useOnClickOutside } from "usehooks-ts" import { ActionButton, Button, IconButton } from "~/components/ui/button" import { Kbd, KbdCombined } from "~/components/ui/kbd/Kbd" import { RootPortal } from "~/components/ui/portal" -import { ElECTRON_CUSTOM_TITLEBAR_HEIGHT, HotKeyScopeMap } from "~/constants" +import { ElECTRON_CUSTOM_TITLEBAR_HEIGHT, HotKeyScopeMap, isElectronBuild } from "~/constants" import { shortcuts } from "~/constants/shortcuts" import { useI18n } from "~/hooks/common" import { cn, getOS } from "~/lib/utils" @@ -51,7 +51,9 @@ export const MarkAllReadWithOverlay = forwardRef< Date: Sat, 12 Oct 2024 20:32:23 +0800 Subject: [PATCH 07/18] fix: add aria-describedby to modal content --- apps/renderer/src/components/ui/modal/stacked/modal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/components/ui/modal/stacked/modal.tsx b/apps/renderer/src/components/ui/modal/stacked/modal.tsx index 1a5189d427..1aabbfe515 100644 --- a/apps/renderer/src/components/ui/modal/stacked/modal.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/modal.tsx @@ -284,7 +284,7 @@ export const ModalInternal = memo( {Overlay} {title} - +
{Overlay} - +
Date: Sat, 12 Oct 2024 21:41:55 +0800 Subject: [PATCH 08/18] feat: support specific import for web and electron Signed-off-by: Innei --- .../src/providers/lazy/index.electron.ts | 5 +++ apps/renderer/src/providers/lazy/index.ts | 35 ++++++++++++++++ .../renderer/src/providers/root-providers.tsx | 36 ++++------------ apps/renderer/src/router.web.tsx | 29 +++++++++++++ electron.vite.config.ts | 3 ++ plugins/vite/deps.ts | 2 +- plugins/vite/specific-import.ts | 42 +++++++++++++++++++ vite.config.ts | 7 +++- 8 files changed, 129 insertions(+), 30 deletions(-) create mode 100644 apps/renderer/src/providers/lazy/index.electron.ts create mode 100644 apps/renderer/src/providers/lazy/index.ts create mode 100644 apps/renderer/src/router.web.tsx create mode 100644 plugins/vite/specific-import.ts diff --git a/apps/renderer/src/providers/lazy/index.electron.ts b/apps/renderer/src/providers/lazy/index.electron.ts new file mode 100644 index 0000000000..50a081c336 --- /dev/null +++ b/apps/renderer/src/providers/lazy/index.electron.ts @@ -0,0 +1,5 @@ +export { ContextMenuProvider as LazyContextMenuProvider } from "../context-menu-provider" +export { ExtensionExposeProvider as LazyExtensionExposeProvider } from "../extension-expose-provider" +export { LottieRenderContainer as LazyLottieRenderContainer } from "~/components/ui/lottie-container" +export { ModalStackProvider as LazyModalStackProvider } from "~/components/ui/modal" +export { FeatureFlagDebugger as LazyFeatureFlagDebugger } from "~/modules/ab/providers" diff --git a/apps/renderer/src/providers/lazy/index.ts b/apps/renderer/src/providers/lazy/index.ts new file mode 100644 index 0000000000..48d13bc5df --- /dev/null +++ b/apps/renderer/src/providers/lazy/index.ts @@ -0,0 +1,35 @@ +import { lazy } from "react" + +const LazyLottieRenderContainer = lazy(() => + import("../../components/ui/lottie-container").then((res) => ({ + default: res.LottieRenderContainer, + })), +) +const LazyContextMenuProvider = lazy(() => + import("./../context-menu-provider").then((res) => ({ + default: res.ContextMenuProvider, + })), +) +const LazyModalStackProvider = lazy(() => + import("../../components/ui/modal/stacked/provider").then((res) => ({ + default: res.ModalStackProvider, + })), +) + +const LazyExtensionExposeProvider = lazy(() => + import("./../extension-expose-provider").then((res) => ({ + default: res.ExtensionExposeProvider, + })), +) +const LazyFeatureFlagDebugger = lazy(() => + import("../../modules/ab/providers").then((res) => ({ + default: res.FeatureFlagDebugger, + })), +) +export { + LazyContextMenuProvider, + LazyExtensionExposeProvider, + LazyFeatureFlagDebugger, + LazyLottieRenderContainer, + LazyModalStackProvider, +} diff --git a/apps/renderer/src/providers/root-providers.tsx b/apps/renderer/src/providers/root-providers.tsx index c40cfbeef8..9b357e3a76 100644 --- a/apps/renderer/src/providers/root-providers.tsx +++ b/apps/renderer/src/providers/root-providers.tsx @@ -4,7 +4,7 @@ import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client import { LazyMotion, MotionConfig } from "framer-motion" import { Provider } from "jotai" import type { FC, PropsWithChildren } from "react" -import { lazy, Suspense } from "react" +import { Suspense } from "react" import { HotkeysProvider } from "react-hotkeys-hook" import { Toaster } from "~/components/ui/sonner" @@ -15,36 +15,18 @@ import { persistConfig, queryClient } from "~/lib/query-client" import { EventProvider } from "./event-provider" import { I18nProvider } from "./i18n-provider" import { InvalidateQueryProvider } from "./invalidate-query-provider" +import { + LazyContextMenuProvider, + LazyExtensionExposeProvider, + LazyFeatureFlagDebugger, + LazyLottieRenderContainer, + LazyModalStackProvider, + // specific import should add `index` postfix +} from "./lazy/index" import { SettingSync } from "./setting-sync" import { StableRouterProvider } from "./stable-router-provider" import { UserProvider } from "./user-provider" -const LazyLottieRenderContainer = lazy(() => - import("../components/ui/lottie-container").then((res) => ({ - default: res.LottieRenderContainer, - })), -) -const LazyContextMenuProvider = lazy(() => - import("./context-menu-provider").then((res) => ({ - default: res.ContextMenuProvider, - })), -) -const LazyModalStackProvider = lazy(() => - import("../components/ui/modal/stacked/provider").then((res) => ({ - default: res.ModalStackProvider, - })), -) - -const LazyExtensionExposeProvider = lazy(() => - import("./extension-expose-provider").then((res) => ({ - default: res.ExtensionExposeProvider, - })), -) -const LazyFeatureFlagDebugger = lazy(() => - import("../modules/ab/providers").then((res) => ({ - default: res.FeatureFlagDebugger, - })), -) const loadFeatures = () => import("../framer-lazy-feature").then((res) => res.default) export const RootProviders: FC = ({ children }) => ( diff --git a/apps/renderer/src/router.web.tsx b/apps/renderer/src/router.web.tsx new file mode 100644 index 0000000000..0bd90846ba --- /dev/null +++ b/apps/renderer/src/router.web.tsx @@ -0,0 +1,29 @@ +import { IN_ELECTRON } from "@follow/shared/constants" +import { wrapCreateBrowserRouter } from "@sentry/react" +import { createBrowserRouter, createHashRouter } from "react-router-dom" + +import { ErrorElement } from "./components/common/ErrorElement" +import { NotFound } from "./components/common/NotFound" +import { buildGlobRoutes } from "./lib/route-builder" + +const globTree = import.meta.glob("./pages/**/*.tsx") +const tree = buildGlobRoutes(globTree) + +let routerCreator = + IN_ELECTRON || globalThis["__DEBUG_PROXY__"] ? createHashRouter : createBrowserRouter +if (window.SENTRY_RELEASE) { + routerCreator = wrapCreateBrowserRouter(routerCreator) +} + +export const router = routerCreator([ + { + path: "/", + lazy: () => import("./App"), + children: tree, + errorElement: , + }, + { + path: "*", + element: , + }, +]) diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 200a59db61..7d159b1939 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -3,6 +3,7 @@ import { resolve } from "node:path" import { defineConfig } from "electron-vite" import { viteRenderBaseConfig } from "./configs/vite.render.config" +import { createPlatformSpecificImportPlugin } from "./plugins/vite/specific-import" export default defineConfig({ main: { @@ -41,6 +42,8 @@ export default defineConfig({ renderer: { ...viteRenderBaseConfig, + plugins: [...viteRenderBaseConfig.plugins, createPlatformSpecificImportPlugin(true)], + root: "apps/renderer", build: { outDir: "dist/renderer", diff --git a/plugins/vite/deps.ts b/plugins/vite/deps.ts index ebf8ee6fdf..1a24a0168f 100644 --- a/plugins/vite/deps.ts +++ b/plugins/vite/deps.ts @@ -1,6 +1,6 @@ import type { Plugin, UserConfig } from "vite" -export function createDependencyChunksPlugin(dependencies: string[] | string[][]): Plugin { +export function createDependencyChunksPlugin(dependencies: string[][]): Plugin { return { name: "dependency-chunks", config(config: UserConfig) { diff --git a/plugins/vite/specific-import.ts b/plugins/vite/specific-import.ts new file mode 100644 index 0000000000..6717fc261e --- /dev/null +++ b/plugins/vite/specific-import.ts @@ -0,0 +1,42 @@ +import type { Plugin } from "vite" + +export function createPlatformSpecificImportPlugin(isElectron = false): Plugin { + return { + name: "platform-specific-import", + enforce: "pre", + async resolveId(source, importer) { + if (!importer) { + return null + } + + const allowExts = [".js", ".jsx", ".ts", ".tsx"] + + if (!allowExts.some((ext) => importer.endsWith(ext))) return null + + if (importer.includes("node_modules")) return null + const [path, query] = source.split("?") + + if (path.startsWith(".") || path.startsWith("/")) { + const priorities = isElectron + ? [".electron.ts", ".electron.tsx", ".electron.js", ".electron.jsx"] + : [".web.ts", ".web.tsx", ".web.js", ".web.jsx"] + + for (const ext of priorities) { + const resolvedPath = await this.resolve( + `${path}${ext}${query ? `?${query}` : ""}`, + importer, + { + skipSelf: true, + }, + ) + + if (resolvedPath) { + return resolvedPath.id + } + } + } + + return null + }, + } +} diff --git a/vite.config.ts b/vite.config.ts index bce3faf326..f640893790 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,6 +11,7 @@ import { viteRenderBaseConfig } from "./configs/vite.render.config" import type { env as EnvType } from "./packages/shared/src/env" import { createDependencyChunksPlugin } from "./plugins/vite/deps" import { htmlInjectPlugin } from "./plugins/vite/html-inject" +import { createPlatformSpecificImportPlugin } from "./plugins/vite/specific-import" const __dirname = fileURLToPath(new URL(".", import.meta.url)) const isCI = process.env.CI === "true" || process.env.CI === "1" @@ -75,7 +76,8 @@ export default ({ mode }) => { devPrint(), createDependencyChunksPlugin([ // React framework - ["react", "react-dom", "react-router-dom", "react-error-boundary", "react-dom/server"], + ["react", "react-dom"], + ["react-error-boundary", "react-dom/server", "react-router-dom"], // Data Statement ["zustand", "jotai", "use-context-selector", "immer", "dexie"], // Remark @@ -131,7 +133,6 @@ export default ({ mode }) => { "@tanstack/react-query-persist-client", "@tanstack/query-sync-storage-persister", ], - ["blurhash", "react-blurhash"], ["tldts"], ["shiki", "@shikijs/transformers"], ["@sentry/react", "posthog-js"], @@ -139,6 +140,8 @@ export default ({ mode }) => { ["swiper"], ]), + + createPlatformSpecificImportPlugin(false), ], define: { From b541b484fcbf946ce56f987e2b7e33b8afff56bb Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 12 Oct 2024 22:11:49 +0800 Subject: [PATCH 09/18] chore: VITE_FIREBASE_CONFIG --- .github/workflows/nightly.yml | 1 + types/vite.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index eb896bc4da..de68a4c81b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,6 +10,7 @@ env: VITE_IMGPROXY_URL: ${{ vars.VITE_IMGPROXY_URL }} VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }} VITE_POSTHOG_KEY: ${{ vars.VITE_POSTHOG_KEY }} + VITE_FIREBASE_CONFIG: ${{ vars.VITE_FIREBASE_CONFIG }} NODE_OPTIONS: --max-old-space-size=8192 jobs: diff --git a/types/vite.d.ts b/types/vite.d.ts index bf3f5370b0..43f292ae00 100644 --- a/types/vite.d.ts +++ b/types/vite.d.ts @@ -6,6 +6,7 @@ interface ImportMetaEnv { VITE_IMGPROXY_URL: string VITE_SENTRY_DSN: string VITE_POSTHOG_KEY: string + VITE_FIREBASE_CONFIG: string } interface ImportMeta { From 728ea84fa6e9faff1990184285390a1d86eb2c56 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 12 Oct 2024 22:54:29 +0800 Subject: [PATCH 10/18] fix: init store after app init Signed-off-by: Innei --- apps/main/src/init.ts | 9 ++------- apps/main/src/lib/store.ts | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index 997800b3d4..f4de315739 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -19,10 +19,6 @@ import { initializeSentry } from "./sentry" import { router } from "./tipc" import { createMainWindow, getMainWindow } from "./window" -const appFolder = { - prod: "Follow", - dev: "Follow (dev)", -} if (process.argv.length === 3 && process.argv[2].startsWith("follow-dev:")) { process.env.NODE_ENV = "development" } @@ -32,7 +28,8 @@ const isDev = process.env.NODE_ENV === "development" * Mandatory and fast initializers for the app */ export function initializeAppStage0() { - app.setPath("appData", path.join(app.getPath("appData"), isDev ? appFolder.dev : appFolder.prod)) + if (isDev) app.setPath("appData", path.join(app.getPath("appData"), "Follow (dev)")) + initializeSentry() } export const initializeAppStage1 = () => { if (process.defaultApp) { @@ -45,8 +42,6 @@ export const initializeAppStage1 = () => { app.setAsDefaultProtocolClient(APP_PROTOCOL) } - initializeSentry() - registerIpcMain(router) if (app.dock) { diff --git a/apps/main/src/lib/store.ts b/apps/main/src/lib/store.ts index 0f0697d7af..2fa22bd30e 100644 --- a/apps/main/src/lib/store.ts +++ b/apps/main/src/lib/store.ts @@ -3,15 +3,26 @@ import { resolve } from "node:path" import { app } from "electron" import { JSONFileSyncPreset } from "lowdb/node" -const db = JSONFileSyncPreset(resolve(app.getPath("userData"), "db.json"), {}) as { +let db: { data: Record write: () => void read: () => void } +const createOrGetDb = () => { + if (!db) { + db = JSONFileSyncPreset(resolve(app.getPath("userData"), "db.json"), {}) as typeof db + } + return db +} export const store = { - get: (key: string) => db.data[key] as any, + get: (key: string) => { + const db = createOrGetDb() + + return db.data[key] as any + }, set: (key: string, value: any) => { + const db = createOrGetDb() db.data[key] = value db.write() }, From 2f5c3872e6c5d7ea6b9039ab8f86b30c4ab489be Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 12 Oct 2024 22:57:20 +0800 Subject: [PATCH 11/18] chore: firebase debug --- apps/main/src/init.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index f4de315739..14a1679ebf 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -145,12 +145,14 @@ const registerPushNotifications = async () => { updateNotificationsToken() const instance = new PushReceiver({ - debug: isDev, + debug: true, firebase: env.VITE_FIREBASE_CONFIG, persistentIds: persistentIds || [], credentials, }) - logger.info(`PushReceiver initialized with token ${credentials?.fcm?.token}`) + logger.info( + `PushReceiver initialized with token ${credentials?.fcm?.token} and firebase config ${env.VITE_FIREBASE_CONFIG}`, + ) instance.onCredentialsChanged(({ newCredentials }) => { logger.info(`PushReceiver credentials changed to ${newCredentials?.fcm?.token}`) From f196493b68a84489de93ac0c3944b039c79f25c0 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 13 Oct 2024 00:04:35 +0800 Subject: [PATCH 12/18] feat: add bundleId to PushReceiver --- apps/main/src/init.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index 14a1679ebf..88433af798 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -149,11 +149,17 @@ const registerPushNotifications = async () => { firebase: env.VITE_FIREBASE_CONFIG, persistentIds: persistentIds || [], credentials, + bundleId: "is.follow", + chromeId: "is.follow", }) logger.info( `PushReceiver initialized with token ${credentials?.fcm?.token} and firebase config ${env.VITE_FIREBASE_CONFIG}`, ) + instance.onReady(() => { + logger.info("PushReceiver ready") + }) + instance.onCredentialsChanged(({ newCredentials }) => { logger.info(`PushReceiver credentials changed to ${newCredentials?.fcm?.token}`) updateNotificationsToken(newCredentials) From a5bb6358082c7943dc63e3fb09455266b9c415e0 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 13 Oct 2024 01:15:23 +0800 Subject: [PATCH 13/18] chore: firebase debug --- apps/main/src/init.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index 88433af798..460f9f8150 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -148,12 +148,12 @@ const registerPushNotifications = async () => { debug: true, firebase: env.VITE_FIREBASE_CONFIG, persistentIds: persistentIds || [], - credentials, + credentials: credentials || null, bundleId: "is.follow", chromeId: "is.follow", }) logger.info( - `PushReceiver initialized with token ${credentials?.fcm?.token} and firebase config ${env.VITE_FIREBASE_CONFIG}`, + `PushReceiver initialized with credentials ${JSON.stringify(credentials)} and firebase config ${env.VITE_FIREBASE_CONFIG}`, ) instance.onReady(() => { @@ -199,4 +199,6 @@ const registerPushNotifications = async () => { }) await instance.connect() + + logger.info("PushReceiver connected") } From 880947563cea512fb30177edc4be50fc961478fc Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 13 Oct 2024 01:28:29 +0800 Subject: [PATCH 14/18] chore: firebase debug --- apps/main/src/init.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index 460f9f8150..c6351c5d50 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -198,7 +198,11 @@ const registerPushNotifications = async () => { store.set(persistentIdsKey, instance.persistentIds) }) - await instance.connect() + try { + await instance.connect() + } catch (error) { + logger.error(`PushReceiver error: ${error}`) + } logger.info("PushReceiver connected") } From b2916bd8b81d02e1f5b673ed34c7f0f181d641c2 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 13 Oct 2024 01:52:14 +0800 Subject: [PATCH 15/18] fix: json parse for env VITE_FIREBASE_CONFIG --- apps/main/src/init.ts | 4 ++-- packages/shared/src/env.ts | 22 +--------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/apps/main/src/init.ts b/apps/main/src/init.ts index c6351c5d50..f077c68da2 100644 --- a/apps/main/src/init.ts +++ b/apps/main/src/init.ts @@ -146,7 +146,7 @@ const registerPushNotifications = async () => { const instance = new PushReceiver({ debug: true, - firebase: env.VITE_FIREBASE_CONFIG, + firebase: JSON.parse(env.VITE_FIREBASE_CONFIG), persistentIds: persistentIds || [], credentials: credentials || null, bundleId: "is.follow", @@ -201,7 +201,7 @@ const registerPushNotifications = async () => { try { await instance.connect() } catch (error) { - logger.error(`PushReceiver error: ${error}`) + logger.error(`PushReceiver error: ${error instanceof Error ? error.stack : error}`) } logger.info("PushReceiver connected") diff --git a/packages/shared/src/env.ts b/packages/shared/src/env.ts index 9633434242..ae29ed5102 100644 --- a/packages/shared/src/env.ts +++ b/packages/shared/src/env.ts @@ -11,27 +11,7 @@ export const env = createEnv({ VITE_SENTRY_DSN: z.string().optional(), VITE_POSTHOG_KEY: z.string().optional(), VITE_INBOXES_EMAIL: z.string().default("@follow.re"), - VITE_FIREBASE_CONFIG: z - .string() - .transform((content) => { - try { - return JSON.parse(content) - } catch { - return z.NEVER - } - }) - .pipe( - z.object({ - apiKey: z.string(), - authDomain: z.string(), - projectId: z.string(), - storageBucket: z.string(), - messagingSenderId: z.string(), - appId: z.string(), - measurementId: z.string(), - }), - ) - .optional(), + VITE_FIREBASE_CONFIG: z.string().optional(), }, emptyStringAsUndefined: true, From fac97f1e9863a9e93cb80751ad313583003cbb5f Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 13 Oct 2024 02:42:13 +0800 Subject: [PATCH 16/18] chore(release): release v0.0.1-alpha.21 --- CHANGELOG.md | 10 +++++++++- package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09fa12b38b..ca733950de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## [0.0.1-alpha.20](https://github.com/RSSNext/follow/compare/v0.0.1-alpha.19...v0.0.1-alpha.20) (2024-10-12) +## [0.0.1-alpha.21](https://github.com/RSSNext/follow/compare/v0.0.1-alpha.19...v0.0.1-alpha.21) (2024-10-12) ### Bug Fixes @@ -17,6 +17,7 @@ * accept import opml ([39ecc82](https://github.com/RSSNext/follow/commit/39ecc82a8ceecd77139ffccb31a33904082a3d1b)) * **achievement:** loading button style ([96bb514](https://github.com/RSSNext/follow/commit/96bb51425427864bc4e77b75808271371839c57a)) * add app version on posthog ([9933463](https://github.com/RSSNext/follow/commit/99334639e28b2a2a17b9c3fdd64f0d6d37bdd181)) +* add aria-describedby to modal content ([bb463a3](https://github.com/RSSNext/follow/commit/bb463a311fe020d079ed021489239a9141246a48)) * add bg when context menu trigger, fix [#389](https://github.com/RSSNext/follow/issues/389) ([53f3185](https://github.com/RSSNext/follow/commit/53f3185e7955d1a72912905d8565c5efb0a0bda0)) * add copy image in electron, fix [#317](https://github.com/RSSNext/follow/issues/317) ([466e0b7](https://github.com/RSSNext/follow/commit/466e0b78ccc5df66ab11a1e71a800e70c9b34312)) * add db index ([a888a78](https://github.com/RSSNext/follow/commit/a888a789e10ecd8b3fab713e859bfe9f56bfe0ad)) @@ -246,6 +247,7 @@ * improve proxy URI handling ([#810](https://github.com/RSSNext/follow/issues/810)) ([e7e930d](https://github.com/RSSNext/follow/commit/e7e930d1771e19d909433021d6757eabb44de73f)) * inbox data refreshment ([a3a7c82](https://github.com/RSSNext/follow/commit/a3a7c82ea6308756a800514d9df528815ba77781)) * incorrect tooltip in read history ([#385](https://github.com/RSSNext/follow/issues/385)) ([cabe210](https://github.com/RSSNext/follow/commit/cabe210aaf8f4a1133fa653532874fa86d02c252)) +* init store after app init ([728ea84](https://github.com/RSSNext/follow/commit/728ea84fa6e9faff1990184285390a1d86eb2c56)) * inline table style ([5837bd4](https://github.com/RSSNext/follow/commit/5837bd4089b59855d0b583aed5d0e97fce04e094)) * input box table style ([e0890d5](https://github.com/RSSNext/follow/commit/e0890d5b388facd1f9c16ac706a32f0aa2efdef5)) * Input issues fixed [#535](https://github.com/RSSNext/follow/issues/535),[#536](https://github.com/RSSNext/follow/issues/536) ([3d48637](https://github.com/RSSNext/follow/commit/3d486379b91dff13bfbcc90532efd3e186405a13)) @@ -254,6 +256,7 @@ * invitation page error display area ([5915357](https://github.com/RSSNext/follow/commit/59153573d8a5d368adfe41b0f5cebc4d6d44a9f3)) * **invitation:** reset app data then logout ([5933cea](https://github.com/RSSNext/follow/commit/5933ceab63de0a7a46e85d0b841acbf893d8fcec)) * **item:** center content if no desc ([18e26a4](https://github.com/RSSNext/follow/commit/18e26a41c3cf80316bc97c44a1239e6ec45c5db9)) +* json parse for env VITE_FIREBASE_CONFIG ([b2916bd](https://github.com/RSSNext/follow/commit/b2916bd8b81d02e1f5b673ed34c7f0f181d641c2)) * kbd cls and set home scope in shortcuts guideline ([d9999a3](https://github.com/RSSNext/follow/commit/d9999a3fc6cfeae0f3b45b6390cf79d9135566b7)) * lang/*.json ([#526](https://github.com/RSSNext/follow/issues/526)) ([be3b2e7](https://github.com/RSSNext/follow/commit/be3b2e7503c1061a1e312394bb0c3556e39ec062)) * language setting syncing ([fa1dc5d](https://github.com/RSSNext/follow/commit/fa1dc5df35a2225bb22320a8fc049d3c0b75fa5b)) @@ -507,6 +510,7 @@ * user modal list padding ([992ea15](https://github.com/RSSNext/follow/commit/992ea1594af02e3815adae2fe99de4f205543239)) * user profile can not scroll by scrollbar ([eac1965](https://github.com/RSSNext/follow/commit/eac1965cfc3d2bc86e11f256237322f15892b897)) * userActions in feed store ([8da4fb7](https://github.com/RSSNext/follow/commit/8da4fb71d9cc14832bc985cf8c1bd6f04dbe4e4c)) +* **vercel:** filter subpath ([fc38072](https://github.com/RSSNext/follow/commit/fc38072320f8225e6ae60f4e25719eaeb9ff5e6a)) * video preview ([e38820c](https://github.com/RSSNext/follow/commit/e38820c1aa2294f45e05d331bf4bce0e4d8efb44)) * view icon color in dark mode ([991bff7](https://github.com/RSSNext/follow/commit/991bff7660e93b872f1398c89c0fe4316f4327d9)) * view source content in picture view ([16938f6](https://github.com/RSSNext/follow/commit/16938f60786f8496152361405c0fcff4635f7d59)) @@ -522,6 +526,7 @@ * windows maximize will lost frame and background material ([2bd0e78](https://github.com/RSSNext/follow/commit/2bd0e78e4f859d9c98f53f748c9871a41348db1c)) * windows multi-display ([7490cd1](https://github.com/RSSNext/follow/commit/7490cd12d0e42a7f41931acd9d77bf64be39a26d)) * windows sep, fixes [#741](https://github.com/RSSNext/follow/issues/741) ([9b1de77](https://github.com/RSSNext/follow/commit/9b1de775d2157606c30c4ece3287a42e1e9463a3)) +* windows web mark all read ui ([#908](https://github.com/RSSNext/follow/issues/908)) ([45b4bd8](https://github.com/RSSNext/follow/commit/45b4bd8085377e8178b6804c0718726ecc15145b)) * **windows:** dont remove locale ([7305eba](https://github.com/RSSNext/follow/commit/7305eba3fee218330818d96ca155f833aa99d631)) * **windows:** skip remove locle ([5df82d0](https://github.com/RSSNext/follow/commit/5df82d0c0f98bebb6e78a694a6ceda3644eb36ef)) * withdraw availableBalance ([167d82a](https://github.com/RSSNext/follow/commit/167d82adc061078102fa9984d29f94735d052ce9)) @@ -541,6 +546,7 @@ * add biz code i18n for fr and ru ([#521](https://github.com/RSSNext/follow/issues/521)) ([0dc4b86](https://github.com/RSSNext/follow/commit/0dc4b866d7eff2d32df2158902d6d1fbdea41f27)) * add biz code i18n for zh-cn ([#503](https://github.com/RSSNext/follow/issues/503)) ([d35e011](https://github.com/RSSNext/follow/commit/d35e0119953a154d18273c1d155f14d03c9a6ce8)) * add biz user info on sentry tracker ([e3e52ab](https://github.com/RSSNext/follow/commit/e3e52abedeb5507ca71d663faa7ef050b661cf0a)) +* add bundleId to PushReceiver ([f196493](https://github.com/RSSNext/follow/commit/f196493b68a84489de93ac0c3944b039c79f25c0)) * add copy title to context menu of feed entry ([#801](https://github.com/RSSNext/follow/issues/801)) ([1f57ab2](https://github.com/RSSNext/follow/commit/1f57ab2ac76ef04aff37814b4c7e961ad33b6e11)) * add discover back to top fab ([a97e60c](https://github.com/RSSNext/follow/commit/a97e60cd005ca7ebb5aed56655b94975ebf1ccb7)) * add divider when sticky for date item ([755e292](https://github.com/RSSNext/follow/commit/755e292af05c3adeae8943cc5c4c05af11d30d16)) @@ -705,6 +711,7 @@ * new power page ([c3630f8](https://github.com/RSSNext/follow/commit/c3630f85bd221ecf875b20337e5c6a452c613362)) * no media available tip in picture item ([1d4fca4](https://github.com/RSSNext/follow/commit/1d4fca4e7d0e7c6f02f1ac775f36079ef5ce1129)) * no media available tip in picture item ([58d9b3b](https://github.com/RSSNext/follow/commit/58d9b3b1b09f52def911521c08d9835f31221401)) +* notifications logger ([97041ab](https://github.com/RSSNext/follow/commit/97041abab5f0846249343de07f592ba6fc421870)) * only closing window can trigger query invalidation ([a8e48f4](https://github.com/RSSNext/follow/commit/a8e48f493127104035e9537e0461c4a40e2dc339)) * only show has media entry item in picture view ([f7dedf2](https://github.com/RSSNext/follow/commit/f7dedf2b27f2597a49e9381af5581b6d0550421b)) * optimize 404 page ([f51b1e2](https://github.com/RSSNext/follow/commit/f51b1e2de9e8d8c3bdea9db79476c17cd7247a4b)) @@ -763,6 +770,7 @@ * support pageup/pagedown to scroll up/down ([6e0c3bc](https://github.com/RSSNext/follow/commit/6e0c3bc5e3e2437a51fa991940b4e4496ed2bb75)) * support setting proxy for app ([#452](https://github.com/RSSNext/follow/issues/452)) ([cfd5275](https://github.com/RSSNext/follow/commit/cfd527545ade50a529698bdd57ec16d0f3ccee98)) * support shortcut to toggle wide mode ([b7a054f](https://github.com/RSSNext/follow/commit/b7a054f3132079693f0d93a65eb236c95920bcb8)) +* support specific import for web and electron ([9a84a29](https://github.com/RSSNext/follow/commit/9a84a293967d5d415e86041c7a586846519def5f)) * support toc parser ([fb4ca52](https://github.com/RSSNext/follow/commit/fb4ca522440aced4d2aa18fda2a9d5c43e32d0d1)) * sync indicator when disable ([945ddda](https://github.com/RSSNext/follow/commit/945dddae2534f07e5289e307c36de1f8334636bc)) * tiny styles ([78bcc55](https://github.com/RSSNext/follow/commit/78bcc5562baa12cece51da6564b77c6f37a1596c)) diff --git a/package.json b/package.json index 3647b212eb..41d218a661 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Follow", "type": "module", - "version": "0.0.1-alpha.20", + "version": "0.0.1-alpha.21", "private": true, "packageManager": "pnpm@9.11.0", "description": "Next generation information browser", From 795dccbfc5320e7371f88a0e8740611a562c7e95 Mon Sep 17 00:00:00 2001 From: Jerry Wong Date: Sun, 13 Oct 2024 12:10:54 +0800 Subject: [PATCH 17/18] fix: power page z-index (#910) * refactor: optimize CSS classes in EntryPlaceholderLogo and TableHeader Simplify CSS classes in EntryPlaceholderLogo component and remove unnecessary z-index usage in TableHeader component. * update Signed-off-by: Innei --------- Signed-off-by: Innei Co-authored-by: Innei --- .../components/EntryPlaceholderLogo.tsx | 4 +- .../power/transaction-section/index.tsx | 2 +- .../modules/profile/user-profile-modal.tsx | 2 +- locales/app/zh-HK.json | 47 ++++++++++--------- locales/common/zh-HK.json | 1 + locales/settings/zh-HK.json | 8 +++- 6 files changed, 36 insertions(+), 28 deletions(-) diff --git a/apps/renderer/src/modules/entry-content/components/EntryPlaceholderLogo.tsx b/apps/renderer/src/modules/entry-content/components/EntryPlaceholderLogo.tsx index f210a4f6fb..829d6b8bd1 100644 --- a/apps/renderer/src/modules/entry-content/components/EntryPlaceholderLogo.tsx +++ b/apps/renderer/src/modules/entry-content/components/EntryPlaceholderLogo.tsx @@ -14,12 +14,12 @@ export const EntryPlaceholderLogo = () => {
- {title} +
{title}
) } diff --git a/apps/renderer/src/modules/power/transaction-section/index.tsx b/apps/renderer/src/modules/power/transaction-section/index.tsx index 104a9c14f6..ea3cd63d27 100644 --- a/apps/renderer/src/modules/power/transaction-section/index.tsx +++ b/apps/renderer/src/modules/power/transaction-section/index.tsx @@ -56,7 +56,7 @@ export const TransactionsSection: Component = ({ className }) => {
- + {t("wallet.transactions.type")} {t("wallet.transactions.amount")} diff --git a/apps/renderer/src/modules/profile/user-profile-modal.tsx b/apps/renderer/src/modules/profile/user-profile-modal.tsx index dcf79838df..be195584f9 100644 --- a/apps/renderer/src/modules/profile/user-profile-modal.tsx +++ b/apps/renderer/src/modules/profile/user-profile-modal.tsx @@ -398,7 +398,7 @@ const SubscriptionItem: FC<{ !isLoose && "flex items-center", )} > -
{subscription.feeds?.title}
+
{subscription.feeds?.title}
{isLoose && (
{subscription.feeds?.description} diff --git a/locales/app/zh-HK.json b/locales/app/zh-HK.json index a4d0646de4..509e3234e7 100644 --- a/locales/app/zh-HK.json +++ b/locales/app/zh-HK.json @@ -54,9 +54,9 @@ "entry_actions.copied_notify": "{{which}}已複製到剪貼板", "entry_actions.copy_link": "複製連結", "entry_actions.copy_title": "複製標題", - "entry_actions.failed_to_save_to_eagle": "無法保存至 Eagle。", - "entry_actions.failed_to_save_to_instapaper": "無法保存至 Instapaper。", - "entry_actions.failed_to_save_to_readwise": "無法保存至 Readwise。", + "entry_actions.failed_to_save_to_eagle": "無法保存至 Eagle", + "entry_actions.failed_to_save_to_instapaper": "無法保存至 Instapaper", + "entry_actions.failed_to_save_to_readwise": "無法保存至 Readwise", "entry_actions.mark_as_read": "標記為已讀", "entry_actions.mark_as_unread": "標記為未讀", "entry_actions.open_in_browser": "在{{which}}中開啟", @@ -64,17 +64,17 @@ "entry_actions.save_media_to_eagle": "保存媒體至 Eagle", "entry_actions.save_to_instapaper": "保存至 Instapaper", "entry_actions.save_to_readwise": "保存至 Readwise", - "entry_actions.saved_to_eagle": "已保存至 Eagle。", - "entry_actions.saved_to_instapaper": "已保存至 Instapaper。", - "entry_actions.saved_to_readwise": "已保存至 Readwise。", + "entry_actions.saved_to_eagle": "已保存至 Eagle", + "entry_actions.saved_to_instapaper": "已保存至 Instapaper", + "entry_actions.saved_to_readwise": "已保存至 Readwise", "entry_actions.share": "分享", "entry_actions.star": "收藏", - "entry_actions.starred": "已收藏。", + "entry_actions.starred": "已收藏", "entry_actions.tip": "贊助", "entry_actions.unstar": "取消收藏", - "entry_actions.unstarred": "已取消收藏。", + "entry_actions.unstarred": "已取消收藏", "entry_actions.view_source_content": "查看原始內容", - "entry_column.filtered_content_tip": "你已隱藏篩選內容。", + "entry_column.filtered_content_tip": "你已隱藏篩選內容", "entry_column.filtered_content_tip_2": "除了以上顯示的條目,還有一些已篩選的內容。", "entry_column.refreshing": "刷新新條目中...", "entry_content.ai_summary": "AI 摘要", @@ -85,12 +85,12 @@ "entry_content.readability_notice": "此內容由 Readability 提供。如果你發現排版異常,請到來源網站查看原始內容。", "entry_content.render_error": "渲染錯誤:", "entry_content.report_issue": "報告問題", - "entry_content.support_amount": "{{amount}} 人支持了此訂閱源的創作者。", + "entry_content.support_amount": "{{amount}} 人支持了此訂閱源的創作者", "entry_content.support_creator": "支持創作者", "entry_content.web_app_notice": "網頁應用可能不支持此內容類型。你可以下載桌面應用程式。", "entry_list.zero_unread": "全部已讀", "entry_list_header.daily_report": "每日報告", - "entry_list_header.hide_no_image_items": "隱藏沒有圖片的條目。", + "entry_list_header.hide_no_image_items": "隱藏沒有圖片的條目", "entry_list_header.items": "項目", "entry_list_header.new_entries_available": "有新條目可用", "entry_list_header.refetch": "重新抓取", @@ -105,12 +105,12 @@ "entry_list_header.unread": "未讀", "feed_claim_modal.choose_verification_method": "有三種驗證方法可選,你可以選擇其中一種進行驗證。", "feed_claim_modal.claim_button": "認領", - "feed_claim_modal.content_instructions": "複製以下內容並貼到你最新的 RSS 訂閱源中。", + "feed_claim_modal.content_instructions": "複製以下內容並貼到你最新的 RSS 訂閱源中", "feed_claim_modal.description_current": "當前描述:", - "feed_claim_modal.description_instructions": "複製以下內容並貼到你的 RSS 訂閱源中的 欄位。", + "feed_claim_modal.description_instructions": "複製以下內容並貼到你的 RSS 訂閱源中的 欄位", "feed_claim_modal.failed_to_load": "無法加載認領信息", "feed_claim_modal.rss_format_choice": "RSS 生成器通常有兩種格式可選。請根據需要複製以下的 XML 和 JSON 格式。", - "feed_claim_modal.rss_instructions": "複製以下代碼並貼到你的 RSS 生成器中。", + "feed_claim_modal.rss_instructions": "複製以下代碼並貼到你的 RSS 生成器中", "feed_claim_modal.rss_json_format": "JSON 格式", "feed_claim_modal.rss_xml_format": "XML 格式", "feed_claim_modal.rsshub_notice": "此訂閱源由 RSSHub 提供,緩存時間為 1 小時。發布內容後,請等待最多 1 小時更改才能生效。", @@ -122,23 +122,23 @@ "feed_form.add_follow": "新增關注", "feed_form.category": "分類", "feed_form.category_description": "默認情況下,你的關注會按網站分組。", - "feed_form.error_fetching_feed": "獲取訂閱源時出錯。", + "feed_form.error_fetching_feed": "獲取訂閱源時出錯", "feed_form.fee": "跟隨費用", "feed_form.fee_description": "要跟隨此清單,您必須向清單創建者支付費用。", - "feed_form.feed_not_found": "未找到相關資訊流。", + "feed_form.feed_not_found": "未找到相關資訊流", "feed_form.feedback": "反饋", "feed_form.follow": "關注", "feed_form.follow_with_fee": "跟隨需要 {{fee}} Power", - "feed_form.followed": "🎉 已關注。", + "feed_form.followed": "🎉 已關注", "feed_form.private_follow": "私人關注", - "feed_form.private_follow_description": "此關注是否在你的個人資料頁面上公開可見。", + "feed_form.private_follow_description": "此關注是否在你的個人資料頁面上公開可見", "feed_form.retry": "重試", "feed_form.title": "標題", "feed_form.title_description": "此資訊流的自定義標題。留空則使用默認標題。", "feed_form.unfollow": "取消關注", "feed_form.update": "更新", "feed_form.update_follow": "更新關注", - "feed_form.updated": "🎉 已更新。", + "feed_form.updated": "🎉 已更新", "feed_form.view": "視圖", "feed_item.claimed_by_owner": "訂閲源所有者", "feed_item.claimed_by_unknown": "未知所有者", @@ -152,7 +152,7 @@ "feed_view_type.pictures": "圖片", "feed_view_type.social_media": "社交媒體", "feed_view_type.videos": "視頻", - "mark_all_read_button.auto_confirm_info": "將在 3 秒後自動確認。", + "mark_all_read_button.auto_confirm_info": "將在 3 秒後自動確認", "mark_all_read_button.confirm": "確認", "mark_all_read_button.confirm_mark_all": "確定將 標記為已讀?", "mark_all_read_button.confirm_mark_all_info": "確定將所有標記為已讀?", @@ -163,7 +163,7 @@ "notify.unSupportWidth": "{{app_name}} 目前尚未支援流動裝置", "notify.unSupportWidth_1": "您的裝置寬度為 {{width}},低於支援的最小寬度 {{minWidth}}", "notify.unSupportWidth_2": "請切換至桌面應用程式繼續使用 {{app_name}}
下載連結:", - "notify.unfollow_feed": "已取消關注 。", + "notify.unfollow_feed": "已取消關注 ", "notify.update_info": "{{app_name}} 已準備好更新!", "notify.update_info_1": "點擊以重新啟動", "player.back_10s": "倒退 10 秒", @@ -181,7 +181,7 @@ "player.volume": "音量", "resize.tooltip.double_click_to_collapse": "雙擊以摺疊", "resize.tooltip.drag_to_resize": "拖曳以調整大小", - "search.empty.no_results": "未找到結果。", + "search.empty.no_results": "未找到結果", "search.group.entries": "條目", "search.group.feeds": "訂閱源", "search.options.all": "所有", @@ -239,7 +239,7 @@ "tip_modal.feed_owner": "訂閱源擁有者", "tip_modal.low_balance": "你的餘額不足以覆蓋此贊助。請調整金額。", "tip_modal.no_wallet": "你尚未擁有錢包。請創建一個錢包以進行贊助。", - "tip_modal.tip_amount_sent": "已經發送給作者。", + "tip_modal.tip_amount_sent": "已經發送給作者", "tip_modal.tip_now": "立刻贊助", "tip_modal.tip_sent": "贊助成功!感謝你的支持。", "tip_modal.tip_support": "⭐ 贊助以顯示你的支持!", @@ -284,6 +284,7 @@ "words.search": "搜尋", "words.starred": "收藏", "words.title": "標題", + "words.transform": "轉換", "words.trending": "熱門", "words.undo": "撤銷", "words.unread": "未讀", diff --git a/locales/common/zh-HK.json b/locales/common/zh-HK.json index 8f7c2df5a3..a948663a42 100644 --- a/locales/common/zh-HK.json +++ b/locales/common/zh-HK.json @@ -16,6 +16,7 @@ "words.back": "返回", "words.copy": "複製", "words.create": "創建", + "words.delete": "刪除", "words.edit": "編輯", "words.entry": "條目", "words.id": "ID", diff --git a/locales/settings/zh-HK.json b/locales/settings/zh-HK.json index 61124c83de..385e08ac97 100644 --- a/locales/settings/zh-HK.json +++ b/locales/settings/zh-HK.json @@ -89,6 +89,9 @@ "general.app": "應用程式", "general.data_persist.description": "本地保存數據以啟用離線存取和本地搜尋。", "general.data_persist.label": "離線使用時保留數據", + "general.export.button": "匯出", + "general.export.description": "匯出你的訂閱到 OPML 文件", + "general.export.label": "匯出訂閱", "general.group_by_date.description": "按日期分組條目。", "general.group_by_date.label": "按日期分組", "general.language": "語言", @@ -159,6 +162,8 @@ "lists.create": "建立新清單", "lists.created.error": "建立清單失敗。", "lists.created.success": "成功建立清單!", + "lists.delete.error": "刪除清單失敗。", + "lists.delete.success": "成功刪除清單!", "lists.description": "描述", "lists.earnings": "收益", "lists.edit.error": "編輯清單失敗。", @@ -184,7 +189,7 @@ "lists.submit": "提交", "lists.subscriptions": "訂閱", "lists.title": "標題", - "lists.view": "查看", + "lists.view": "視圖", "profile.avatar.label": "頭像", "profile.handle.description": "你的唯一識別符。", "profile.handle.label": "識別符", @@ -226,6 +231,7 @@ "wallet.transactions.to": "發送至", "wallet.transactions.tx": "交易", "wallet.transactions.type": "類型", + "wallet.transactions.types.all": "全部", "wallet.transactions.types.burn": "銷燬", "wallet.transactions.types.mint": "鑄造", "wallet.transactions.types.purchase": "購買", From 719f1dae0e9762218b9e3c24b0aec2ced7f382be Mon Sep 17 00:00:00 2001 From: Kevin Cui Date: Sun, 13 Oct 2024 12:11:22 +0800 Subject: [PATCH 18/18] fix: app icon incorrect in Windows Control Panel (#899) Close: https://discord.com/channels/1243823539426033696/1294232031148118088 Signed-off-by: Kevin Cui --- forge.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/forge.config.ts b/forge.config.ts index e579a28095..3eea4a775d 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -154,6 +154,7 @@ const config: ForgeConfig = { new MakerSquirrel({ name: "Follow", setupIcon: "resources/icon.ico", + iconUrl: "https://app.follow.is/favicon.ico", }), new MakerAppImage({ options: {