mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
refactor(editor): rename model.doc to store (#12172)
This commit is contained in:
@@ -18,7 +18,7 @@ export const embedFigmaSlashMenuConfig: SlashMenuConfig = {
|
||||
},
|
||||
group: '4_Content & Media@8',
|
||||
when: ({ model }) =>
|
||||
model.doc.schema.flavourSchemaMap.has('affine:embed-figma'),
|
||||
model.store.schema.flavourSchemaMap.has('affine:embed-figma'),
|
||||
action: ({ std, model }) => {
|
||||
(async () => {
|
||||
const { host } = std;
|
||||
|
||||
@@ -18,7 +18,7 @@ export const embedGithubSlashMenuConfig: SlashMenuConfig = {
|
||||
},
|
||||
group: '4_Content & Media@7',
|
||||
when: ({ model }) =>
|
||||
model.doc.schema.flavourSchemaMap.has('affine:embed-github'),
|
||||
model.store.schema.flavourSchemaMap.has('affine:embed-github'),
|
||||
action: ({ std, model }) => {
|
||||
(async () => {
|
||||
const { host } = std;
|
||||
|
||||
+1
-1
@@ -282,7 +282,7 @@ export class EmbedIframeErrorCard extends WithDisposable(LitElement) {
|
||||
}
|
||||
|
||||
get readonly() {
|
||||
return this.model.doc.readonly;
|
||||
return this.model.store.readonly;
|
||||
}
|
||||
|
||||
get telemetryService() {
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ export class EmbedIframeLinkInputBase extends WithDisposable(LitElement) {
|
||||
}
|
||||
|
||||
get store() {
|
||||
return this.model.doc;
|
||||
return this.model.store;
|
||||
}
|
||||
|
||||
get notificationService() {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export const embedIframeSlashMenuConfig: SlashMenuConfig = {
|
||||
},
|
||||
group: '4_Content & Media@5',
|
||||
when: ({ model }) => {
|
||||
return model.doc.schema.flavourSchemaMap.has('affine:embed-iframe');
|
||||
return model.store.schema.flavourSchemaMap.has('affine:embed-iframe');
|
||||
},
|
||||
action: ({ std }) => {
|
||||
std.command
|
||||
|
||||
@@ -18,7 +18,7 @@ export const embedLoomSlashMenuConfig: SlashMenuConfig = {
|
||||
},
|
||||
group: '4_Content & Media@9',
|
||||
when: ({ model }) =>
|
||||
model.doc.schema.flavourSchemaMap.has('affine:embed-loom'),
|
||||
model.store.schema.flavourSchemaMap.has('affine:embed-loom'),
|
||||
action: ({ std, model }) => {
|
||||
(async () => {
|
||||
const { host } = std;
|
||||
|
||||
@@ -18,7 +18,7 @@ export const embedYoutubeSlashMenuConfig: SlashMenuConfig = {
|
||||
},
|
||||
group: '4_Content & Media@6',
|
||||
when: ({ model }) =>
|
||||
model.doc.schema.flavourSchemaMap.has('affine:embed-youtube'),
|
||||
model.store.schema.flavourSchemaMap.has('affine:embed-youtube'),
|
||||
action: ({ std, model }) => {
|
||||
(async () => {
|
||||
const { host } = std;
|
||||
|
||||
Reference in New Issue
Block a user