mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 04:36:13 +08:00
fix: publish style
This commit is contained in:
@@ -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>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user