🎨 getBlockInfo 返回 code = 3 时告知用户正在索引,请稍后再试

This commit is contained in:
Vanessa 2023-01-25 21:41:35 +08:00
parent 35f7fd0b66
commit e782e034cc
4 changed files with 19 additions and 1 deletions

View file

@ -12,6 +12,7 @@ import {onGet} from "../protyle/util/onGet";
import {scrollCenter} from "./highlightById";
import {lockFile} from "../dialog/processSystem";
import {zoomOut} from "../menus/protyle";
import {showMessage} from "../dialog/message";
let forwardStack: IBackStack[] = [];
let previousIsBack = false;
@ -42,6 +43,10 @@ const focusStack = async (stack: IBackStack) => {
lockFile(info.data);
return false;
}
if (info.code === 3) {
showMessage(info.msg);
return;
}
const tab = new Tab({
title: info.data.rootTitle,
docIcon: info.data.rootIcon,