Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions frontend/app/view/preview/preview-model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ export class PreviewModel implements ViewModel {
return;
}
const blockOref = WOS.makeORef("block", this.blockId);
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);

// Clear the saved file buffers
globalStore.set(this.fileContentSaved, null);
Expand Down Expand Up @@ -623,7 +623,7 @@ export class PreviewModel implements ViewModel {
}
updateMeta.edit = false;
const blockOref = WOS.makeORef("block", this.blockId);
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);
}

async goHistoryForward() {
Expand All @@ -635,13 +635,13 @@ export class PreviewModel implements ViewModel {
}
updateMeta.edit = false;
const blockOref = WOS.makeORef("block", this.blockId);
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);
}

async setEditMode(edit: boolean) {
const blockMeta = globalStore.get(this.blockAtom)?.meta;
const blockOref = WOS.makeORef("block", this.blockId);
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, { ...blockMeta, edit });
await this.env.services.object.UpdateObjectMeta(blockOref, { ...blockMeta, edit });
}

async handleFileSave() {
Expand Down Expand Up @@ -790,7 +790,7 @@ export class PreviewModel implements ViewModel {
click: () =>
fireAndForget(async () => {
const blockOref = WOS.makeORef("block", this.blockId);
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, {
await this.env.services.object.UpdateObjectMeta(blockOref, {
"editor:wordwrap": !wordWrap,
});
}),
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/view/preview/previewenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type PreviewEnv = WaveEnvSubset<{
fullConfigAtom: WaveEnv["atoms"]["fullConfigAtom"];
};
services: {
ObjectService: WaveEnv["services"]["ObjectService"];
object: WaveEnv["services"]["object"];
};
wos: WaveEnv["wos"];
getSettingsKeyAtom: SettingsKeyAtomFnType<"preview:showhiddenfiles" | "editor:fontsize" | "preview:defaultsort">;
Expand Down
Loading