Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(web): disable notification center (#2934)

Alex Yang4adbe64a5418
diff --git a/apps/web/preset.config.mjs b/apps/web/preset.config.mjs
index 6d3a9849aa..46e47685c8 100644
--- a/apps/web/preset.config.mjs
+++ b/apps/web/preset.config.mjs
@@ -30,6 +30,7 @@ const buildPreset = {
enableNewSettingModal: false,
enableNewSettingUnstableApi: false,
enableSQLiteProvider: false,
+ enableNotificationCenter: false,
},
beta: {},
internal: {},
@@ -46,6 +47,7 @@ const buildPreset = {
enableNewSettingModal: true,
enableNewSettingUnstableApi: false,
enableSQLiteProvider: false,
+ enableNotificationCenter: true,
},
};
@@ -90,6 +92,9 @@ const environmentPreset = {
enableNewSettingUnstableApi: process.env.ENABLE_NEW_SETTING_UNSTABLE_API
? process.env.ENABLE_NEW_SETTING_UNSTABLE_API === 'true'
: currentBuildPreset.enableNewSettingUnstableApi,
+ enableNotificationCenter: process.env.ENABLE_NOTIFICATION_CENTER
+ ? process.env.ENABLE_NOTIFICATION_CENTER === 'true'
+ : currentBuildPreset.enableNotificationCenter,
};
/**
diff --git a/apps/web/src/layouts/workspace-layout.tsx b/apps/web/src/layouts/workspace-layout.tsx
index 3dc3caae02..5d7137e453 100644
--- a/apps/web/src/layouts/workspace-layout.tsx
+++ b/apps/web/src/layouts/workspace-layout.tsx
@@ -445,7 +445,7 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
<PageListTitleCellDragOverlay />
</DndContext>
<QuickSearch />
- <NotificationCenter />
+ {runtimeConfig.enableNotificationCenter && <NotificationCenter />}
<Setting />
</>
);
diff --git a/packages/env/src/global.ts b/packages/env/src/global.ts
index 70c104c760..d48f720b82 100644
--- a/packages/env/src/global.ts
+++ b/packages/env/src/global.ts
@@ -63,6 +63,7 @@ export const buildFlagsSchema = z.object({
enableNewSettingModal: z.boolean(),
enableNewSettingUnstableApi: z.boolean(),
enableSQLiteProvider: z.boolean(),
+ enableNotificationCenter: z.boolean(),
});
export const blockSuiteFeatureFlags = z.object({