diff --git a/app/electron/main.js b/app/electron/main.js index 8a367d3..693e2c0 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -142,6 +142,8 @@ app.whenReady().then(() => { app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit() + } else { + globalShortcut.unregisterAll() } }) diff --git a/app/package.json b/app/package.json index e2e79c9..aecfa95 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "liandi", - "version": "1.1.4", + "version": "1.1.5", "description": "链滴笔记", "main": "./electron/main.js", "scripts": { diff --git a/app/src/editor/index.ts b/app/src/editor/index.ts index 06283db..735e735 100644 --- a/app/src/editor/index.ts +++ b/app/src/editor/index.ts @@ -130,7 +130,7 @@ export class Editor extends Model { html = processRemoveDataRender1(this.vditore.vditor.ir.element, "innerHTML"); this.vditore.destroy(); } - let inputTimeout: number + let inputTimeout: number; this.vditore = new Vditor(this.element, { _lutePath: process.env.NODE_ENV === "development" ? `http://192.168.0.107:9090/lute.min.js?${new Date().getTime()}` : null, debugger: process.env.NODE_ENV === "development", @@ -277,7 +277,7 @@ export class Editor extends Model { input: (content: string) => { this.saved = false; this.parent.headElement.classList.add("item--unsave"); - clearTimeout(inputTimeout) + clearTimeout(inputTimeout); inputTimeout = window.setTimeout(() => { if (this.saved) { return; @@ -290,7 +290,7 @@ export class Editor extends Model { }); this.saved = true; this.parent.headElement.classList.remove("item--unsave"); - }, 2000) + }, 2000); } }); } diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index d1caa20..8c43c09 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -38,12 +38,12 @@ export const getIconByType = (type: string) => { export const openFile = (url: string, filePath: string, id?: string) => { const editor = getAllModels().editor.find((item) => { if (item.url === url && item.path == filePath) { - item.parent.parent.switchTab(item.parent.headElement) - return true + item.parent.parent.switchTab(item.parent.headElement); + return true; } - }) + }); if (editor) { - return + return; } let wnd: Wnd = undefined; diff --git a/app/src/menus/vditor.ts b/app/src/menus/vditor.ts index ba054f7..df75801 100644 --- a/app/src/menus/vditor.ts +++ b/app/src/menus/vditor.ts @@ -20,7 +20,7 @@ export const initVditorIconMenu = () => { label: i18n[window.liandi.config.lang].copyId, click: () => { const itemData = window.liandi.menus.itemData; - clipboard.writeText(itemData.target.parentElement.getAttribute("data-node-id")) + clipboard.writeText(itemData.target.parentElement.getAttribute("data-node-id")); } })); return menu; diff --git a/kernel/model/conf.go b/kernel/model/conf.go index 8453635..92023a5 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -32,7 +32,7 @@ import ( var Mode = "dev" const ( - Ver = "1.1.4" + Ver = "1.1.5" ServerPort = "6806" UserAgent = "LianDi/v" + Ver )