diff --git a/apps/desktop/scripts/buildAffine.mjs b/apps/desktop/scripts/buildAffine.mjs index 8d324d9c0e..618777a818 100644 --- a/apps/desktop/scripts/buildAffine.mjs +++ b/apps/desktop/scripts/buildAffine.mjs @@ -7,7 +7,7 @@ const repoDirectory = path.join(__dirname, '..', '..', '..'); const clientAppDirectory = path.join(__dirname, '..'); const publicDistributionDirectory = path.join(clientAppDirectory, 'public'); -const affineSrcDirectory = path.join(repoDirectory, 'packages', 'app'); +const affineSrcDirectory = path.join(repoDirectory, 'apps', 'web'); const affineSrcOutDirectory = path.join(affineSrcDirectory, 'out'); const publicAffineOutDirectory = path.join( publicDistributionDirectory, diff --git a/apps/web/src/components/enable-workspace/EnableWorkspaceModal.tsx b/apps/desktop/src/preload/components/enable-workspace-modal/index.tsx similarity index 74% rename from apps/web/src/components/enable-workspace/EnableWorkspaceModal.tsx rename to apps/desktop/src/preload/components/enable-workspace-modal/index.tsx index 548f7ae8b1..316c6fc38a 100644 --- a/apps/web/src/components/enable-workspace/EnableWorkspaceModal.tsx +++ b/apps/desktop/src/preload/components/enable-workspace-modal/index.tsx @@ -1,12 +1,13 @@ -import { styled } from '@affine/component'; import { Modal, ModalWrapper } from '@affine/component'; -import { Button, IconButton } from '@affine/component'; +import { IconButton } from '@affine/component'; import { useTranslation } from '@affine/i18n'; import { useAppState } from '@/providers/app-state-provider'; import { useState } from 'react'; import router from 'next/router'; import { toast } from '@affine/component'; import { CloseIcon } from '@blocksuite/icons'; +import { Header, Content, ContentTitle, StyleTips, StyleButton } from './style'; + interface EnableWorkspaceModalProps { open: boolean; onClose: () => void; @@ -71,41 +72,3 @@ export const EnableWorkspaceModal = ({ ); }; - -const Header = styled('div')({ - height: '44px', - display: 'flex', - flexDirection: 'row-reverse', - paddingRight: '10px', - paddingTop: '10px', -}); - -const Content = styled('div')({ - textAlign: 'center', -}); - -const ContentTitle = styled('h1')({ - fontSize: '20px', - lineHeight: '28px', - fontWeight: 600, - textAlign: 'center', -}); - -const StyleTips = styled('div')(() => { - return { - userSelect: 'none', - width: '400px', - margin: 'auto', - marginBottom: '32px', - marginTop: '12px', - }; -}); - -const StyleButton = styled(Button)(() => { - return { - width: '284px', - display: 'block', - margin: 'auto', - marginTop: '16px', - }; -}); diff --git a/apps/desktop/src/preload/components/enable-workspace-modal/style.ts b/apps/desktop/src/preload/components/enable-workspace-modal/style.ts new file mode 100644 index 0000000000..a805225792 --- /dev/null +++ b/apps/desktop/src/preload/components/enable-workspace-modal/style.ts @@ -0,0 +1,39 @@ +import { Button, styled } from '@affine/component'; + +export const Header = styled('div')({ + height: '44px', + display: 'flex', + flexDirection: 'row-reverse', + paddingRight: '10px', + paddingTop: '10px', +}); + +export const Content = styled('div')({ + textAlign: 'center', +}); + +export const ContentTitle = styled('h1')({ + fontSize: '20px', + lineHeight: '28px', + fontWeight: 600, + textAlign: 'center', +}); + +export const StyleTips = styled('div')(() => { + return { + userSelect: 'none', + width: '400px', + margin: 'auto', + marginBottom: '32px', + marginTop: '12px', + }; +}); + +export const StyleButton = styled(Button)(() => { + return { + width: '284px', + display: 'block', + margin: 'auto', + marginTop: '16px', + }; +}); diff --git a/apps/desktop/src/preload/components/icons/index.tsx b/apps/desktop/src/preload/components/icons/index.tsx new file mode 100644 index 0000000000..0829454b99 --- /dev/null +++ b/apps/desktop/src/preload/components/icons/index.tsx @@ -0,0 +1,28 @@ +import { + JoinedWorkspaceIcon as DefaultJoinedWorkspaceIcon, + LocalWorkspaceIcon as DefaultLocalWorkspaceIcon, + CloudWorkspaceIcon as DefaultCloudWorkspaceIcon, + LocalDataIcon as DefaultLocalDataIcon, + PublishIcon as DefaultPublishIcon, +} from '@blocksuite/icons'; + +// Here are some icons with special color or size + +export const JoinedWorkspaceIcon = () => { + return ; +}; +export const LocalWorkspaceIcon = () => { + return ; +}; + +export const CloudWorkspaceIcon = () => { + return ; +}; + +export const LocalDataIcon = () => { + return ; +}; + +export const PublishIcon = () => { + return ; +}; diff --git a/apps/web/package.json b/apps/web/package.json index 236d8ca3b3..39f0ac5789 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,7 +14,7 @@ "@affine/i18n": "workspace:*", "@blocksuite/blocks": "0.4.0-20230210031655-264744e", "@blocksuite/editor": "0.4.0-20230210031655-264744e", - "@blocksuite/icons": "^2.0.2", + "@blocksuite/icons": "^2.0.14", "@blocksuite/store": "0.4.0-20230210031655-264744e", "@emotion/css": "^11.10.5", "@emotion/react": "^11.10.5", diff --git a/apps/web/src/components/enable-workspace-modal/index.tsx b/apps/web/src/components/enable-workspace-modal/index.tsx new file mode 100644 index 0000000000..316c6fc38a --- /dev/null +++ b/apps/web/src/components/enable-workspace-modal/index.tsx @@ -0,0 +1,74 @@ +import { Modal, ModalWrapper } from '@affine/component'; +import { IconButton } from '@affine/component'; +import { useTranslation } from '@affine/i18n'; +import { useAppState } from '@/providers/app-state-provider'; +import { useState } from 'react'; +import router from 'next/router'; +import { toast } from '@affine/component'; +import { CloseIcon } from '@blocksuite/icons'; +import { Header, Content, ContentTitle, StyleTips, StyleButton } from './style'; + +interface EnableWorkspaceModalProps { + open: boolean; + onClose: () => void; +} + +export const EnableWorkspaceModal = ({ + open, + onClose, +}: EnableWorkspaceModalProps) => { + const { t } = useTranslation(); + const { user, dataCenter, login, currentWorkspace } = useAppState(); + const [loading, setLoading] = useState(false); + return ( + + +
+ { + onClose(); + }} + > + + +
+ + {t('Enable AFFiNE Cloud')}? + {t('Enable AFFiNE Cloud Description')} + {/* {t('Retain local cached data')} */} +
+ { + setLoading(true); + if (!user) { + await login(); + } + if (currentWorkspace) { + const workspace = await dataCenter.enableWorkspaceCloud( + currentWorkspace + ); + workspace && + router.push(`/workspace/${workspace.id}/setting`); + toast(t('Enabled success')); + } + }} + > + {user ? t('Enable') : t('Sign in and Enable')} + + { + onClose(); + }} + > + {t('Not now')} + +
+
+
+
+ ); +}; diff --git a/apps/web/src/components/enable-workspace-modal/style.ts b/apps/web/src/components/enable-workspace-modal/style.ts new file mode 100644 index 0000000000..a805225792 --- /dev/null +++ b/apps/web/src/components/enable-workspace-modal/style.ts @@ -0,0 +1,39 @@ +import { Button, styled } from '@affine/component'; + +export const Header = styled('div')({ + height: '44px', + display: 'flex', + flexDirection: 'row-reverse', + paddingRight: '10px', + paddingTop: '10px', +}); + +export const Content = styled('div')({ + textAlign: 'center', +}); + +export const ContentTitle = styled('h1')({ + fontSize: '20px', + lineHeight: '28px', + fontWeight: 600, + textAlign: 'center', +}); + +export const StyleTips = styled('div')(() => { + return { + userSelect: 'none', + width: '400px', + margin: 'auto', + marginBottom: '32px', + marginTop: '12px', + }; +}); + +export const StyleButton = styled(Button)(() => { + return { + width: '284px', + display: 'block', + margin: 'auto', + marginTop: '16px', + }; +}); diff --git a/apps/web/src/components/enable-workspace/index.tsx b/apps/web/src/components/enable-workspace/index.tsx deleted file mode 100644 index 6edff7f462..0000000000 --- a/apps/web/src/components/enable-workspace/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Button } from '@affine/component'; -import { useTranslation } from '@affine/i18n'; -import { useState } from 'react'; -import { EnableWorkspaceModal } from './EnableWorkspaceModal'; - -export const EnableWorkspaceButton = () => { - const { t } = useTranslation(); - const [enableModalOpen, setEnableModalOpen] = useState(false); - return ( - <> - - { - setEnableModalOpen(false); - }} - > - - ); -}; diff --git a/apps/web/src/components/header/header-right-items/SyncUser.tsx b/apps/web/src/components/header/header-right-items/SyncUser.tsx index 8724f6b42b..24bb31c95c 100644 --- a/apps/web/src/components/header/header-right-items/SyncUser.tsx +++ b/apps/web/src/components/header/header-right-items/SyncUser.tsx @@ -1,50 +1,47 @@ -import { CloudUnsyncedIcon } from '@blocksuite/icons'; -import { useModal } from '@/store/globalModal'; +import { LocalWorkspaceIcon, CloudWorkspaceIcon } from '@blocksuite/icons'; import { useAppState } from '@/providers/app-state-provider'; -import { IconButton } from '@affine/component'; +import { styled, Tooltip } from '@affine/component'; +import { useTranslation } from '@affine/i18n'; +import { useModal } from '@/store/globalModal'; -// Temporary solution to use this component, since the @blocksuite/icons has not been published yet -const DefaultSyncIcon = () => { - return ( - - - - - ); -}; +const IconWrapper = styled.div(() => { + return { + width: '20px', + height: '20px', + marginRight: '12px', + fontSize: '20px', + }; +}); export const SyncUser = () => { - const { triggerLoginModal } = useModal(); - const appState = useAppState(); + const { currentWorkspace } = useAppState(); + const { triggerEnableWorkspaceModal } = useModal(); - return appState.user ? ( - - - - ) : ( - - - + const { t } = useTranslation(); + + if (currentWorkspace?.provider === 'local') { + return ( + + { + triggerEnableWorkspaceModal(); + }} + style={{ cursor: 'pointer' }} + > + + + + ); + } + + return ( + + + + + ); }; diff --git a/apps/web/src/components/header/styles.ts b/apps/web/src/components/header/styles.ts index 4e88860ee9..c8bce44054 100644 --- a/apps/web/src/components/header/styles.ts +++ b/apps/web/src/components/header/styles.ts @@ -4,6 +4,7 @@ export const StyledHeaderContainer = styled.div<{ hasWarning: boolean }>( ({ hasWarning }) => { return { height: hasWarning ? '96px' : '60px', + padding: '0 28px', }; } ); @@ -39,6 +40,9 @@ export const StyledHeaderRightSide = styled('div')({ height: '100%', display: 'flex', alignItems: 'center', + '>*:not(:last-child)': { + marginRight: '12px', + }, }); export const StyledBrowserWarning = styled.div<{ show: boolean }>( diff --git a/apps/web/src/components/help-island/index.tsx b/apps/web/src/components/help-island/index.tsx index 0f01f27132..5db1ddad0a 100644 --- a/apps/web/src/components/help-island/index.tsx +++ b/apps/web/src/components/help-island/index.tsx @@ -27,7 +27,9 @@ export const HelpIsland = ({ setShowSpread(!spread); }} > - + {showList.includes('contact') && ( { }; }); -export const StyledAnimateWrapper = styled('div', { - shouldForwardProp: prop => prop !== 'spread', -})<{ spread: boolean }>(({ spread }) => ({ - height: spread ? '88px' : '0', +export const StyledAnimateWrapper = styled('div')(() => ({ transition: 'height 0.2s cubic-bezier(0, 0, 0.55, 1.6)', overflow: 'hidden', })); diff --git a/apps/web/src/components/icons/index.tsx b/apps/web/src/components/icons/index.tsx new file mode 100644 index 0000000000..0829454b99 --- /dev/null +++ b/apps/web/src/components/icons/index.tsx @@ -0,0 +1,28 @@ +import { + JoinedWorkspaceIcon as DefaultJoinedWorkspaceIcon, + LocalWorkspaceIcon as DefaultLocalWorkspaceIcon, + CloudWorkspaceIcon as DefaultCloudWorkspaceIcon, + LocalDataIcon as DefaultLocalDataIcon, + PublishIcon as DefaultPublishIcon, +} from '@blocksuite/icons'; + +// Here are some icons with special color or size + +export const JoinedWorkspaceIcon = () => { + return ; +}; +export const LocalWorkspaceIcon = () => { + return ; +}; + +export const CloudWorkspaceIcon = () => { + return ; +}; + +export const LocalDataIcon = () => { + return ; +}; + +export const PublishIcon = () => { + return ; +}; diff --git a/apps/web/src/components/logout-modal/index.tsx b/apps/web/src/components/logout-modal/index.tsx index 450b8834d3..0800fae9a3 100644 --- a/apps/web/src/components/logout-modal/index.tsx +++ b/apps/web/src/components/logout-modal/index.tsx @@ -14,6 +14,7 @@ export const LogoutModal = ({ open, onClose }: LoginModalProps) => { const [localCache, setLocalCache] = useState(true); const { blobDataSynced } = useAppState(); const { t } = useTranslation(); + return ( @@ -28,8 +29,8 @@ export const LogoutModal = ({ open, onClose }: LoginModalProps) => { {t('Sign out')}? {blobDataSynced - ? t('Set up an AFFiNE account to sync data') - : 'All data has been stored in the cloud'} + ? t('Sign out description') + : t('All data has been stored in the cloud')} {localCache ? ( diff --git a/apps/web/src/components/page-list/OperationCell.tsx b/apps/web/src/components/page-list/OperationCell.tsx index b6435ece70..2fcc487e47 100644 --- a/apps/web/src/components/page-list/OperationCell.tsx +++ b/apps/web/src/components/page-list/OperationCell.tsx @@ -6,10 +6,10 @@ import { IconButton } from '@affine/component'; import { MoreVerticalIcon, RestoreIcon, - DeleteIcon, FavouritesIcon, FavouritedIcon, OpenInNewIcon, + DeleteForeverIcon, TrashIcon, } from '@blocksuite/icons'; import { toast } from '@affine/component'; @@ -53,7 +53,7 @@ export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => { confirmType: 'danger', }).then(confirm => { confirm && toggleDeletePage(id); - toast(t('Moved to Trash')); + confirm && toast(t('Moved to Trash')); }); }} icon={} @@ -106,7 +106,7 @@ export const TrashOperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => { }); }} > - + ); diff --git a/apps/web/src/components/quick-search/Footer.tsx b/apps/web/src/components/quick-search/Footer.tsx index cc84003a5b..f67f70891d 100644 --- a/apps/web/src/components/quick-search/Footer.tsx +++ b/apps/web/src/components/quick-search/Footer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { AddIcon } from '@blocksuite/icons'; +import { PlusIcon } from '@blocksuite/icons'; import { StyledModalFooterContent } from './style'; import { Command } from 'cmdk'; import { usePageHelper } from '@/hooks/use-page-helper'; @@ -21,7 +21,7 @@ export const Footer = (props: { query: string; onClose: () => void }) => { }} > - + {query ? ( {t('New Keyword Page', { query: query })} ) : ( diff --git a/apps/web/src/components/workspace-avatar/Avatar.tsx b/apps/web/src/components/workspace-avatar/Avatar.tsx index e9bea0aadd..f62215ebce 100644 --- a/apps/web/src/components/workspace-avatar/Avatar.tsx +++ b/apps/web/src/components/workspace-avatar/Avatar.tsx @@ -18,7 +18,6 @@ export const WorkspaceAvatar = (props: IWorkspaceAvatar) => { ...props.style, width: sizeStr, height: sizeStr, - border: '1px solid #fff', color: '#fff', borderRadius: '50%', overflow: 'hidden', diff --git a/apps/web/src/components/workspace-layout/index.tsx b/apps/web/src/components/workspace-layout/index.tsx index eca2b6bbb0..22215ff69a 100644 --- a/apps/web/src/components/workspace-layout/index.tsx +++ b/apps/web/src/components/workspace-layout/index.tsx @@ -4,11 +4,10 @@ import { useRouter } from 'next/router'; import { StyledPage, StyledToolWrapper, StyledWrapper } from './styles'; import { PropsWithChildren } from 'react'; import useEnsureWorkspace from '@/hooks/use-ensure-workspace'; -import { PageLoading } from '@/components/loading'; export const WorkspaceDefender = ({ children }: PropsWithChildren) => { const { workspaceLoaded } = useEnsureWorkspace(); - return <>{workspaceLoaded ? children : }; + return <>{workspaceLoaded ? children : null}; }; export const WorkspaceLayout = ({ children }: PropsWithChildren) => { diff --git a/apps/web/src/components/workspace-modal/Footer.tsx b/apps/web/src/components/workspace-modal/Footer.tsx index 45a84998d2..917c77da5a 100644 --- a/apps/web/src/components/workspace-modal/Footer.tsx +++ b/apps/web/src/components/workspace-modal/Footer.tsx @@ -1,4 +1,4 @@ -import { CloudInsyncIcon, LogOutIcon } from '@blocksuite/icons'; +import { CloudWorkspaceIcon, SignOutIcon } from '@blocksuite/icons'; import { FlexWrapper } from '@affine/component'; import { WorkspaceAvatar } from '@/components/workspace-avatar'; import { IconButton } from '@affine/component'; @@ -37,7 +37,7 @@ export const Footer = ({ onLogout(); }} > - + @@ -49,7 +49,7 @@ export const Footer = ({ bold icon={
- +
} onClick={async () => { diff --git a/apps/web/src/components/workspace-modal/SelectLanguageMenu.tsx b/apps/web/src/components/workspace-modal/SelectLanguageMenu.tsx index c79b3f5c1b..3197c47583 100644 --- a/apps/web/src/components/workspace-modal/SelectLanguageMenu.tsx +++ b/apps/web/src/components/workspace-modal/SelectLanguageMenu.tsx @@ -56,7 +56,7 @@ export const LanguageMenu = () => { const ListItem = styled(MenuItem)(({ theme }) => ({ height: '38px', color: theme.colors.popoverColor, - fontSize: theme.font.sm, + fontSize: theme.font.base, textTransform: 'capitalize', padding: '0 24px', })); diff --git a/apps/web/src/components/workspace-modal/WorkspaceCard.tsx b/apps/web/src/components/workspace-modal/WorkspaceCard.tsx index d90fb9daaf..0596cad968 100644 --- a/apps/web/src/components/workspace-modal/WorkspaceCard.tsx +++ b/apps/web/src/components/workspace-modal/WorkspaceCard.tsx @@ -1,16 +1,15 @@ import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; import { - CloudIcon, - LocalIcon, - OfflineIcon, - PublishedIcon, -} from '@/components/workspace-modal/icons'; -import { UsersIcon } from '@blocksuite/icons'; + JoinedWorkspaceIcon, + LocalWorkspaceIcon, + CloudWorkspaceIcon, + LocalDataIcon, + PublishIcon, +} from '@/components/icons'; import { WorkspaceUnit } from '@affine/datacenter'; import { useAppState } from '@/providers/app-state-provider'; import { StyleWorkspaceInfo, StyleWorkspaceTitle, StyledCard } from './styles'; import { useTranslation } from '@affine/i18n'; -import { FlexWrapper } from '@affine/component'; const WorkspaceType = ({ workspaceData }: { workspaceData: WorkspaceUnit }) => { const { user } = useAppState(); @@ -20,7 +19,7 @@ const WorkspaceType = ({ workspaceData }: { workspaceData: WorkspaceUnit }) => { if (workspaceData.provider === 'local') { return (

- + {t('Local Workspace')}

); @@ -28,12 +27,12 @@ const WorkspaceType = ({ workspaceData }: { workspaceData: WorkspaceUnit }) => { return isOwner ? (

- + {t('Cloud Workspace')}

) : (

- + {t('Joined Workspace')}

); @@ -56,9 +55,7 @@ export const WorkspaceCard = ({ }} active={workspaceData.id === currentWorkspace?.id} > - - - + @@ -67,13 +64,13 @@ export const WorkspaceCard = ({ {workspaceData.provider === 'local' && (

- + {t('Available Offline')}

)} {workspaceData.published && (

- + {t('Published to Web')}

)} diff --git a/apps/web/src/components/workspace-modal/icons/index.tsx b/apps/web/src/components/workspace-modal/icons/index.tsx deleted file mode 100644 index 78012bc972..0000000000 --- a/apps/web/src/components/workspace-modal/icons/index.tsx +++ /dev/null @@ -1,99 +0,0 @@ -export const LocalIcon = () => { - return ( - - - - ); -}; - -export const OfflineIcon = () => { - return ( - - - - ); -}; -export const PublishedIcon = () => { - return ( - - - - - ); -}; - -export const CloudIcon = () => { - return ( - - - - - ); -}; - -export const LineIcon = () => { - return ( - - - - ); -}; diff --git a/apps/web/src/components/workspace-modal/index.tsx b/apps/web/src/components/workspace-modal/index.tsx index 8c3850e396..8d9d77c100 100644 --- a/apps/web/src/components/workspace-modal/index.tsx +++ b/apps/web/src/components/workspace-modal/index.tsx @@ -1,11 +1,10 @@ import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component'; -import { FlexWrapper } from '@affine/component'; import { useState } from 'react'; import { CreateWorkspaceModal } from '../create-workspace'; import { Tooltip } from '@affine/component'; -import { AddIcon, HelpCenterIcon } from '@blocksuite/icons'; +import { PlusIcon, HelpIcon } from '@blocksuite/icons'; import { useAppState } from '@/providers/app-state-provider'; import { useRouter } from 'next/router'; @@ -62,7 +61,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => { disablePortal={true} > - + @@ -98,11 +97,9 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => { setCreateWorkspaceOpen(true); }} > - - - - - + + + {t('New Workspace')} diff --git a/apps/web/src/components/workspace-modal/styles.ts b/apps/web/src/components/workspace-modal/styles.ts index d022bc8df5..80cbbf3ada 100644 --- a/apps/web/src/components/workspace-modal/styles.ts +++ b/apps/web/src/components/workspace-modal/styles.ts @@ -19,12 +19,14 @@ export const StyleWorkspaceInfo = styled.div(({ theme }) => { return { marginLeft: '15px', p: { + color: theme.colors.popoverColor, height: '20px', - fontSize: theme.font.xs, + fontSize: theme.font.sm, ...displayFlex('flex-start', 'center'), }, svg: { marginRight: '10px', + fontSize: '16px', }, }; }); @@ -54,13 +56,12 @@ export const StyledCard = styled.div<{ border: `1px solid ${borderColor}`, ...displayFlex('flex-start', 'flex-start'), marginBottom: '24px', + transition: 'background .2s', ':hover': { background: theme.colors.hoverBackground, '.add-icon': { - border: `1.5px dashed ${theme.colors.primaryColor}`, - svg: { - fill: theme.colors.primaryColor, - }, + borderColor: theme.colors.primaryColor, + color: theme.colors.primaryColor, }, }, }; @@ -103,6 +104,7 @@ export const StyledHelperContainer = styled.div(({ theme }) => { color: theme.colors.iconColor, marginLeft: '15px', fontWeight: 400, + fontSize: theme.font.h6, ...displayFlex('center', 'center'), }; }); @@ -126,11 +128,10 @@ export const StyleWorkspaceAdd = styled.div(() => { width: '58px', height: '58px', borderRadius: '100%', - textAlign: 'center', background: '#f4f5fa', border: '1.5px dashed #f4f5fa', - lineHeight: '58px', - marginTop: '2px', + transition: 'background .2s', + ...displayFlex('center', 'center'), }; }); export const StyledModalHeader = styled('div')(({ theme }) => { diff --git a/apps/web/src/components/workspace-setting/ExportPage.tsx b/apps/web/src/components/workspace-setting/ExportPage.tsx index 1a375ee176..5ae51ed6bc 100644 --- a/apps/web/src/components/workspace-setting/ExportPage.tsx +++ b/apps/web/src/components/workspace-setting/ExportPage.tsx @@ -9,7 +9,7 @@ export const ExportPage = ({ workspace }: { workspace: WorkspaceUnit }) => { <> {t('Export Description')} ); diff --git a/apps/web/src/components/workspace-setting/PublishPage.tsx b/apps/web/src/components/workspace-setting/PublishPage.tsx index fefb96742b..bbe0742c22 100644 --- a/apps/web/src/components/workspace-setting/PublishPage.tsx +++ b/apps/web/src/components/workspace-setting/PublishPage.tsx @@ -5,11 +5,12 @@ import { toast } from '@affine/component'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; import { useTranslation } from '@affine/i18n'; -import { EnableWorkspaceButton } from '../enable-workspace'; import { Wrapper, Content, FlexWrapper } from '@affine/component'; +import { useModal } from '@/store/globalModal'; export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const shareUrl = window.location.host + '/public-workspace/' + workspace.id; const { publishWorkspace } = useWorkspaceHelper(); + const { triggerEnableWorkspaceModal } = useModal(); const { t } = useTranslation(); const [loaded, setLoaded] = useState(false); const togglePublic = async (flag: boolean) => { @@ -83,7 +84,15 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { return ( <> {t('Publishing')} - + ); }; diff --git a/apps/web/src/components/workspace-setting/SyncPage.tsx b/apps/web/src/components/workspace-setting/SyncPage.tsx index fa6586c3e6..520b52c379 100644 --- a/apps/web/src/components/workspace-setting/SyncPage.tsx +++ b/apps/web/src/components/workspace-setting/SyncPage.tsx @@ -1,15 +1,10 @@ -import { - StyledWorkspaceName, - StyledEmail, - // StyledDownloadCard, - // StyledDownloadCardDes, -} from './style'; +import { StyledWorkspaceName } from './style'; import { WorkspaceUnit } from '@affine/datacenter'; import { useTranslation, Trans } from '@affine/i18n'; import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; -import { EnableWorkspaceButton } from '../enable-workspace'; import { useAppState } from '@/providers/app-state-provider'; -import { FlexWrapper, Content, Wrapper } from '@affine/component'; +import { FlexWrapper, Content, Wrapper, Button } from '@affine/component'; +import { useModal } from '@/store/globalModal'; // // FIXME: Temporary solution, since the @blocksuite/icons is broken // const ActiveIcon = () => { @@ -40,6 +35,8 @@ import { FlexWrapper, Content, Wrapper } from '@affine/component'; export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const { t } = useTranslation(); const { user } = useAppState(); + const { triggerEnableWorkspaceModal } = useModal(); + if (workspace.provider === 'local') { return ( <> @@ -55,7 +52,15 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {

{t('Local Workspace Description')}

- + ); @@ -74,11 +79,9 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { All data will be synchronised and saved to the AFFiNE account - - {{ - email: '{' + user?.email + '}.', - }} - + {{ + email: user?.email, + }} {/**/} diff --git a/apps/web/src/components/workspace-setting/general/General.tsx b/apps/web/src/components/workspace-setting/general/General.tsx index 2c33eb3bf2..77e6c17ff7 100644 --- a/apps/web/src/components/workspace-setting/general/General.tsx +++ b/apps/web/src/components/workspace-setting/general/General.tsx @@ -1,24 +1,34 @@ -import { StyledInput, StyledProviderInfo, StyledAvatar } from './style'; +import { + StyledInput, + StyledWorkspaceInfo, + StyledAvatar, + StyledEditButton, +} from './style'; import { StyledSettingKey, StyledRow } from '../style'; -import { FlexWrapper, Content } from '@affine/component'; +import { FlexWrapper } from '@affine/component'; import { useState } from 'react'; import { Button } from '@affine/component'; import { useAppState } from '@/providers/app-state-provider'; import { WorkspaceDelete } from './delete'; import { WorkspaceLeave } from './leave'; -import { UsersIcon } from '@blocksuite/icons'; +import { + JoinedWorkspaceIcon, + CloudWorkspaceIcon, + LocalWorkspaceIcon, +} from '@/components/icons'; import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; import { useTranslation } from '@affine/i18n'; -import { CloudIcon, LocalIcon } from '@/components/workspace-modal/icons'; import { CameraIcon } from './icons'; import { Upload } from '@/components/file-upload'; +import { MuiFade } from '@affine/component'; export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const [showDelete, setShowDelete] = useState(false); const [showLeave, setShowLeave] = useState(false); const [workspaceName, setWorkspaceName] = useState(workspace?.name); + const [showEditInput, setShowEditInput] = useState(false); const { currentWorkspace, isOwner } = useAppState(); const { updateWorkspace } = useWorkspaceHelper(); const { t } = useTranslation(); @@ -70,72 +80,86 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { {t('Workspace Name')} - - { - setWorkspaceName(newName); - }} - > + +
+ + + {workspace.name} + {isOwner && ( + { + setShowEditInput(true); + }} + > + Edit + + )} + + + {isOwner && ( - <> - - - + + + { + setWorkspaceName(newName); + }} + > + + + + )} - +
{t('Workspace Type')} - - {isOwner ? ( - currentWorkspace?.provider === 'local' ? ( - - - - {t('Local Workspace')} - - - ) : ( - - - - {t('Available Offline')} - - - ) + {isOwner ? ( + currentWorkspace?.provider === 'local' ? ( + + + {t('Local Workspace')} + ) : ( - - - {t('Joined Workspace')} - - )} - + + + {t('Available Offline')} + + ) + ) : ( + + + {t('Joined Workspace')} + + )} diff --git a/apps/web/src/components/workspace-setting/general/icons.tsx b/apps/web/src/components/workspace-setting/general/icons.tsx index a126cafc0f..391ae942db 100644 --- a/apps/web/src/components/workspace-setting/general/icons.tsx +++ b/apps/web/src/components/workspace-setting/general/icons.tsx @@ -1,20 +1,18 @@ export const CameraIcon = () => { return ( - - - - - + + + ); }; diff --git a/apps/web/src/components/workspace-setting/general/style.ts b/apps/web/src/components/workspace-setting/general/style.ts index 35c44e5f3e..47e41de79b 100644 --- a/apps/web/src/components/workspace-setting/general/style.ts +++ b/apps/web/src/components/workspace-setting/general/style.ts @@ -1,4 +1,4 @@ -import { styled } from '@affine/component'; +import { displayFlex, styled } from '@affine/component'; import { Input } from '@affine/component'; export const StyledInput = styled(Input)(({ theme }) => { @@ -8,17 +8,16 @@ export const StyledInput = styled(Input)(({ theme }) => { fontSize: theme.font.sm, }; }); - -export const StyledProviderInfo = styled('p')(({ theme }) => { +export const StyledWorkspaceInfo = styled.div(({ theme }) => { return { - color: theme.colors.iconColor, - svg: { - verticalAlign: 'sub', - marginRight: '10px', + ...displayFlex('flex-start', 'center'), + fontSize: '20px', + span: { + fontSize: theme.font.base, + marginLeft: '15px', }, }; }); - export const StyledAvatar = styled('div')( ({ disabled }: { disabled: boolean }) => { return { @@ -27,21 +26,29 @@ export const StyledAvatar = styled('div')( cursor: disabled ? 'default' : 'pointer', ':hover': { '.camera-icon': { - display: 'block', + display: 'flex', }, }, '.camera-icon': { position: 'absolute', + top: 0, + left: 0, display: 'none', width: '100%', height: '100%', borderRadius: '50%', backgroundColor: 'rgba(60, 61, 63, 0.5)', - top: 0, - left: 0, - textAlign: 'center', - lineHeight: '72px', + justifyContent: 'center', + alignItems: 'center', }, }; } ); + +export const StyledEditButton = styled('div')(({ theme }) => { + return { + color: theme.colors.primaryColor, + cursor: 'pointer', + marginLeft: '36px', + }; +}); diff --git a/apps/web/src/components/workspace-setting/member/MembersPage.tsx b/apps/web/src/components/workspace-setting/member/MembersPage.tsx index 7a64e14f5e..25b4ea5b97 100644 --- a/apps/web/src/components/workspace-setting/member/MembersPage.tsx +++ b/apps/web/src/components/workspace-setting/member/MembersPage.tsx @@ -26,11 +26,12 @@ import useMembers from '@/hooks/use-members'; import Loading from '@/components/loading'; import { FlexWrapper } from '@affine/component'; import { useTranslation } from '@affine/i18n'; -import { EnableWorkspaceButton } from '@/components/enable-workspace'; +import { useModal } from '@/store/globalModal'; export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const [isInviteModalShow, setIsInviteModalShow] = useState(false); const { members, removeMember, loaded } = useMembers(); + const { triggerEnableWorkspaceModal } = useModal(); const { t } = useTranslation(); const { confirm } = useConfirm(); @@ -165,14 +166,17 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => { } return ( - + <> {t('Collaboration Description')} - - + + ); }; diff --git a/apps/web/src/components/workspace-setting/style.ts b/apps/web/src/components/workspace-setting/style.ts index 1dad9cb83a..e99d044866 100644 --- a/apps/web/src/components/workspace-setting/style.ts +++ b/apps/web/src/components/workspace-setting/style.ts @@ -4,8 +4,7 @@ export const StyledSettingContainer = styled('div')(() => { return { display: 'flex', flexDirection: 'column', - - padding: '0 34px 20px 48px', + padding: '0 0 20px 48px', height: '100vh', }; }); @@ -79,12 +78,6 @@ export const StyledWorkspaceName = styled('span')(({ theme }) => { }; }); -export const StyledEmail = styled('span')(() => { - return { - color: '#E8178A', - }; -}); - // export const StyledDownloadCard = styled.div<{ active?: boolean }>( // ({ theme, active }) => { // return { diff --git a/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx b/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx index c254145851..ac9c8b0ca9 100644 --- a/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx +++ b/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx @@ -1,4 +1,4 @@ -import { Avatar, WorkspaceName, SelectorWrapper } from './styles'; +import { WorkspaceName, SelectorWrapper } from './styles'; import { useEffect, useState } from 'react'; import { WorkspaceModal } from '@/components/workspace-modal'; import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; @@ -20,23 +20,16 @@ export const WorkspaceSelector = () => { }} data-testid="current-workspace" > - -
+ - -
-
+ size={32} + name={currentWorkspace?.name ?? 'AFFiNE Test'} + workspaceUnit={currentWorkspace} + /> + {currentWorkspace?.name ?? 'AFFiNE Test'} diff --git a/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/styles.ts b/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/styles.ts index 600bcaf567..00ef11c4d0 100644 --- a/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/styles.ts +++ b/apps/web/src/components/workspace-slider-bar/WorkspaceSelector/styles.ts @@ -1,12 +1,8 @@ -import { MuiAvatar } from '@affine/component'; +import { MuiAvatar, textEllipsis } from '@affine/component'; import { styled } from '@affine/component'; -import { StyledPopperContainer } from '@affine/component'; - export const SelectorWrapper = styled('div')({ - width: '100%', height: '100%', display: 'flex', - flexDirection: 'row', alignItems: 'center', ':hover': { cursor: 'pointer', @@ -21,21 +17,11 @@ export const Avatar = styled(MuiAvatar)({ export const WorkspaceName = styled('span')(({ theme }) => { return { marginLeft: '12px', - lineHeight: 1, - fontSize: '18px', + fontSize: theme.font.h6, fontWeight: 500, color: theme.colors.iconColor, + marginTop: '4px', + flexGrow: 1, + ...textEllipsis(1), }; }); - -export const SelectorPopperContainer = styled(StyledPopperContainer)( - ({ theme }) => { - return { - width: '334px', - boxShadow: theme.shadow.tooltip, - padding: '24px 12px', - backgroundColor: theme.colors.pageBackground, - fontSize: theme.font.xs, - }; - } -); diff --git a/apps/web/src/components/workspace-slider-bar/index.tsx b/apps/web/src/components/workspace-slider-bar/index.tsx index 7507569fd2..1377d17b55 100644 --- a/apps/web/src/components/workspace-slider-bar/index.tsx +++ b/apps/web/src/components/workspace-slider-bar/index.tsx @@ -17,7 +17,7 @@ import { AllPagesIcon, FavouritesIcon, TrashIcon, - AddIcon, + PlusIcon, SettingsIcon, } from '@blocksuite/icons'; import Link from 'next/link'; @@ -183,7 +183,7 @@ export const WorkSpaceSliderBar = () => { } }} > - {t('New Page')} + {t('New Page')} diff --git a/apps/web/src/components/workspace-slider-bar/style.ts b/apps/web/src/components/workspace-slider-bar/style.ts index 11baa74c47..9990856d24 100644 --- a/apps/web/src/components/workspace-slider-bar/style.ts +++ b/apps/web/src/components/workspace-slider-bar/style.ts @@ -6,6 +6,7 @@ export const StyledSliderBar = styled.div<{ show: boolean }>( return { width: show ? '256px' : '0', height: '100vh', + minHeight: '450px', background: theme.mode === 'dark' ? '#272727' : '#F9F9FB', boxShadow: theme.shadow.modal, transition: 'width .15s, padding .15s', @@ -81,8 +82,9 @@ export const StyledListItem = styled.div<{ }; }); -export const StyledListItemForWorkspace = styled(StyledListItem)({ - height: '52px', +export const StyledListItemForWorkspace = styled.div({ + height: '42px', + padding: '0 12px', }); export const StyledLink = styled(Link)(() => { diff --git a/apps/web/src/pages/temporary.css b/apps/web/src/pages/temporary.css index 3df1e639f5..d86b898a18 100644 --- a/apps/web/src/pages/temporary.css +++ b/apps/web/src/pages/temporary.css @@ -6,6 +6,9 @@ .affine-default-page-block-container { width: 686px !important; } +.affine-default-page-block-container > .affine-block-children-container { + margin-left: -26px !important; +} affine-block-hub { position: unset !important; diff --git a/apps/web/src/pages/workspace/[workspaceId]/setting.tsx b/apps/web/src/pages/workspace/[workspaceId]/setting.tsx index d2c70c3dd0..368634351a 100644 --- a/apps/web/src/pages/workspace/[workspaceId]/setting.tsx +++ b/apps/web/src/pages/workspace/[workspaceId]/setting.tsx @@ -83,8 +83,9 @@ const WorkspaceSetting = () => { {t('Settings')} - AFFiNE + }>{t('Settings')} + - }>{t('Settings')} {tableArr.map(({ name }) => { diff --git a/apps/web/src/store/globalModal/index.tsx b/apps/web/src/store/globalModal/index.tsx index 337a8fff6f..6f07b51915 100644 --- a/apps/web/src/store/globalModal/index.tsx +++ b/apps/web/src/store/globalModal/index.tsx @@ -8,6 +8,7 @@ import ShortcutsModal from '@/components/shortcuts-modal'; import QuickSearch from '@/components/quick-search'; import { LoginModal } from '@/components/login-modal'; import ImportModal from '@/components/import'; +import { EnableWorkspaceModal } from '@/components/enable-workspace-modal'; export type ModalState = { contact: boolean; @@ -15,6 +16,7 @@ export type ModalState = { quickSearch: boolean; import: boolean; login: boolean; + enableWorkspace: boolean; }; export type ModalActions = { @@ -23,6 +25,7 @@ export type ModalActions = { triggerQuickSearchModal: (visible?: boolean) => void; triggerImportModal: () => void; triggerLoginModal: () => void; + triggerEnableWorkspaceModal: () => void; }; const create = () => @@ -35,6 +38,7 @@ const create = () => quickSearch: false, import: false, login: false, + enableWorkspace: false, }, set => ({ triggerShortcutsModal: () => { @@ -62,6 +66,11 @@ const create = () => login: !login, })); }, + triggerEnableWorkspaceModal: () => { + set(({ enableWorkspace }) => ({ + enableWorkspace: !enableWorkspace, + })); + }, }) ) ) @@ -131,6 +140,14 @@ const Modals: React.FC = function Modal() { }); }, [api])} /> + state.enableWorkspace)} + onClose={useCallback(() => { + api.setState({ + enableWorkspace: false, + }); + }, [api])} + /> ); }; diff --git a/packages/component/src/styles/theme.ts b/packages/component/src/styles/theme.ts index e856b9dac8..5d1bc343f1 100644 --- a/packages/component/src/styles/theme.ts +++ b/packages/component/src/styles/theme.ts @@ -55,8 +55,8 @@ export const getLightTheme = ( h5: '20px', h6: '18px', base: '16px', - xs: '14px', - sm: '12px', + sm: '14px', + xs: '12px', family: `Avenir Next, Poppins, ${basicFontFamily}`, numberFamily: `Roboto Mono, ${basicFontFamily}`, diff --git a/packages/component/src/ui/button/styles.ts b/packages/component/src/ui/button/styles.ts index 50a7a330f9..90957e0257 100644 --- a/packages/component/src/ui/button/styles.ts +++ b/packages/component/src/ui/button/styles.ts @@ -213,7 +213,7 @@ export const StyledButton = styled('button', { }, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - ...getButtonColors(theme, type, { + ...getButtonColors(theme, type, disabled, { hoverBackground, hoverColor, hoverStyle, diff --git a/packages/component/src/ui/button/utils.ts b/packages/component/src/ui/button/utils.ts index bc508254b8..5747d302d2 100644 --- a/packages/component/src/ui/button/utils.ts +++ b/packages/component/src/ui/button/utils.ts @@ -66,7 +66,9 @@ export const getButtonColors = ( borderColor: theme.colors.primaryColor, }, ':hover': { - borderColor: theme.colors.primaryColor, + borderColor: disabled + ? theme.colors.hoverBackground + : theme.colors.primaryColor, }, }; case 'warning': diff --git a/packages/component/src/ui/tooltip/Tooltip.tsx b/packages/component/src/ui/tooltip/Tooltip.tsx index 380ae478b7..2002566e49 100644 --- a/packages/component/src/ui/tooltip/Tooltip.tsx +++ b/packages/component/src/ui/tooltip/Tooltip.tsx @@ -10,7 +10,7 @@ const StyledTooltip = styled(StyledPopperContainer)(({ theme }) => { padding: '4px 12px', backgroundColor: theme.colors.tooltipBackground, color: '#fff', - fontSize: theme.font.xs, + fontSize: theme.font.sm, }; }); diff --git a/packages/i18n/src/resources/en.json b/packages/i18n/src/resources/en.json index 8a44ca4c23..396b390a23 100644 --- a/packages/i18n/src/resources/en.json +++ b/packages/i18n/src/resources/en.json @@ -1,7 +1,19 @@ { + "Confirm": "Confirm", + "Download core data": "Download core data", + "It takes up little space on your device": { + "": "It takes up little space on your device." + }, + "AFFiNE Cloud": "AFFiNE Cloud", + "It takes up more space on your device": { + "": "It takes up more space on your device." + }, + "Export AFFiNE backup file": "Export AFFiNE backup file (coming soon)", + "Saved then enable AFFiNE Cloud": "All changes are saved locally, click to enable AFFiNE Cloud.", + "Not now": "Not now", + "Export Description": "You can export the entire Workspace data for backup, and the exported data can be re-impored.", "Quick search": "Quick search", "All pages": "All pages", - "Favorites": "Favorites", "No item": "No item", "Import": "Import", "Trash": "Trash", @@ -11,10 +23,10 @@ "Find results": "Find {{number}} results", "Collapse sidebar": "Collapse sidebar", "Expand sidebar": "Expand sidebar", - "Added to Favorites": "Added to Favorites", "Add to favorites": "Add to favorites", "Paper": "Paper", "Edgeless": "Edgeless", + "Added to Favorites": "Added to Favorites", "Convert to ": "Convert to ", "Page": "Page", "Export": "Export", @@ -26,16 +38,14 @@ "Created": "Created", "Updated": "Updated", "Open in new tab": "Open in new tab", - "Favorite": "Favorite", - "Favorited": "Favorited", "Delete page?": "Delete page?", "Delete permanently?": "Delete permanently?", "will be moved to Trash": "{{title}} will be moved to Trash", + "Favorite": "Favorite", "Moved to Trash": "Moved to Trash", "Permanently deleted": "Permanently deleted", "restored": "{{title}} restored", "Cancel": "Cancel", - "Confirm": "Confirm", "Keyboard Shortcuts": "Keyboard Shortcuts", "Contact Us": "Contact Us", "Official Website": "Official Website", @@ -51,6 +61,7 @@ "Strikethrough": "Strikethrough", "Inline code": "Inline code", "Code block": "Code block", + "Favorited": "Favorited", "Body text": "Body text", "Heading": "Heading {{number}}", "Increase indent": "Increase indent", @@ -64,13 +75,7 @@ "Removed from Favorites": "Removed from Favorites", "Jump to": "Jump to", "404 - Page Not Found": "404 - Page Not Found", - "Once deleted, you can't undo this action": { - "": "Once deleted, you can't undo this action." - }, - "Remove from favorites": "Remove from favorites", - "Removed from Favorites": "Removed from Favorites", "New Workspace": "New Workspace", - "Workspace description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.", "Create": "Create", "Select": "Select", "Text": "Text (coming soon)", @@ -84,6 +89,7 @@ "TrashButtonGroupDescription": "Once deleted, you can't undo this action. Do you confirm?", "Delete permanently": "Delete permanently", "Link": "Hyperlink (with selected text)", + "Workspace description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.", "Quick search placeholder": "Quick Search...", "Quick search placeholder2": "Search in {{workspace}}", "Settings": "Settings", @@ -105,14 +111,12 @@ "mobile device description": "We are still working on mobile support and recommend you use a desktop device.", "Got it": "Got it", "emptyAllPages": "This workspace is empty. Create a new page to begin editing.", - "emptyFavorite": "Click Add to Favorites and the page will appear here.", "emptyTrash": "Click Add to Trash and the page will appear here.", "still designed": "(This page is still being designed.)", "My Workspaces": "My Workspaces", - "Create Or Import": "Create or Import", "Tips": "Tips: ", "login success": "Login success", - "Sign out": "Sign out", + "Create Or Import": "Create or Import", "Delete Workspace": "Delete Workspace", "Delete Workspace Description2": "Deleting (<1>{{workspace}}) will delete both local and cloud data, this operation cannot be undone, please proceed with caution.", "Delete Workspace placeholder": "Please type “Delete” to confirm", @@ -129,15 +133,13 @@ "Enable AFFiNE Cloud Description": "If enabled, the data in this workspace will be backed up and synchronised via AFFiNE Cloud.", "Enable": "Enable", "Sign in and Enable": "Sign in and Enable", - "Not now": "Not now", + "Skip": "Skip", "Publishing": "Publishing to web requires AFFiNE Cloud service.", "Share with link": "Share with link", "Copy Link": "Copy Link", "Publishing Description": "After publishing to the web, everyone can view the content of this workspace through the link.", - "Export Description": "You can export the entire Workspace data for backup, and the exported data can be re-impored.", "Stop publishing": "Stop publishing", "Publish to web": "Publish to web", - "Download data": "Download {{CoreOrAll}} data", "General": "General", "Sync": "Sync", "Collaboration": "Collaboration", @@ -145,12 +147,15 @@ "Workspace Settings": "Workspace Settings", "Export Workspace": "Export Workspace <1>{{workspace}} is coming soon", "Leave Workspace Description": "After you leave, you will no longer be able to access the contents of this workspace.", - "Sign in": "Sign in AFFiNE Cloud", "Sync Description": "{{workspaceName}} is a Local Workspace. All data is stored on the current device. You can enable AFFiNE Cloud for this workspace to keep data in sync with the cloud.", "Sync Description2": "<1>{{workspaceName}} is a Cloud Workspace. All data will be synchronised and saved to AFFiNE Cloud.", "Delete Workspace Description": "Deleting (<1>{{workspace}}) cannot be undone, please proceed with caution. All contents will be lost.", + "Sign in": "Sign in AFFiNE Cloud", "core": "core", "all": "all", + "Data sync mode": "Data sync mode", + "Favorites": "Favorites", + "Download data": "Download {{CoreOrAll}} data", "Back Home": "Back Home", "Set a Workspace name": "Set a Workspace name", "Retain local cached data": "Retain local cached data", @@ -177,10 +182,9 @@ "Download data Description1": "It takes up more space on your device.", "Download data Description2": "It takes up little space on your device.", "Enabled success": "Enabled success", - "Export AFFINE backup file": "Export AFFINE backup file (coming soon)", - "Data sync mode": "Data sync mode", + "Sign out": "Sign out", + "All data has been stored in the cloud": "All data has been stored in the cloud. ", "Download all data": "Download all data", - "It takes up more space on your device.": "It takes up more space on your device.", - "Download core data": "Download core data", - "It takes up little space on your device.": "It takes up little space on your device." + "emptyFavorite": "Click Add to Favorites and the page will appear here.", + "Sign out description": "Signing out will cause the unsynchronised content to be lost." } diff --git a/packages/i18n/src/resources/fr.json b/packages/i18n/src/resources/fr.json index 8077319316..c88c7bcb65 100644 --- a/packages/i18n/src/resources/fr.json +++ b/packages/i18n/src/resources/fr.json @@ -1,21 +1,24 @@ { "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", + "all": "tout", "Download data Description2": "Cela prendra peu d'espace sur votre appareil.", + "Copied link to clipboard": "Lien copié dans le presse-papier", "Enabled success": "Activation réussie", - "Cloud Workspace": "Espace de travail distant", "Failed to publish workspace": "La publication de l'espace de travail a échoué", - "Force Sign Out": "Forcer la déconnexion", "Joined Workspace": "L'espace de travail a été rejoint", "Local Workspace": "Espace de travail local", - "Local Workspace Description": "Toutes les données sont stockées sur le périphérique actuel. Vous pouvez activer AFFiNE Cloud pour garder les données de cet espace de travail synchronisé dans le cloud.", - "Published Description": "L'espace de travail courant a été publié sur le net, tout le monde peut voir son contenu à partir du lien.", + "Published Description": "L'espace de travail actuel a été publié sur Internet. Tout le monde peut voir son contenu à partir du lien.", + "Local Workspace Description": "Toutes les données sont stockées sur cet appareil. Vous pouvez activer AFFiNE Cloud pour garder les données de cet espace de travail synchronisé dans le cloud.", "Retain local cached data": "Conserver les données du cache local", - "Copied link to clipboard": "Lien copié dans le presse-papier", - "Published to Web": "Publié sur internet", - "Set a Workspace name": "Définir un nom pour l'espace de travail", + "Cloud Workspace": "Espace de travail distant", + "Force Sign Out": "Forcer la déconnexion", "Wait for Sync": "Attendre la synchronisation", "Available Offline": "Disponible hors ligne", "Delete Member?": "Supprimer le membre ?", + "All data has been stored in the cloud": "Toutes les données ont été sauvegardées dans le cloud.", + "Published to Web": "Publié sur Internet", + "Set a Workspace name": "Définir un nom pour l'espace de travail", + "Sign out description": "Se déconnecter provoquera la perte du contenu non synchronisé.", "404 - Page Not Found": "Erreur 404 - Page non trouvée", "AFFiNE Community": "Communauté AFFiNE", "Add to favorites": "Ajouter aux favoris", @@ -83,15 +86,15 @@ "TrashButtonGroupTitle": "Supprimer définitivement", "restored": "{{title}} a été restauré ", "Heading": "Titre {{number}}", - "Upload": "Uploader ", "Code block": "Bloc de code", + "Member": "Membre", "Collapse sidebar": "Rabattre la barre latérale", "Connector": "Connecteur (bientôt disponible) ", "Increase indent": "Augmenter l'indentation", "Reduce indent": "Réduire l'indentation du texte", "Inline code": "Ligne de code", "Strikethrough": "Barré", - "Member": "Membre", + "Upload": "Uploader ", "ClearData": "Effacer les données locales", "Collaboration": "Collaboration", "Collaboration Description": "La collaboration avec d'autres membres nécessite AFFiNE Cloud.", @@ -148,13 +151,15 @@ "login success": "Connexion réussie", "mobile device description": "Nous travaillons toujours sur le support des appareils mobiles. Ainsi, nous vous recommandons d'utiliser un ordinateur.", "still designed": "(Cette page est toujours en cours de conception.)", - "Body text": "Corps du texte", "Back Home": "Retour à l'accueil", - "Member has been removed": "{{name}} a été supprimé", + "Confirm": "Confirmer", + "Download core data": "Télécharger les données principales", "Not now": "Pas maintenant", + "Member has been removed": "{{name}} a été supprimé", "Owner": "Propriétaire", "Workspace Avatar": "Avatar de l'espace de travail", - "core": "l'essentiel", + "Body text": "Corps du texte", + "Data sync mode": "Mode de synchronisation des données", "All changes are saved locally": "Les changements sont sauvegardés localement", "Continue with Google": "Se connecter avec Google ", "Delete": "Supprimer objet ", @@ -162,14 +167,23 @@ "Share with link": "Partager un lien", "Sync Description": "{{workspaceName}} est un espace de travail local. Toutes ses données sont stockées sur le périphérique actuel. Vous pouvez activer AFFiNE Cloud pour garder les données de cet espace de travail synchronisé dans le cloud.", "TrashButtonGroupDescription": "Une fois supprimé, vous ne pouvez pas retourner en arrière. Confirmez-vous la suppression ? ", - "all": "Tout", "mobile device": "Il semblerait que vous naviguiez sur un appareil mobile.", "recommendBrowser": "Pour une expérience optimale, nous vous recommandons le navigateur <1>Chrome.", "upgradeBrowser": "Veuillez installer la dernière version de Chrome pour bénéficier d'une expérience optimale.", + "core": "l'essentiel", + "Download data": "Télécharger les données {{CoreOrAll}}", + "Export Description": "Vous pouvez exporter l'intégralité des données de l'espace de travail à titre de sauvegarde ; les données ainsi exportées peuvent être réimportées.", + "Download all data": "Télécharger toutes les données", + "Download data Description1": "Cela prendra davantage d'espace sur votre appareil.", + "It takes up more space on your device": { + "": "Cela prendra davantage d'espace sur votre appareil." + }, + "It takes up little space on your device": { + "": "Cela prendra peu d'espace sur votre appareil." + }, "is a Cloud Workspace": "est un espace de travail distant", - "is a Local Workspace": "est un espace de travail local", "will delete member": "supprimera le membre", + "is a Local Workspace": "est un espace de travail local", "Cloud Workspace Description": "Toutes les données vont être synchronisées et sauvegardées sur le compte AFFiNE <1>{{email}}", - "Download data Description1": "Cela prendra plus d'espace sur votre appareil.", - "Download data": "Télécharger les données {{CoreOrAll}}" + "Export AFFiNE backup file": "Exporter un fichier de sauvegarde AFFiNE (à venir...)" } diff --git a/packages/i18n/src/resources/index.ts b/packages/i18n/src/resources/index.ts index 069fcc7a2e..ee650eb81c 100644 --- a/packages/i18n/src/resources/index.ts +++ b/packages/i18n/src/resources/index.ts @@ -1,7 +1,6 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. // Run `pnpm run download-resources` to regenerate. // To overwrite this, please overwrite download.ts script. -import pt_BR from './pt-BR.json'; import en from './en.json'; import zh_Hans from './zh-Hans.json'; import fr from './fr.json'; @@ -9,16 +8,6 @@ import de from './de.json'; import ru from './ru.json'; export const LOCALES = [ - { - id: 1000040021, - name: 'Portuguese (Brazil)', - tag: 'pt-BR', - originalName: 'português (Brasil)', - flagEmoji: '🇧🇷', - base: false, - completeRate: 0.8022598870056498, - res: pt_BR, - }, { id: 1000040001, name: 'English', @@ -26,7 +15,7 @@ export const LOCALES = [ originalName: 'English', flagEmoji: '🇬🇧', base: true, - completeRate: 1.0169491525423728, + completeRate: 1, res: en, }, { @@ -36,7 +25,7 @@ export const LOCALES = [ originalName: '简体中文', flagEmoji: '🇨🇳', base: false, - completeRate: 0.9548022598870056, + completeRate: 0.9835164835164835, res: zh_Hans, }, { @@ -46,7 +35,7 @@ export const LOCALES = [ originalName: 'français', flagEmoji: '🇫🇷', base: false, - completeRate: 0.96045197740113, + completeRate: 0.989010989010989, res: fr, }, { @@ -56,7 +45,7 @@ export const LOCALES = [ originalName: 'Deutsch', flagEmoji: '🇩🇪', base: false, - completeRate: 0.9548022598870056, + completeRate: 0.9285714285714286, res: de, }, { @@ -66,7 +55,7 @@ export const LOCALES = [ originalName: 'русский', flagEmoji: '🇷🇺', base: false, - completeRate: 0.9887005649717514, + completeRate: 0.989010989010989, res: ru, }, ] as const; diff --git a/packages/i18n/src/resources/pt-BR.json b/packages/i18n/src/resources/pt-BR.json deleted file mode 100644 index c6a6a90e2c..0000000000 --- a/packages/i18n/src/resources/pt-BR.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "404 - Page Not Found": "404 - Página não encontrada", - "AFFiNE Community": "Comunidade AFFiNE", - "Access level": "Nível de acesso", - "Add to favorites": "Adicionar aos favoritos", - "Added to Favorites": "Adicionado aos Favoritos", - "All changes are saved locally": "Todas as alterações estão salvas localmente", - "All pages": "Todas páginas", - "Body text": "Texto do Corpo", - "Bold": "Negrito", - "Cancel": "Cancelar", - "ClearData": "Limpar cache local", - "Code block": "Bloco de código", - "Collaboration": "Colaboração", - "Collaboration Description": "Colaborar com outros membros exige o serviço AFFiNE Cloud.", - "Collapse sidebar": "Ocultar barra lateral", - "Connector": "Conector (em breve)", - "Contact Us": "Entre em contato", - "Continue with Google": "Continue com o Google", - "Convert to ": "Converter para", - "Copy Link": "Copiar link", - "Create": "Criar", - "Create Or Import": "Criar ou Importar", - "Created": "Criado", - "Delete": "Deletar", - "Delete Workspace": "Deletar Workspace", - "login success": "Login feito com sucesso", - "core": "core", - "all": "todos", - "Users": "Usuários", - "Upload": "Upload", - "Updated": "Atualizado", - "Untitled": "Sem título", - "Undo": "Desfazer", - "Underline": "Sublinhar", - "TrashButtonGroupTitle": "Deletar permanentemente", - "TrashButtonGroupDescription": "Uma vez deletado, você não poderá desfazer esta ação. Deseja confirmar?", - "Trash": "Lixeira", - "Title": "Título", - "Tips": "Dicas:", - "Text": "Texto (em breve)", - "Sync": "Sincronizar", - "Stop publishing": "Para a publicação", - "Skip": "Pular", - "Sign out": "Deslogar da AFFiNE Cloud", - "Sign in and Enable": "Logar na conta e Habilitar", - "Sign in": "Logar na AFFiNE Cloud", - "Shortcuts": "Atalhos", - "Share with link": "Compartilhar com link", - "Shape": "Forma", - "Settings": "Configurações", - "Select": "Selecionar", - "Restore it": "Restaurar", - "Removed from Favorites": "Removido dos Favoritos", - "Remove from favorites": "Remover dos Favoritos", - "Reduce indent": "Reduzir o espaço do indento", - "Redo": "Refazer", - "Quick search placeholder2": "Pesquisar em {{workspace}}", - "Quick search placeholder": "Pesquisa rápida...", - "Quick search": "Pesquisa rápida", - "Publish to web": "Publicar na Web", - "Publish": "Publicar", - "Permanently deleted": "Deletado permanentemente", - "Pending": "Pendente", - "Pen": "Caneta (em breve)", - "Paper": "Papel", - "Page": "Página", - "Open in new tab": "Abrir em uma nova aba", - "Ooops!": "Ooops!", - "Once deleted, you can't undo this action": { - "": "Uma vez deletado, esta ação não pode ser desfeita." - }, - "Official Website": "Website Oficial", - "NotLoggedIn": "Você não está logado no momento", - "Non-Gmail": "Apenas o Gmail é suportado momento. Demais e-mails não são.", - "No item": "Nenhum item", - "New Workspace": "Nova Workspace", - "New Page": "Nova Página", - "New Keyword Page": "Nova página '{{query}}' ", - "My Workspaces": "Minhas Workspaces", - "Moved to Trash": "Movido para a Lixeira", - "Loading": "Carregando...", - "Link": "Hyperlink (com o texto selecionado)", - "Leave Workspace Description": "Depois de você sair, você não conseguirá acessar os conteúdos dessa Workspace.", - "Leave Workspace": "Sair da Workspace.", - "Leave": "Sair", - "Keyboard Shortcuts": "Atalhos do Teclado", - "Jump to": "Pular para", - "Italic": "Itálico", - "Invite Members": "Convidar Membros", - "Invite": "Convidar", - "Invite placeholder": "Pesquisar e-mail (Apenas Gmail)", - "Inline code": "Código inline", - "Increase indent": "Aumentar Indento", - "Import": "Importar", - "Got it": "Entendi", - "How is AFFiNE Alpha different?": "Como AFFiNE Alpha é diferente?", - "Heading": "Cabeçalho {{number}}", - "Get in touch!": "Entre em contato!", - "General": "Geral", - "Find 0 result": "Foram encontrados 0 resultados", - "Find results": "Foram encontrados {{number}} resultados", - "Favorites": "Favoritos", - "Favorited": "Favoritado", - "Favorite": "Favorito", - "Export to HTML": "Exportar para HTML", - "Export to Markdown": "Exportar para Markdown", - "Export": "Exportar", - "Export Workspace": "Exportar Workspace <1>{{workspace}} (em breve)", - "Expand sidebar": "Expandir barra lateral", - "Enable AFFiNE Cloud Description": "Se habilitada, os dados desta Workspace serão salvos e sincronizados via AFFiNE Cloud.", - "Enable AFFiNE Cloud": "Habilitar AFFiNE Cloud", - "Enable": "Habilitar", - "Divider": "Divisor", - "Delete permanently?": "Deletar permanentemente?", - "Delete permanently": "Deletar permanentemente", - "Delete page?": "Deletar página?", - "Delete Workspace placeholder": "Por favor, digite \"Delete\" para confirmar", - "will be moved to Trash": "\n{{title}} será movido para a Lixeira", - "upgradeBrowser": "Por favor, atualize o seu Chrome para a última versão para poder usufruir da melhor experiência.", - "still designed": "(Está página está em construção.)", - "restored": "{{title}} foi restaurado", - "recommendBrowser": "Nós recomendamos o navegador <1>Chrome para a melhor experiência de uso.", - "mobile device description": "Nós ainda estamos trabalhando na versão mobile e recomendamos que você utilize um computador.", - "mobile device": "Parece que você está acessando de um smartphone.", - "emptyTrash": "Clique Adicionar para Lixeira e a página irá aparecer aqui.", - "emptyFavorite": "Clique Adicionar para Favoritos e a página irá aparecer aqui.", - "emptyAllPages": "Esta Workspace está vazia. Crie uma nova página para começar a editá-la.", - "Workspace Type": "Tipo de Workspace", - "Workspace Settings": "Configurações da Workspace", - "Workspace Name": "Nome da Workspace", - "Workspace Icon": "Ícone da Workspace", - "Strikethrough": "Riscado", - "Sticky": "Sticky (em breve)", - "Stay logged out": "Permanecer deslogado", - "Set up an AFFiNE account to sync data": "Crie uma conta AFFiNE para sincronizar seus dados", - "Markdown Syntax": "Sintaxe Markdown", - "Publishing Description": "Após publicar para a web, qualquer pessoa poderá ver o conteúdo desta Workspace através do link.", - "Publishing": "Publicar para a web demanda o serviço AFFiNE Cloud.", - "Delete Workspace Description": "Deletar (<1>{{workspace}}) não pode ser desfeito, por favor proceder com atenção. Todos os conteúdos da sua Workspace serão perdidos. ", - "Delete Workspace Description2": "Deletar (<1>{{workspace}}) deletará na cópia local e na nuvem contratada, esta operação não pode ser desfeita, por favor proceda com atenção.", - "Workspace description": "Workspace é o seu espaço virtual para capturar, criar e planejar individualmente ou colaborando com sua equipe.", - "Sync Description2": "<1>{{workspaceName}} é uma Workspace armazenada na Nuvem. Todos os dados serão sincronizados e salvos na AFFiNE Cloud.", - "Edgeless": "Sem Bordas", - "Sync Description": "{{workspaceName}} é uma Workspace local. Todo o conteúdo dela está armazenado no seu equipamento. Você pode habilitar a AFFiNE Cloud para esta Workspace para manter os dados salvos e sincronizados pela nuvem." -} diff --git a/packages/i18n/src/resources/ru.json b/packages/i18n/src/resources/ru.json index 748fa5eade..18ef25f704 100644 --- a/packages/i18n/src/resources/ru.json +++ b/packages/i18n/src/resources/ru.json @@ -1,5 +1,6 @@ { "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", + "Export AFFiNE backup file": "Экспорт файла резервной копии AFFiNE (скоро)", "Local Workspace Description": "Все данные сохраняются на текущем устройстве. Вы можете включить AFFiNE Cloud для этого рабочего пространства, чтобы синхронизировать данные с облаком.", "Member": "Участник", "Member has been removed": "{{name}} был удален", @@ -7,6 +8,8 @@ "is a Cloud Workspace": "это облачное рабочее пространство.", "Workspace Avatar": "Аватар рабочего пространства", "Published to Web": "Опубликовано в Интернете", + "Sign out description": "Выход приведет к потере несинхронизированного контента.", + "Export Description": "Вы можете экспортировать все данные рабочего пространства, а экспортированные данные можно повторно импортировать.", "is a Local Workspace": "это локальное рабочее пространство", "Wait for Sync": "Дождитесь синхронизации", "Set a Workspace name": "Задайте имя рабочего пространства", @@ -16,6 +19,12 @@ "will delete member": "удалит участника", "Not now": "Не сейчас", "Download all data": "Скачать все данные", + "It takes up little space on your device": { + "": "Занимает мало места на вашем устройстве." + }, + "It takes up more space on your device": { + "": "Занимает много места на вашем устройстве." + }, "All data has been stored in the cloud": "Все данные хранятся в облаке.", "Confirm": "Подтвердить", "Data sync mode": "Режим синхронизации данных", diff --git a/packages/i18n/src/resources/zh-Hans.json b/packages/i18n/src/resources/zh-Hans.json index 9c19d11634..ec3f2905af 100644 --- a/packages/i18n/src/resources/zh-Hans.json +++ b/packages/i18n/src/resources/zh-Hans.json @@ -6,6 +6,9 @@ "will delete member": "将删除成员", "Download data Description1": "此操作会在你的设备上占用更多空间。", "Download data Description2": "此操作会在你的设备上占用少许空间。", + "It takes up more space on your device": { + "": "此操作会在你的设备上占用更多空间。" + }, "Cloud Workspace": "云端工作区", "Cloud Workspace Description": "所有数据将被同步并保存在AFFiNE账户(<1>{{email}})中", "Copied link to clipboard": "复制链接到剪贴板", @@ -13,10 +16,14 @@ "Back Home": "返回首页", "Enabled success": "启用成功", "Published Description": "当前工作区已被发布到Web,所有人都可以通过链接来查看此工作区内容。", + "All data has been stored in the cloud": "所有数据已被保存在云端。", "Download data": "下载 {{CoreOrAll}} 数据", "Force Sign Out": "强制登出", "Joined Workspace": "加入工作区", "Local Workspace": "本地工作区", + "Confirm": "确认", + "Download all data": "下载所有数据", + "Download core data": "下载核心数据", "Add to favorites": "加入收藏", "All pages": "全部页面", "Cancel": "取消", @@ -167,8 +174,13 @@ "Member has been removed": "{{name}} 已被移除。", "Owner": "所有者", "Published to Web": "公开到互联网", + "Data sync mode": "数据同步模式", + "Export AFFiNE backup file": "导出 AFFiNE 备份文件(即将到来)", "Retain local cached data": "保留本地缓存数据", "Set a Workspace name": "设置工作区名字", "Workspace Avatar": "工作区头像", - "is a Local Workspace": "是本地工作区" + "is a Local Workspace": "是本地工作区", + "Sign out description": "登出会导致未同步的内容丢失", + "Not now": "稍后再说", + "Saved then enable AFFiNE Cloud": "所有改动已保存在本地,点击启用 AFFiNE 云服务" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index baec36c3ba..32068d00c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -160,7 +160,7 @@ importers: '@affine/i18n': workspace:* '@blocksuite/blocks': 0.4.0-20230210031655-264744e '@blocksuite/editor': 0.4.0-20230210031655-264744e - '@blocksuite/icons': ^2.0.2 + '@blocksuite/icons': ^2.0.14 '@blocksuite/store': 0.4.0-20230210031655-264744e '@emotion/css': ^11.10.5 '@emotion/react': ^11.10.5 @@ -203,7 +203,7 @@ importers: '@affine/i18n': link:../../packages/i18n '@blocksuite/blocks': 0.4.0-20230210031655-264744e_tryoyswiy2ympczjdv3b3agdeu '@blocksuite/editor': 0.4.0-20230210031655-264744e_j74rmblk7sdmtedyaf3ziv736m - '@blocksuite/icons': 2.0.4_w5j4k42lgipnm43s3brx6h3c34 + '@blocksuite/icons': 2.0.14_w5j4k42lgipnm43s3brx6h3c34 '@blocksuite/store': 0.4.0-20230210031655-264744e_lit@2.6.1+yjs@13.5.45 '@emotion/css': 11.10.5 '@emotion/react': 11.10.5_w5j4k42lgipnm43s3brx6h3c34 @@ -2838,6 +2838,16 @@ packages: zod: 3.20.6 dev: false + /@blocksuite/icons/2.0.14_w5j4k42lgipnm43s3brx6h3c34: + resolution: {integrity: sha512-1uStOtcn13ncC+/ne51Aywwo1er0a6IKFhC84B8mqUXxFdmJkYEQ1NLSxHW/HktwwWgMQYNE//ohKFnAPe5YGg==} + peerDependencies: + '@types/react': ^18.0.25 + react: ^18.2.0 + dependencies: + '@types/react': 18.0.20 + react: 18.2.0 + dev: false + /@blocksuite/icons/2.0.4_3stiutgnnbnfnf3uowm5cip22i: resolution: {integrity: sha512-Ewx30d3W6MXJGPXYvv48UpvAVfDB+gIVu90sHZX5curnSn+e1DdpCVfL0DeZA7Iyq6aLbxnKVzOAewlfoP8kDQ==} peerDependencies: @@ -2848,16 +2858,6 @@ packages: react: 18.2.0 dev: false - /@blocksuite/icons/2.0.4_w5j4k42lgipnm43s3brx6h3c34: - resolution: {integrity: sha512-Ewx30d3W6MXJGPXYvv48UpvAVfDB+gIVu90sHZX5curnSn+e1DdpCVfL0DeZA7Iyq6aLbxnKVzOAewlfoP8kDQ==} - peerDependencies: - '@types/react': ^18.0.25 - react: ^18.2.0 - dependencies: - '@types/react': 18.0.20 - react: 18.2.0 - dev: false - /@blocksuite/phasor/0.4.0-20230209191848-0a912e3_lit@2.6.1: resolution: {integrity: sha512-7plV7v9F4KoqbGUZCyyI78HzxfZlP6jNZ9I8PEEap+JlUtsmryxHrEVC/oEta4FW6kBflmtQm46YOAlz3bBQFw==} peerDependencies: diff --git a/tests/libs/page-logic.ts b/tests/libs/page-logic.ts index 09385a4cb0..2c15dd4bdc 100644 --- a/tests/libs/page-logic.ts +++ b/tests/libs/page-logic.ts @@ -8,6 +8,6 @@ export async function clickPageMoreActions(page: Page) { return page .getByTestId('editor-header-items') .getByRole('button') - .nth(2) + .nth(1) .click(); } diff --git a/tests/login.spec.ts b/tests/login.spec.ts index ec8da1ffa7..ec464c70e3 100644 --- a/tests/login.spec.ts +++ b/tests/login.spec.ts @@ -14,16 +14,6 @@ test.describe('Login Flow', () => { .getByRole('heading', { name: 'Currently not logged in' }) .click(); }); - - test.skip('Open login modal by click cloud-unsync-icon', async ({ page }) => { - await page.getByTestId('cloud-unsync-icon').click(); - - await page.waitForTimeout(800); - await page - .getByRole('heading', { name: 'Currently not logged in' }) - .click(); - }); - // not stable // test.skip('Open google firebase page', async ({ page }) => { // await page.getByTestId('current-workspace').click();