mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-27 02:44:49 +03:00
fix: publish style
This commit is contained in:
parent
4e3af83bbf
commit
17c79eebe4
@ -47,16 +47,14 @@ export const MembersPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
// }, [workspace.id]);
|
||||
|
||||
useEffect(() => {
|
||||
setMembersList();
|
||||
// refreshMembers();
|
||||
});
|
||||
|
||||
const setMembersList = () => {
|
||||
const members = getMembers(workspace.id);
|
||||
members && setMembers(members);
|
||||
};
|
||||
useEffect(() => {
|
||||
setMembersList();
|
||||
// refreshMembers();
|
||||
}, [setMembersList]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
@ -39,10 +39,10 @@ export const PublishPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
}).then(confirm => {
|
||||
if (confirm) {
|
||||
if (user) {
|
||||
updateWorkspaceMeta(workspace.id, { isPublish: true });
|
||||
updateWorkspaceMeta(workspace.id, { type: 'cloud' });
|
||||
} else {
|
||||
login();
|
||||
updateWorkspaceMeta(workspace.id, { isPublish: true });
|
||||
updateWorkspaceMeta(workspace.id, { type: 'cloud' });
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -57,9 +57,7 @@ export const PublishPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
<StyledPublishExplanation>
|
||||
Publishing to web requires AFFiNE Cloud service .
|
||||
</StyledPublishExplanation>
|
||||
<StyledSettingH2 marginTop={48}>
|
||||
Share with link
|
||||
</StyledSettingH2>
|
||||
<StyledSettingH2>Share with link</StyledSettingH2>
|
||||
<StyledPublishCopyContainer>
|
||||
<Input width={500} value={shareUrl} disabled={true}></Input>
|
||||
<StyledCopyButtonContainer>
|
||||
@ -76,17 +74,7 @@ export const PublishPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
</StyledPublishExplanation>
|
||||
)}
|
||||
</StyledPublishContent>
|
||||
{!workspace.isPublish ? (
|
||||
<Button
|
||||
onClick={() => {
|
||||
togglePublic(true);
|
||||
}}
|
||||
type="primary"
|
||||
shape="circle"
|
||||
>
|
||||
Publish to web
|
||||
</Button>
|
||||
) : (
|
||||
{workspace.isPublish ? (
|
||||
<Button
|
||||
onClick={() => {
|
||||
togglePublic(false);
|
||||
@ -96,6 +84,16 @@ export const PublishPage = ({ workspace }: { workspace: Workspace }) => {
|
||||
>
|
||||
Stop publishing
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
onClick={() => {
|
||||
togglePublic(true);
|
||||
}}
|
||||
type="primary"
|
||||
shape="circle"
|
||||
>
|
||||
Publish to web
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
|
@ -215,8 +215,7 @@ export const StyledPublishCopyContainer = styled('div')(() => {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
|
||||
height: '38px',
|
||||
marginBottom: '20px',
|
||||
paddingTop: '20px',
|
||||
};
|
||||
});
|
||||
|
@ -156,7 +156,6 @@ export const TemporaryHelperProvider = ({
|
||||
setWorkspaceMetaList(workspacesMeta);
|
||||
},
|
||||
setActiveWorkspace(workspaceData) {
|
||||
console.log('workspaceData: ', workspaceData);
|
||||
localStorage.setItem(
|
||||
'affine-active-workspace',
|
||||
JSON.stringify(workspaceData)
|
||||
|
Loading…
Reference in New Issue
Block a user