mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
feat: add language switch in workspace modal
This commit is contained in:
@@ -15,6 +15,7 @@ import { useAppState } from '@/providers/app-state-provider';
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
import { LanguageMenu } from './languageMenu';
|
||||||
|
|
||||||
interface WorkspaceModalProps {
|
interface WorkspaceModalProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@@ -37,7 +38,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => {
|
|||||||
>
|
>
|
||||||
<Header>
|
<Header>
|
||||||
<ContentTitle>{t('My Workspaces')}</ContentTitle>
|
<ContentTitle>{t('My Workspaces')}</ContentTitle>
|
||||||
{/* <LanguageMenu /> */}
|
<LanguageMenu />
|
||||||
<ModalCloseButton
|
<ModalCloseButton
|
||||||
top={6}
|
top={6}
|
||||||
right={6}
|
right={6}
|
||||||
|
|||||||
@@ -178,20 +178,6 @@ export const WorkSpaceSliderBar = () => {
|
|||||||
<TrashIcon /> {t('Trash')}
|
<TrashIcon /> {t('Trash')}
|
||||||
</StyledListItem>
|
</StyledListItem>
|
||||||
</Link>
|
</Link>
|
||||||
<StyledListItem
|
|
||||||
onClick={() => {
|
|
||||||
changeLanguage('en');
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<SettingsIcon /> change to English
|
|
||||||
</StyledListItem>
|
|
||||||
<StyledListItem
|
|
||||||
onClick={() => {
|
|
||||||
changeLanguage('zh-Hans');
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<SettingsIcon /> 切换到中文
|
|
||||||
</StyledListItem>
|
|
||||||
<StyledNewPageButton
|
<StyledNewPageButton
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
const pageId = await createPage();
|
const pageId = await createPage();
|
||||||
|
|||||||
Reference in New Issue
Block a user