mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(editor): rename store api (#9518)
This commit is contained in:
@@ -138,7 +138,7 @@ export class Clipboard extends LifeCycleWatcher {
|
||||
const payload = {
|
||||
file: item,
|
||||
assets: job.assetsManager,
|
||||
workspaceId: doc.collection.id,
|
||||
workspaceId: doc.workspace.id,
|
||||
pageId: doc.id,
|
||||
};
|
||||
const result = await adapterInstance.toSlice(
|
||||
|
||||
@@ -30,7 +30,7 @@ export abstract class BlockService extends Extension {
|
||||
readonly specSlots = getSlots();
|
||||
|
||||
get collection() {
|
||||
return this.std.collection;
|
||||
return this.std.workspace;
|
||||
}
|
||||
|
||||
get doc() {
|
||||
|
||||
@@ -74,8 +74,8 @@ export class BlockStdScope {
|
||||
return this.get(Clipboard);
|
||||
}
|
||||
|
||||
get collection() {
|
||||
return this.doc.collection;
|
||||
get workspace() {
|
||||
return this.doc.workspace;
|
||||
}
|
||||
|
||||
get command() {
|
||||
@@ -170,12 +170,12 @@ export class BlockStdScope {
|
||||
|
||||
getJob(middlewares: JobMiddleware[] = []) {
|
||||
return new Job({
|
||||
schema: this.collection.schema,
|
||||
blobCRUD: this.collection.blobSync,
|
||||
schema: this.workspace.schema,
|
||||
blobCRUD: this.workspace.blobSync,
|
||||
docCRUD: {
|
||||
create: (id: string) => this.collection.createDoc({ id }),
|
||||
get: (id: string) => this.collection.getDoc(id),
|
||||
delete: (id: string) => this.collection.removeDoc(id),
|
||||
create: (id: string) => this.workspace.createDoc({ id }),
|
||||
get: (id: string) => this.workspace.getDoc(id),
|
||||
delete: (id: string) => this.workspace.removeDoc(id),
|
||||
},
|
||||
middlewares,
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ export class SelectionManager extends LifeCycleWatcher {
|
||||
};
|
||||
|
||||
private get _store() {
|
||||
return this.std.collection.awarenessStore;
|
||||
return this.std.workspace.awarenessStore;
|
||||
}
|
||||
|
||||
get id() {
|
||||
|
||||
Reference in New Issue
Block a user