mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
feat: support disable legacy cloud (#2006)
This commit is contained in:
+13
-10
@@ -1,4 +1,5 @@
|
||||
import { Button, IconButton, Menu, MenuItem, Wrapper } from '@affine/component';
|
||||
import { config } from '@affine/env';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { PermissionType } from '@affine/workspace/affine/api';
|
||||
import type { AffineWorkspace, LocalWorkspace } from '@affine/workspace/type';
|
||||
@@ -171,16 +172,18 @@ const LocalCollaborationPanel: React.FC<
|
||||
return (
|
||||
<>
|
||||
<Wrapper marginBottom="42px">{t('Collaboration Description')}</Wrapper>
|
||||
<Button
|
||||
data-testid="local-workspace-enable-cloud-button"
|
||||
type="light"
|
||||
shape="circle"
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
>
|
||||
{t('Enable AFFiNE Cloud')}
|
||||
</Button>
|
||||
{config.enableLegacyCloud && (
|
||||
<Button
|
||||
data-testid="local-workspace-enable-cloud-button"
|
||||
type="light"
|
||||
shape="circle"
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
>
|
||||
{t('Enable AFFiNE Cloud')}
|
||||
</Button>
|
||||
)}
|
||||
<TransformWorkspaceToAffineModal
|
||||
open={open}
|
||||
onClose={() => {
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
Input,
|
||||
Wrapper,
|
||||
} from '@affine/component';
|
||||
import { config } from '@affine/env';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import type { AffineWorkspace, LocalWorkspace } from '@affine/workspace/type';
|
||||
import { WorkspaceFlavour } from '@affine/workspace/type';
|
||||
@@ -120,16 +121,18 @@ const PublishPanelLocal: React.FC<PublishPanelLocalProps> = ({
|
||||
>
|
||||
{t('Publishing')}
|
||||
</Box>
|
||||
<Button
|
||||
data-testid="publish-enable-affine-cloud-button"
|
||||
type="light"
|
||||
shape="circle"
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
>
|
||||
{t('Enable AFFiNE Cloud')}
|
||||
</Button>
|
||||
{config.enableLegacyCloud && (
|
||||
<Button
|
||||
data-testid="publish-enable-affine-cloud-button"
|
||||
type="light"
|
||||
shape="circle"
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
>
|
||||
{t('Enable AFFiNE Cloud')}
|
||||
</Button>
|
||||
)}
|
||||
<EnableAffineCloudModal
|
||||
open={open}
|
||||
onClose={() => {
|
||||
|
||||
Reference in New Issue
Block a user