mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
f8412a49c4
commit
3edd8230d3
1 changed files with 11 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ import {Constants} from "../constants";
|
||||||
import {Hint} from "./hint";
|
import {Hint} from "./hint";
|
||||||
import {setLute} from "./markdown/setLute";
|
import {setLute} from "./markdown/setLute";
|
||||||
import {Preview} from "./preview";
|
import {Preview} from "./preview";
|
||||||
import {initUI, removeLoading, setPadding} from "./ui/initUI";
|
import {addLoading, initUI, removeLoading, setPadding} from "./ui/initUI";
|
||||||
import {Undo} from "./undo";
|
import {Undo} from "./undo";
|
||||||
import {Upload} from "./upload";
|
import {Upload} from "./upload";
|
||||||
import {Options} from "./util/Options";
|
import {Options} from "./util/Options";
|
||||||
|
|
@ -89,6 +89,16 @@ export class Protyle {
|
||||||
type: "protyle",
|
type: "protyle",
|
||||||
msgCallback: (data) => {
|
msgCallback: (data) => {
|
||||||
switch (data.cmd) {
|
switch (data.cmd) {
|
||||||
|
case "reload":
|
||||||
|
if (data.data === this.protyle.block.rootID) {
|
||||||
|
reloadProtyle(this.protyle, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "addLoadding":
|
||||||
|
if (data.data === this.protyle.block.rootID) {
|
||||||
|
addLoading(this.protyle);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "transactions":
|
case "transactions":
|
||||||
data.data[0].doOperations.forEach((item: IOperation) => {
|
data.data[0].doOperations.forEach((item: IOperation) => {
|
||||||
onTransaction(this.protyle, item, false);
|
onTransaction(this.protyle, item, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue