diff --git a/README.md b/README.md
index 2347e1e9..0f331115 100644
--- a/README.md
+++ b/README.md
@@ -159,6 +159,10 @@ yarn run start
## 更新日志
[最新发布](https://github.com/purocean/yn/releases)
+### [v2.0.0-beta4.5](https://github.com/purocean/yn/releases/tag/v2.0.0-beta4.5) 2019-08-11
+1. Windows 平台增加安装包
+1. 引入检查更新
+
### [v2.0.0-beta4.4](https://github.com/purocean/yn/releases/tag/v2.0.0-beta4.4) 2019-08-10
1. Windows 平台增加安装包
1. 引入检查更新
diff --git a/app/package.json b/app/package.json
index ee34f8ab..b73e6b9d 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "yank.note.yang",
- "version": "2.0.0-beta4.4",
+ "version": "2.0.0-beta4.5",
"description": "Yank-Note",
"main": "dist/app.js",
"author": {
diff --git a/frontend/package.json b/frontend/package.json
index 4025b0e0..84f83d85 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -24,7 +24,7 @@
"markdown-it-multimd-table": "^3.1.3",
"markdown-it-task-lists": "^2.1.1",
"mime-types": "^2.1.24",
- "monaco-editor": "^0.13.1",
+ "monaco-editor": "^0.17.1",
"normalize.css": "^8.0.1",
"socket.io-client": "^2.2.0",
"transliteration": "^2.1.3",
diff --git a/frontend/public/index.html b/frontend/public/index.html
index 752ef369..86dff2a2 100644
--- a/frontend/public/index.html
+++ b/frontend/public/index.html
@@ -4,6 +4,15 @@
Yank Note
+
diff --git a/frontend/src/components/MonacoEditor.vue b/frontend/src/components/MonacoEditor.vue
index ba2ad82d..d872db94 100644
--- a/frontend/src/components/MonacoEditor.vue
+++ b/frontend/src/components/MonacoEditor.vue
@@ -6,9 +6,6 @@
import dayjs from 'dayjs'
import TurndownService from 'turndown'
-const isElectron = !!(window && window.process && window.process.versions && window.process.versions['electron'])
-const appPath = isElectron && window.require('electron').remote.app.getAppPath().replace(/dist$/, '')
-const pathModule = isElectron && window.require('path')
const keys = {}
export default {
@@ -22,20 +19,14 @@ export default {
}
},
mounted () {
- if (isElectron && !window.amdRequire) {
- const amdLoader = window.require(pathModule.resolve(appPath, 'dist/static/vs/loader.js'))
- window.amdRequire = amdLoader.require
- this.onGotAmdLoader()
+ if (!window.require) {
+ const loaderScript = document.createElement('script')
+ loaderScript.type = 'text/javascript'
+ loaderScript.src = 'vs/loader.js'
+ loaderScript.addEventListener('load', this.onGotAmdLoader)
+ document.body.appendChild(loaderScript)
} else {
- if (!window.require) {
- const loaderScript = document.createElement('script')
- loaderScript.type = 'text/javascript'
- loaderScript.src = 'vs/loader.js'
- loaderScript.addEventListener('load', this.onGotAmdLoader)
- document.body.appendChild(loaderScript)
- } else {
- this.onGotAmdLoader()
- }
+ this.onGotAmdLoader()
}
window.addEventListener('keydown', this.recordKeys, true)
@@ -60,18 +51,7 @@ export default {
}
},
onGotAmdLoader () {
- const xrequire = isElectron ? window.amdRequire : window.require
- if (isElectron) {
- const uriFromPath = path => {
- let pathName = pathModule.resolve(path).replace(/\\/g, '/')
- if (pathName.length > 0 && pathName.charAt(0) !== '/') {
- pathName = '/' + pathName
- }
- return encodeURI('file://' + pathName)
- }
- xrequire.config({ baseUrl: uriFromPath(pathModule.join(appPath, 'dist/static')) })
- }
- xrequire(['vs/editor/editor.main'], () => {
+ window.require(['vs/editor/editor.main'], () => {
this.initMonaco()
})
},
diff --git a/frontend/src/components/TitleBar.vue b/frontend/src/components/TitleBar.vue
index 80001d88..8ea7bd80 100644
--- a/frontend/src/components/TitleBar.vue
+++ b/frontend/src/components/TitleBar.vue
@@ -6,8 +6,9 @@