mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 22:09:08 +08:00
refactor: create and load workspace will return workspaceUnit
This commit is contained in:
@@ -37,6 +37,16 @@ export class WorkspaceUnit {
|
||||
this.update(params);
|
||||
}
|
||||
|
||||
get isPublish() {
|
||||
console.error('Suggest changing to published');
|
||||
return this.published;
|
||||
}
|
||||
|
||||
get isLocal() {
|
||||
console.error('Suggest changing to syncMode');
|
||||
return this.syncMode === 'all';
|
||||
}
|
||||
|
||||
get blocksuiteWorkspace() {
|
||||
return this._blocksuiteWorkspace;
|
||||
}
|
||||
@@ -52,13 +62,16 @@ export class WorkspaceUnit {
|
||||
Object.assign(this, params);
|
||||
}
|
||||
|
||||
get isPublish() {
|
||||
console.error('Suggest changing to published');
|
||||
return this.published;
|
||||
}
|
||||
|
||||
get isLocal() {
|
||||
console.error('Suggest changing to syncMode');
|
||||
return this.syncMode === 'all';
|
||||
toJSON(): Omit<WorkspaceUnitCtorParams, 'blocksuiteWorkspace'> {
|
||||
return {
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
avatar: this.avatar,
|
||||
owner: this.owner,
|
||||
published: this.published,
|
||||
memberCount: this.memberCount,
|
||||
provider: this.provider,
|
||||
syncMode: this.syncMode,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user