Merge branch 'release/2.5.3'

This commit is contained in:
purocean
2021-01-31 16:57:54 +08:00
6 changed files with 28 additions and 7 deletions
+6 -3
View File
@@ -77,14 +77,17 @@
## 更新日志
[最新发布](https://github.com/purocean/yn/releases)
### [v2.5.3](https://github.com/purocean/yn/releases/tag/v2.5.3) 2021-01-31
1. 调整 macOS 上应用边框样式
<details>
<summary>展开查看更多版本记录</summary>
### [v2.5.2](https://github.com/purocean/yn/releases/tag/v2.5.2) 2021-01-31
1. macOS 打包增加签名公证
2. 调整打包流程
3. 替换 plantuml 库
<details>
<summary>展开查看更多版本记录</summary>
### [v2.5.1](https://github.com/purocean/yn/releases/tag/v2.5.1) 2021-01-17
1. 支持 macOS
2. 调整部分快捷键
+15 -2
View File
@@ -1,5 +1,5 @@
<template>
<div class="title-bar" :style="titleBarStyles">
<div :class="{'title-bar': true, 'in-electron': hasWin, 'is-macos': isMacOS}" :style="titleBarStyles">
<div v-if="hasWin && !isMaximized" class="resizer"></div>
<h4 class="title">
<img v-if="hasWin" @dblclick="close" class="logo" src="~@/assets/icon.png" alt="logo">
@@ -31,7 +31,7 @@ import { useStore } from 'vuex'
import env from '../useful/env'
import SvgIcon from './SvgIcon.vue'
const isElectron = env.isElectron
const { isElectron, isMacOS } = env
export default defineComponent({
name: 'title-bar',
@@ -166,6 +166,7 @@ export default defineComponent({
return {
hasWin,
isMacOS,
isMaximized,
isAlwaysOnTop,
isFocused,
@@ -221,6 +222,7 @@ export default defineComponent({
.action {
display: flex;
justify-content: flex-end;
flex-grow: 0;
flex-shrink: 0;
text-align: center;
@@ -279,4 +281,15 @@ export default defineComponent({
.action .btn.pin.ontop {
background-color: hsla(0, 0%, 100%, .3)
}
.title-bar.in-electron.is-macos .title {
justify-content: center;
padding-left: 138px;
width: 100%;
}
.title-bar.in-electron.is-macos .title .logo,
.title-bar.in-electron.is-macos .action .btn:not(.pin) {
display: none;
}
</style>
+2
View File
@@ -9,6 +9,7 @@ const nodeModule = window && (window.module || _window.nodeModule)
const nodeRequire = window && (window.require || _window.nodeRequire)
const isElectron = !!(nodeProcess?.versions?.electron)
const isMacOS = /macintosh|mac os x/i.test(navigator.userAgent)
const openAlwaysOnTopWindow = (url: string, target = '_blank') => {
if (isElectron) {
@@ -59,5 +60,6 @@ export default {
module: nodeModule,
require: nodeRequire,
isElectron,
isMacOS,
openAlwaysOnTopWindow,
}
+2 -1
View File
@@ -1,8 +1,9 @@
import { getLogger } from './utils'
import env from './env'
const logger = getLogger('shortcut')
const isMacOS = /macintosh|mac os x/i.test(navigator.userAgent)
const isMacOS = env.isMacOS
const Ctrl = 'Ctrl'
const CtrlCmd = 'CtrlCmd'
const Alt = 'Alt'
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "yank.note",
"version": "2.5.2",
"version": "2.5.3",
"description": "Yank Note 一款面向程序员的 Markdown 笔记应用",
"main": "dist/app.js",
"license": "Apache-2.0",
+2
View File
@@ -53,6 +53,8 @@ const createWindow = () => {
minHeight: 500,
frame: false,
backgroundColor: '#282a2b',
titleBarStyle: isMacos ? 'hidden' : undefined,
fullscreenable: false,
webPreferences: {
webSecurity: false,
nodeIntegration: true,