mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 08:06:24 +08:00
feat: cloud sync playground (#662)
* feat: add workspace playground page * feat: add all demands to playground Co-authored-by: tzhangchi <terry.zhangchi@outlook.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import getConfig from 'next/config';
|
||||
// import { isDev } from './env';
|
||||
import { isDev } from './env';
|
||||
type Config = {
|
||||
BUILD_DATE: string;
|
||||
NODE_ENV: string;
|
||||
@@ -14,9 +14,9 @@ const nextConfig = getConfig();
|
||||
const publicRuntimeConfig: Config = nextConfig.publicRuntimeConfig;
|
||||
|
||||
const printBuildInfo = () => {
|
||||
// if (isDev) {
|
||||
// return;
|
||||
// }
|
||||
if (isDev) {
|
||||
return;
|
||||
}
|
||||
console.group('Build info');
|
||||
console.log('Project:', publicRuntimeConfig.PROJECT_NAME);
|
||||
console.log(
|
||||
@@ -30,6 +30,7 @@ const printBuildInfo = () => {
|
||||
`${publicRuntimeConfig.NODE_ENV}${publicRuntimeConfig.CI ? '(ci)' : ''}`
|
||||
);
|
||||
console.log('Editor Version:', publicRuntimeConfig.EDITOR_VERSION);
|
||||
|
||||
console.log('Version:', publicRuntimeConfig.VERSION);
|
||||
console.log(
|
||||
'AFFiNE is an open source project, you can view its source code on GitHub!'
|
||||
@@ -40,6 +41,12 @@ const printBuildInfo = () => {
|
||||
console.groupEnd();
|
||||
};
|
||||
|
||||
function setWindowEditorVersion() {
|
||||
// when it is not SSR
|
||||
if (typeof window !== 'undefined') {
|
||||
window.__editoVersion = publicRuntimeConfig.EDITOR_VERSION;
|
||||
}
|
||||
}
|
||||
printBuildInfo();
|
||||
|
||||
setWindowEditorVersion();
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user