From 93e74af60b098c8fde71722914d9b843c4d23aa8 Mon Sep 17 00:00:00 2001 From: himself65 Date: Thu, 22 Dec 2022 12:45:09 +0800 Subject: [PATCH 1/2] build: add editor version in build log --- packages/app/next.config.js | 2 ++ packages/app/src/utils/print-build-info.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/app/next.config.js b/packages/app/next.config.js index d2f966dc1c..22a7c8c70e 100644 --- a/packages/app/next.config.js +++ b/packages/app/next.config.js @@ -1,4 +1,5 @@ const { getGitVersion, getCommitHash } = require('./scripts/gitInfo'); +const { dependencies } = require('./package.json') /** @type {import('next').NextConfig} */ const nextConfig = { @@ -12,6 +13,7 @@ const nextConfig = { CI: process.env.CI || null, VERSION: getGitVersion(), COMMIT_HASH: getCommitHash(), + EDITOR_VERSION: dependencies['@blocksuite/editor'] }, images: { unoptimized: true, diff --git a/packages/app/src/utils/print-build-info.ts b/packages/app/src/utils/print-build-info.ts index 8011cca794..4b286a69ec 100644 --- a/packages/app/src/utils/print-build-info.ts +++ b/packages/app/src/utils/print-build-info.ts @@ -4,6 +4,7 @@ type Config = { BUILD_DATE: string; NODE_ENV: string; PROJECT_NAME: string; + EDITOR_VERSION: string; VERSION: string; CI?: string; COMMIT_HASH: string; @@ -28,6 +29,7 @@ const printBuildInfo = () => { 'Environment:', `${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!' From cdd368b6c8374ed556506a692bb5d180a2fea8c2 Mon Sep 17 00:00:00 2001 From: himself65 Date: Thu, 22 Dec 2022 12:57:16 +0800 Subject: [PATCH 2/2] fix: relative position of StyledArrowButton --- packages/app/src/components/workspace-slider-bar/style.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/workspace-slider-bar/style.ts b/packages/app/src/components/workspace-slider-bar/style.ts index 3f8fa216ac..064590e93d 100644 --- a/packages/app/src/components/workspace-slider-bar/style.ts +++ b/packages/app/src/components/workspace-slider-bar/style.ts @@ -28,9 +28,9 @@ export const StyledArrowButton = styled.button<{ isShow: boolean }>( backgroundColor: theme.colors.hoverBackground, borderRadius: '50%', transition: 'all .15s', - position: 'fixed', + position: 'relative', top: '34px', - left: isShow ? '304px' : '-8px', + left: isShow ? '-16px' : '-8px', zIndex: theme.zIndex.modal, svg: { transform: isShow ? 'rotate(180deg)' : 'unset',