Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: setting style

DiamondThree890e353dc77b
diff --git a/packages/app/src/components/workspace-avatar/index.tsx b/packages/app/src/components/workspace-avatar/index.tsx
index 494758100e..ebce8a9f13 100644
--- a/packages/app/src/components/workspace-avatar/index.tsx
+++ b/packages/app/src/components/workspace-avatar/index.tsx
@@ -13,7 +13,6 @@ export const WorkspaceAvatar = (props: IWorkspaceAvatar) => {
const sizeStr = size + 'px';
const { dataCenter, currentWorkspace } = useAppState();
dataCenter.getBlob(currentWorkspace, props.avatar).then(res => {
- console.log(res);
setAvatar(res ?? '');
});
const [avatar, setAvatar] = useState<string>(props.avatar);
diff --git a/packages/app/src/components/workspace-setting/MembersPage.tsx b/packages/app/src/components/workspace-setting/MembersPage.tsx
index e596e2d5f8..32639f874f 100644
--- a/packages/app/src/components/workspace-setting/MembersPage.tsx
+++ b/packages/app/src/components/workspace-setting/MembersPage.tsx
@@ -10,6 +10,7 @@ import {
StyledMemberRoleContainer,
StyledMemberTitleContainer,
StyledMoreVerticalButton,
+ StyledPublishExplanation,
} from './style';
import { MoreVerticalIcon, EmailIcon, TrashIcon } from '@blocksuite/icons';
import { useEffect, useState } from 'react';
@@ -173,10 +174,8 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
</>
) : (
<StyledMemberWarp>
- <div style={{ flex: 1 }}>
- Collaborating with other members requires AFFiNE Cloud service.
- </div>
- <div style={{ height: '40px' }}>
+ <>Collaborating with other members requires AFFiNE Cloud service.</>
+ <StyledPublishExplanation>
<Button
type="primary"
shape="circle"
@@ -200,7 +199,7 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
>
Enable AFFiNE Cloud
</Button>
- </div>
+ </StyledPublishExplanation>
</StyledMemberWarp>
)}
</div>
diff --git a/packages/app/src/components/workspace-setting/SyncPage.tsx b/packages/app/src/components/workspace-setting/SyncPage.tsx
index 89c2df5a02..f2ffbeafec 100644
--- a/packages/app/src/components/workspace-setting/SyncPage.tsx
+++ b/packages/app/src/components/workspace-setting/SyncPage.tsx
@@ -6,29 +6,27 @@ import {
import { DownloadIcon } from '@blocksuite/icons';
import { Button } from '@/ui/button';
import { Menu, MenuItem } from '@/ui/menu';
-import { useTemporaryHelper } from '@/providers/temporary-helper-provider';
import { WorkspaceInfo } from '@affine/datacenter';
export const SyncPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
console.log('workspace: ', workspace);
- const { currentWorkspace, updateWorkspaceMeta } = useTemporaryHelper();
return (
<div>
<StyledPublishContent>
- {currentWorkspace?.type === 'local' ? (
+ {workspace?.provider === 'local' ? (
<>
<StyledPublishExplanation>
- {currentWorkspace.name} is 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.
+ {workspace.name ?? 'Affine'} is 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.
</StyledPublishExplanation>
<StyledPublishCopyContainer>
<Button
onClick={() => {
- updateWorkspaceMeta(currentWorkspace.id, {
- type: 'cloud',
- });
+ // updateWorkspaceMeta(currentWorkspace.id, {
+ // type: 'cloud',
+ // });
}}
type="primary"
shape="circle"
@@ -40,8 +38,8 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
) : (
<>
<StyledPublishExplanation>
- <code>{currentWorkspace && currentWorkspace.name}</code> is Cloud
- Workspace. All data will be synchronized and saved to the AFFiNE
+ <code>{workspace.name ?? 'Affine'}</code> is Cloud Workspace. All
+ data will be synchronized and saved to the AFFiNE
</StyledPublishExplanation>
<StyledPublishCopyContainer>
<Menu
diff --git a/packages/app/src/components/workspace-setting/general/style.ts b/packages/app/src/components/workspace-setting/general/style.ts
index 3ed8ff0b55..4a82017e96 100644
--- a/packages/app/src/components/workspace-setting/general/style.ts
+++ b/packages/app/src/components/workspace-setting/general/style.ts
@@ -30,8 +30,7 @@ export const StyledSettingAvatar = styled(MuiAvatar)(() => {
export const StyledMemberWarp = styled('div')(() => {
return {
display: 'flex',
- height: '500px',
flexDirection: 'column',
- padding: '60px 0',
+ padding: '40px 0',
};
});
diff --git a/packages/app/src/components/workspace-setting/style.ts b/packages/app/src/components/workspace-setting/style.ts
index bb6cc58034..a6b162fab3 100644
--- a/packages/app/src/components/workspace-setting/style.ts
+++ b/packages/app/src/components/workspace-setting/style.ts
@@ -7,6 +7,8 @@ export const StyledSettingContainer = styled('div')(({ theme }) => {
display: 'flex',
padding: '50px',
flexDirection: 'column',
+ height: '100vh',
+ overflow: 'auto',
};
});