mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 13:58:50 +08:00
chore: update syncPage style
This commit is contained in:
@@ -2,6 +2,8 @@ import {
|
|||||||
StyledPublishContent,
|
StyledPublishContent,
|
||||||
StyledPublishCopyContainer,
|
StyledPublishCopyContainer,
|
||||||
StyledPublishExplanation,
|
StyledPublishExplanation,
|
||||||
|
StyledWorkspaceName,
|
||||||
|
StyledWorkspaceType,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { DownloadIcon } from '@blocksuite/icons';
|
import { DownloadIcon } from '@blocksuite/icons';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@/ui/button';
|
||||||
@@ -9,6 +11,7 @@ import { Menu, MenuItem } from '@/ui/menu';
|
|||||||
import { WorkspaceUnit } from '@affine/datacenter';
|
import { WorkspaceUnit } from '@affine/datacenter';
|
||||||
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
||||||
import { Trans, useTranslation } from '@affine/i18n';
|
import { Trans, useTranslation } from '@affine/i18n';
|
||||||
|
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
||||||
export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||||
const { enableWorkspace } = useWorkspaceHelper();
|
const { enableWorkspace } = useWorkspaceHelper();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -18,11 +21,20 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
|||||||
{workspace.provider === 'local' ? (
|
{workspace.provider === 'local' ? (
|
||||||
<>
|
<>
|
||||||
<StyledPublishExplanation>
|
<StyledPublishExplanation>
|
||||||
{t('Sync Description', {
|
<WorkspaceUnitAvatar
|
||||||
workspaceName: workspace.name ?? 'Affine',
|
size={32}
|
||||||
})}
|
name={workspace.name}
|
||||||
|
workspaceUnit={workspace}
|
||||||
|
/>
|
||||||
|
<StyledWorkspaceName>
|
||||||
|
{workspace.name}
|
||||||
|
</StyledWorkspaceName>
|
||||||
|
<StyledWorkspaceType>is a Local Workspace.</StyledWorkspaceType>
|
||||||
</StyledPublishExplanation>
|
</StyledPublishExplanation>
|
||||||
|
<StyledWorkspaceType>
|
||||||
|
All data is stored on the current device. You can enable AFFiNE
|
||||||
|
Cloud for this workspace to keep data in sync with the cloud.
|
||||||
|
</StyledWorkspaceType>
|
||||||
<StyledPublishCopyContainer>
|
<StyledPublishCopyContainer>
|
||||||
<Button
|
<Button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@@ -30,6 +42,7 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
|||||||
}}
|
}}
|
||||||
type="primary"
|
type="primary"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
|
style={{ fontWeight: '500' }}
|
||||||
>
|
>
|
||||||
{t('Enable AFFiNE Cloud')}
|
{t('Enable AFFiNE Cloud')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user