Skip to content

Commit cdd6dd3

Browse files
committed
Merge branch 'release/3.83.2'
2 parents 8fce507 + 2f6f473 commit cdd6dd3

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ For more information on how to use the following functions, please see [characte
7676

7777
## Changelogs
7878

79-
### [v3.83.1](https://github.com/purocean/yn/releases/tag/v3.83.1) 2025-07-14
79+
### [v3.83.2](https://github.com/purocean/yn/releases/tag/v3.83.2) 2025-07-15
8080

81-
[Windows](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-win-x64-3.83.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-mac-arm64-3.83.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-mac-x64-3.83.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-linux-x86_64-3.83.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-linux-amd64-3.83.1.deb)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-win-x64-3.83.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-mac-arm64-3.83.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-mac-x64-3.83.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-linux-x86_64-3.83.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-linux-amd64-3.83.2.deb)
8282

8383
1. feat: Added configuration for editor scroll wheel sensitivity
8484
2. feat: Added configuration for editor ruler settings

README_ZH-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676

7777
## 更新日志
7878

79-
### [v3.83.1](https://github.com/purocean/yn/releases/tag/v3.83.1) 2025-07-14
79+
### [v3.83.2](https://github.com/purocean/yn/releases/tag/v3.83.2) 2025-07-15
8080

81-
[Windows](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-win-x64-3.83.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-mac-arm64-3.83.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-mac-x64-3.83.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-linux-x86_64-3.83.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.83.1/Yank-Note-linux-amd64-3.83.1.deb)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-win-x64-3.83.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-mac-arm64-3.83.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-mac-x64-3.83.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-linux-x86_64-3.83.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.83.2/Yank-Note-linux-amd64-3.83.2.deb)
8282

8383
1. feat: 增加配置编辑器滚轮敏感度配置
8484
2. feat: 增加配置编辑器标尺配置

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yank.note",
3-
"version": "3.83.1",
3+
"version": "3.83.2",
44
"description": "Yank Note: A highly extensible Markdown editor, designed for productivity.",
55
"main": "dist/main/app.js",
66
"license": "AGPL-3.0",

src/renderer/components/Setting.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div v-show="isReady" ref="refEditor" class="editor" @click="onClick" />
66
<div class="action">
77
<a href="javascript:void(0)" @click="showKeyboardShortcuts">{{ $t('setting-panel.change-keyboard-shortcuts') }}</a>
8-
<button class="btn tr" @click="cancel">{{$t('cancel')}}</button>
8+
<button class="btn tr" @click="close">{{$t('cancel')}}</button>
99
<button class="btn primary tr" @click="ok">{{$t('ok')}}</button>
1010
</div>
1111
</div>
@@ -175,7 +175,8 @@ export default defineComponent({
175175
removeHook('I18N_CHANGE_LANGUAGE', setLanguage)
176176
})
177177
178-
const cancel = () => {
178+
const close = async () => {
179+
await triggerHook('SETTING_PANEL_BEFORE_CLOSE', { editor }, { breakable: true })
179180
emit('close')
180181
}
181182
@@ -208,7 +209,7 @@ export default defineComponent({
208209
209210
await writeSettings({ ...value })
210211
}
211-
emit('close')
212+
close()
212213
}
213214
214215
const onClick = async (e: Event) => {
@@ -253,13 +254,13 @@ export default defineComponent({
253254
}
254255
255256
function showKeyboardShortcuts () {
256-
emit('close')
257+
close()
257258
getActionHandler('keyboard-shortcuts.show-manager')()
258259
}
259260
260261
watch(tab, updateTab)
261262
262-
return { isReady, tab, tabs, show, refEditor, cancel, ok, onClick, showKeyboardShortcuts }
263+
return { isReady, tab, tabs, show, refEditor, close, ok, onClick, showKeyboardShortcuts }
263264
},
264265
})
265266
</script>

src/renderer/plugins/custom-styles.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ export default {
7373

7474
editor.watch('root.render.extra-css-style', () => {
7575
const value = editor.getEditor('root.render.extra-css-style').getValue()
76-
debouncedUpdate(value)
76+
updateRenderExtraStyle(value)
7777
})
7878
})
79+
80+
ctx.registerHook('SETTING_PANEL_BEFORE_CLOSE', async () => {
81+
await ctx.utils.sleep(100)
82+
const extraStyle = ctx.setting.getSetting('render.extra-css-style', '')
83+
updateRenderExtraStyle(extraStyle)
84+
})
7985
}
8086
} as Plugin

src/renderer/services/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const getDefaultOptions = (): Monaco.editor.IStandaloneEditorConstruction
102102
lightbulb: { enabled: 'on' as any },
103103
fontLigatures: getSetting('editor.font-ligatures', false),
104104
wordSeparators: '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?。?!,、;:“”‘’()《》〈〉【】『』「」﹃﹄〔〕',
105-
rulers: getSetting('editor.rulers', '').split(',').map(Number),
105+
rulers: getSetting('editor.rulers', '').split(',').filter(Boolean).map(Number),
106106
mouseWheelScrollSensitivity: getSetting('editor.mouse-wheel-scroll-sensitivity', 1.0),
107107
})
108108

src/renderer/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ export type BuildInHookTypes = {
530530
I18N_CHANGE_LANGUAGE: { lang: LanguageName, currentLang: Language },
531531
SETTING_PANEL_BEFORE_SHOW: {},
532532
SETTING_PANEL_AFTER_SHOW: { editor: any },
533+
SETTING_PANEL_BEFORE_CLOSE: { editor: any },
533534
SETTING_CHANGED: { schema: SettingSchema, changedKeys: (keyof BuildInSettings)[], oldSettings: BuildInSettings, settings: BuildInSettings }
534535
SETTING_FETCHED: { settings: BuildInSettings, oldSettings: BuildInSettings },
535536
SETTING_BEFORE_WRITE: { settings: Partial<BuildInSettings> },

0 commit comments

Comments
 (0)