mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
refactor: unify synced and un-synced affine workspace (#1299)
This commit is contained in:
+3
-3
@@ -19,7 +19,7 @@ import { lockMutex } from '../../../../../atoms';
|
||||
import { useMembers } from '../../../../../hooks/affine/use-members';
|
||||
import { transformWorkspace } from '../../../../../plugins';
|
||||
import {
|
||||
AffineRemoteWorkspace,
|
||||
AffineWorkspace,
|
||||
LocalWorkspace,
|
||||
RemWorkspaceFlavour,
|
||||
} from '../../../../../shared';
|
||||
@@ -45,7 +45,7 @@ import {
|
||||
|
||||
const AffineRemoteCollaborationPanel: React.FC<
|
||||
Omit<PanelProps, 'workspace'> & {
|
||||
workspace: AffineRemoteWorkspace;
|
||||
workspace: AffineWorkspace;
|
||||
}
|
||||
> = ({ workspace }) => {
|
||||
const [isInviteModalShow, setIsInviteModalShow] = useState(false);
|
||||
@@ -213,7 +213,7 @@ const LocalCollaborationPanel: React.FC<
|
||||
export const CollaborationPanel: React.FC<PanelProps> = props => {
|
||||
switch (props.workspace.flavour) {
|
||||
case RemWorkspaceFlavour.AFFINE: {
|
||||
const workspace = props.workspace as AffineRemoteWorkspace;
|
||||
const workspace = props.workspace as AffineWorkspace;
|
||||
return (
|
||||
<AffineRemoteCollaborationPanel {...props} workspace={workspace} />
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { lockMutex } from '../../../../../atoms';
|
||||
import { useToggleWorkspacePublish } from '../../../../../hooks/affine/use-toggle-workspace-publish';
|
||||
import {
|
||||
AffineOfficialWorkspace,
|
||||
AffineRemoteWorkspace,
|
||||
AffineWorkspace,
|
||||
LocalWorkspace,
|
||||
RemWorkspaceFlavour,
|
||||
} from '../../../../../shared';
|
||||
@@ -25,7 +25,7 @@ export type PublishPanelProps = {
|
||||
};
|
||||
|
||||
export type PublishPanelAffineProps = {
|
||||
workspace: AffineRemoteWorkspace;
|
||||
workspace: AffineWorkspace;
|
||||
};
|
||||
|
||||
const PublishPanelAffine: React.FC<PublishPanelAffineProps> = ({
|
||||
|
||||
Reference in New Issue
Block a user