mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 13:17:10 +08:00
refactor(editor): rename store api (#9518)
This commit is contained in:
@@ -132,7 +132,7 @@ export class LinkCell extends BaseCellRenderer<string> {
|
||||
override render() {
|
||||
const linkText = this.value ?? '';
|
||||
const docName =
|
||||
this.docId && this.std?.collection.getDoc(this.docId)?.meta?.title;
|
||||
this.docId && this.std?.workspace.getDoc(this.docId)?.meta?.title;
|
||||
return html`
|
||||
<div class="affine-database-link" @click="${this._onClick}">
|
||||
${docName
|
||||
|
||||
@@ -19,7 +19,7 @@ export const titlePurePropertyConfig = titleColumnType.modelConfig<Text>({
|
||||
cellToJson: ({ value, dataSource }) => {
|
||||
const host = dataSource.contextGet(HostContextKey);
|
||||
if (host) {
|
||||
const collection = host.std.collection;
|
||||
const collection = host.std.workspace;
|
||||
const deltas = value.deltas$.value;
|
||||
const text = deltas
|
||||
.map(delta => {
|
||||
|
||||
@@ -98,7 +98,7 @@ abstract class BaseTextCell extends BaseCellRenderer<Text> {
|
||||
if (!this.docId$.value) {
|
||||
return this.value;
|
||||
}
|
||||
const doc = this.host?.std.collection.getDoc(this.docId$.value);
|
||||
const doc = this.host?.std.workspace.getDoc(this.docId$.value);
|
||||
const root = doc?.root as RootBlockModel;
|
||||
return root.title;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user