This commit is contained in:
Vanessa 2023-05-18 19:27:21 +08:00
parent 61ab0ffd68
commit 54022ed92a
70 changed files with 604 additions and 350 deletions

View file

@ -144,7 +144,7 @@ export const onGetConfig = (isStart: boolean, app: App) => {
initBar(app);
setProxy();
initStatus();
initWindow();
initWindow(app);
appearance.onSetappearance(window.siyuan.config.appearance);
initAssets();
renderSnippet();
@ -160,7 +160,7 @@ export const onGetConfig = (isStart: boolean, app: App) => {
addGA();
};
export const initWindow = () => {
export const initWindow = (app: App) => {
/// #if !BROWSER
const winOnFocus = () => {
if (getSelection().rangeCount > 0) {
@ -256,6 +256,7 @@ export const initWindow = () => {
fetchPost("/api/block/checkBlockExist", {id}, existResponse => {
if (existResponse.data) {
openFileById({
app,
id,
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],
zoomIn: getSearch("focus", url) === "1"