mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
chore(core): remove journal experimental flag (#5698)
This commit is contained in:
Vendored
-1
@@ -30,7 +30,6 @@ export const runtimeFlagsSchema = z.object({
|
|||||||
enableEnhanceShareMode: z.boolean(),
|
enableEnhanceShareMode: z.boolean(),
|
||||||
enablePayment: z.boolean(),
|
enablePayment: z.boolean(),
|
||||||
enablePageHistory: z.boolean(),
|
enablePageHistory: z.boolean(),
|
||||||
enableJournal: z.boolean(),
|
|
||||||
// this is for the electron app
|
// this is for the electron app
|
||||||
serverUrlPrefix: z.string(),
|
serverUrlPrefix: z.string(),
|
||||||
enableMoveDatabase: z.boolean(),
|
enableMoveDatabase: z.boolean(),
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enableEnhanceShareMode: false,
|
enableEnhanceShareMode: false,
|
||||||
enablePayment: true,
|
enablePayment: true,
|
||||||
enablePageHistory: true,
|
enablePageHistory: true,
|
||||||
enableJournal: false,
|
|
||||||
serverUrlPrefix: 'https://app.affine.pro',
|
serverUrlPrefix: 'https://app.affine.pro',
|
||||||
editorFlags,
|
editorFlags,
|
||||||
appVersion: packageJson.version,
|
appVersion: packageJson.version,
|
||||||
@@ -42,7 +41,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
return {
|
return {
|
||||||
...this.stable,
|
...this.stable,
|
||||||
enablePageHistory: true,
|
enablePageHistory: true,
|
||||||
enableJournal: false,
|
|
||||||
serverUrlPrefix: 'https://insider.affine.pro',
|
serverUrlPrefix: 'https://insider.affine.pro',
|
||||||
appBuildType: 'beta' as const,
|
appBuildType: 'beta' as const,
|
||||||
};
|
};
|
||||||
@@ -74,7 +72,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enableEnhanceShareMode: false,
|
enableEnhanceShareMode: false,
|
||||||
enablePayment: true,
|
enablePayment: true,
|
||||||
enablePageHistory: true,
|
enablePageHistory: true,
|
||||||
enableJournal: true,
|
|
||||||
serverUrlPrefix: 'https://affine.fail',
|
serverUrlPrefix: 'https://affine.fail',
|
||||||
editorFlags,
|
editorFlags,
|
||||||
appVersion: packageJson.version,
|
appVersion: packageJson.version,
|
||||||
@@ -138,11 +135,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
: buildFlags.mode === 'development'
|
: buildFlags.mode === 'development'
|
||||||
? true
|
? true
|
||||||
: currentBuildPreset.enablePageHistory,
|
: currentBuildPreset.enablePageHistory,
|
||||||
enableJournal: process.env.ENABLE_JOURNAL
|
|
||||||
? process.env.ENABLE_JOURNAL === 'true'
|
|
||||||
: buildFlags.mode === 'development'
|
|
||||||
? true
|
|
||||||
: currentBuildPreset.enableJournal,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (buildFlags.mode === 'development') {
|
if (buildFlags.mode === 'development') {
|
||||||
|
|||||||
@@ -255,11 +255,9 @@ export const RootAppSidebar = ({
|
|||||||
{t['com.affine.workspaceSubPath.all']()}
|
{t['com.affine.workspaceSubPath.all']()}
|
||||||
</span>
|
</span>
|
||||||
</RouteMenuLinkItem>
|
</RouteMenuLinkItem>
|
||||||
{runtimeConfig.enableJournal ? (
|
<AppSidebarJournalButton
|
||||||
<AppSidebarJournalButton
|
workspace={currentWorkspace.blockSuiteWorkspace}
|
||||||
workspace={currentWorkspace.blockSuiteWorkspace}
|
/>
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
{runtimeConfig.enableNewSettingModal ? (
|
{runtimeConfig.enableNewSettingModal ? (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
data-testid="slider-bar-workspace-setting-button"
|
data-testid="slider-bar-workspace-setting-button"
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ type MaybeDate = Date | string | number;
|
|||||||
export const JOURNAL_DATE_FORMAT = 'YYYY-MM-DD';
|
export const JOURNAL_DATE_FORMAT = 'YYYY-MM-DD';
|
||||||
|
|
||||||
function isJournalString(j?: string | false) {
|
function isJournalString(j?: string | false) {
|
||||||
if (!runtimeConfig.enableJournal) return false;
|
|
||||||
return j ? !!j?.match(/^\d{4}-\d{2}-\d{2}$/) : false;
|
return j ? !!j?.match(/^\d{4}-\d{2}-\d{2}$/) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user