mirror of
https://github.com/purocean/yn.git
synced 2026-10-12 23:31:39 +08:00
Merge branch 'release/2.0.0-beta7.12'
This commit is contained in:
@@ -159,7 +159,7 @@ yarn run start
|
||||
## 更新日志
|
||||
[最新发布](https://github.com/purocean/yn/releases)
|
||||
|
||||
### [v2.0.0-beta7.11](https://github.com/purocean/yn/releases/tag/v2.0.0-beta7.11) 2019-08-21
|
||||
### [v2.0.0-beta7.12](https://github.com/purocean/yn/releases/tag/v2.0.0-beta7.12) 2019-08-22
|
||||
1. 增加 2.0 计划
|
||||
1. Electron 打包
|
||||
1. 增加 HTML 小工具渲染
|
||||
@@ -172,6 +172,9 @@ yarn run start
|
||||
1. 重构前端代码便于拓展
|
||||
1. 前端重构文件接口
|
||||
|
||||
<details>
|
||||
<summary>展开查看更多版本记录</summary>
|
||||
|
||||
### [v1.23.0](https://github.com/purocean/yn/releases/tag/v1.23.0) 2019-07-09
|
||||
1. 增加转换所有外链图片到本地功能 `Ctrl + Alt + L`
|
||||
|
||||
@@ -300,3 +303,5 @@ yarn run start
|
||||
1. 调整为暗色主题
|
||||
1. 图片新标签预览
|
||||
1. 增加文件筛选面板 Ctrl + p
|
||||
|
||||
</details>
|
||||
|
||||
@@ -24,9 +24,11 @@ export default {
|
||||
mounted () {
|
||||
this.mouseX = 0
|
||||
this.mouseY = 0
|
||||
window.addEventListener('blur', this.hide)
|
||||
window.addEventListener('mousemove', this.recordMousePosition)
|
||||
},
|
||||
beforeDestroy () {
|
||||
window.removeEventListener('blur', this.hide)
|
||||
window.removeEventListener('mousemove', this.recordMousePosition)
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -126,7 +126,13 @@ export default {
|
||||
})
|
||||
|
||||
this.editor.addCommand(KM.Shift | KC.Enter, () => {
|
||||
this.insert(this.editor.getModel().getOneIndent())
|
||||
// getOneIndent 接口被移除了 https://github.com/microsoft/monaco-editor/issues/1565
|
||||
const getOneIndent = editor => {
|
||||
const options = editor.getModel().getOptions()
|
||||
return options.insertSpaces ? ' '.repeat(options.tabSize) : '\t'
|
||||
}
|
||||
|
||||
this.insert(getOneIndent(this.editor))
|
||||
})
|
||||
|
||||
this.editor.addCommand(KM.CtrlCmd | KM.Shift | KC.UpArrow, () => {
|
||||
@@ -172,15 +178,6 @@ export default {
|
||||
{ beforeText: /^\s*1. .*$/, action: { indentAction: window.monaco.languages.IndentAction.None, appendText: '1. ' } }
|
||||
]
|
||||
})
|
||||
|
||||
// this.editor.addCommand(KC.Enter, () => {
|
||||
// const p = this.editor.getPosition()
|
||||
// this.editor.executeEdits('', [{
|
||||
// range: new window.monaco.Range(p.lineNumber, p.column, p.lineNumber, p.column),
|
||||
// text: '\nresult',
|
||||
// forceMoveMarkers: true
|
||||
// }])
|
||||
// })
|
||||
},
|
||||
paste (e) {
|
||||
if (this.editor.hasTextFocus()) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="title-bar" :style="titleBarStyles">
|
||||
<div v-if="win" class="resizer"></div>
|
||||
<h4 class="title">
|
||||
<img v-if="win" @dblclick="close" class="logo" src="~@/assets/icon.png" alt="logo">
|
||||
<span>{{statusText}}</span>
|
||||
@@ -8,16 +9,16 @@
|
||||
<div title="置顶窗口" :class="{btn: true, pin: true, ontop: isAlwaysOnTop}" @click="toggleAlwaysOnTop">
|
||||
<y-icon class="pin-icon" name="thumbtack"></y-icon>
|
||||
</div>
|
||||
<div class="btn" @click="minimize">
|
||||
<div title="最小化" class="btn" @click="minimize">
|
||||
<div class="icon minimize"></div>
|
||||
</div>
|
||||
<div v-if="isMaximized" class="btn" @click="unmaximize">
|
||||
<div title="还原" v-if="isMaximized" class="btn" @click="unmaximize">
|
||||
<div class="icon unmaximize"></div>
|
||||
</div>
|
||||
<div v-else class="btn" @click="maximize">
|
||||
<div title="最大化" v-else class="btn" @click="maximize">
|
||||
<div class="icon maximize"></div>
|
||||
</div>
|
||||
<div class="btn" @click="close">
|
||||
<div title="关闭" class="btn btn-close" @click="close">
|
||||
<div class="icon close"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -162,7 +163,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.title-bar {
|
||||
background: #4e4e4e;
|
||||
color: #eee;
|
||||
@@ -173,6 +173,15 @@ export default {
|
||||
justify-content: center;
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.resizer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 20%;
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.title {
|
||||
@@ -233,6 +242,10 @@ export default {
|
||||
mask: url(~@/assets/window-close.svg) no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
.action .btn.btn-close:hover {
|
||||
background-color: rgba(232, 17, 35, .9)
|
||||
}
|
||||
|
||||
.action .btn:hover {
|
||||
background-color: hsla(0, 0%, 100%, .1)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ export default {
|
||||
this.$bus.on('file-uploaded', this.refresh)
|
||||
this.$bus.on('file-marked', this.refresh)
|
||||
this.$bus.on('file-unmarked', this.refresh)
|
||||
this.$bus.on('tree-refresh', this.refresh)
|
||||
this.refresh()
|
||||
},
|
||||
beforeDestroy () {
|
||||
@@ -34,6 +35,7 @@ export default {
|
||||
this.$bus.off('file-uploaded', this.refresh)
|
||||
this.$bus.off('file-marked', this.refresh)
|
||||
this.$bus.off('file-unmarked', this.refresh)
|
||||
this.$bus.off('tree-refresh', this.refresh)
|
||||
},
|
||||
methods: {
|
||||
showContextMenu () {
|
||||
|
||||
@@ -77,6 +77,7 @@ export default {
|
||||
{ id: 'delete', label: '删除', onClick: () => this.deleteFile() },
|
||||
{ type: 'separator' },
|
||||
{ id: 'openInOS', label: '在系统中打开', onClick: () => this.revealInExplorer() },
|
||||
{ id: 'openInOS', label: '刷新目录树', onClick: () => this.$bus.emit('tree-refresh') },
|
||||
]
|
||||
|
||||
if (item.type === 'dir') {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yank.note.yang",
|
||||
"version": "2.0.0-beta7.11",
|
||||
"version": "2.0.0-beta7.12",
|
||||
"description": "Yank-Note",
|
||||
"main": "dist/app.js",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Reference in New Issue
Block a user