chore: add build flag for change log (#1792)

This commit is contained in:
JimmFly
2023-04-03 19:13:43 +08:00
committed by GitHub
parent fcf5d5602d
commit 196b9f2dbb
8 changed files with 17 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import { MuiFade, Tooltip } from '@affine/component';
import { config } from '@affine/env';
import { useTranslation } from '@affine/i18n';
import { CloseIcon, DoneIcon } from '@blocksuite/icons';
import dynamic from 'next/dynamic';
@@ -12,7 +13,6 @@ import {
StyledIsland,
StyledTriggerWrapper,
} from './style';
const ContactModal = dynamic(
() =>
import('@affine/component/contact-modal').then(({ ContactModal }) => ({
@@ -25,7 +25,9 @@ const ContactModal = dynamic(
export type IslandItemNames = 'whatNew' | 'contact' | 'shortcuts';
export const HelpIsland = ({
showList = ['whatNew', 'contact', 'shortcuts'],
showList = config.enableChangeLog
? ['whatNew', 'contact', 'shortcuts']
: ['contact', 'shortcuts'],
}: {
showList?: IslandItemNames[];
}) => {

View File

@@ -109,7 +109,7 @@ export const WorkSpaceSliderBar: React.FC<WorkSpaceSliderBarProps> = ({
currentWorkspace={currentWorkspace}
onClick={onOpenWorkspaceListModal}
/>
<ChangeLog />
{config.enableChangeLog && <ChangeLog />}
<StyledListItem
data-testid="slider-bar-quick-search-button"
onClick={useCallback(() => {