Skip to content

Commit 5eae372

Browse files
committed
Merge branch 'release/3.84.0'
2 parents cdd6dd3 + 57f5a44 commit 5eae372

File tree

27 files changed

+599
-157
lines changed

27 files changed

+599
-157
lines changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ For more information on how to use the following functions, please see [characte
6363
- **Macro replacement:** support for embedded JavaScript expressions to dynamically replace document content
6464
- **Image hosting service:** support [PicGo](https://picgo.github.io/PicGo-Doc/) image hosting service
6565
- **OpenAI:** support for [OpenAI](https://openai.com) auto completion
66-
- **Custom plug-ins:** support writing JavaScript plug-ins to expand editor functionality. The plug-in is placed in the `home directory/plugins`. Refer to [plug-in Development Guide](./help/PLUGIN.md)
66+
- **Custom plug-ins:** support writing JavaScript plug-ins to #expand editor functionality. The plug-in is placed in the `home directory/plugins`. Refer to [plug-in Development Guide](./help/PLUGIN.md)
6767

6868
## Screenshots
6969

@@ -76,17 +76,14 @@ For more information on how to use the following functions, please see [characte
7676

7777
## Changelogs
7878

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

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)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-win-x64-3.84.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-mac-arm64-3.84.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-mac-x64-3.84.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-linux-x86_64-3.84.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-linux-amd64-3.84.0.deb)
8282

83-
1. feat: Added configuration for editor scroll wheel sensitivity
84-
2. feat: Added configuration for editor ruler settings
85-
3. feat: Added support for custom CSS styling during rendering
86-
4. feat: Double-clicking the editor highlights the current line in preview
87-
5. fix: Resolved potential freeze when saving encrypted documents
88-
6. fix: Fixed extension details display failure issue
89-
7. feat(plugin): Added `editor` callback parameter to `SETTING_PANEL_AFTER_SHOW` Hook to access configuration editor instances
83+
1. feat: Support parsing `#tag` labels in documents and tags defined in frontmatter
84+
2. feat: Support customizing the PlantUML API in settings
85+
3. feat: Add editor wrap indent setting
86+
4. feat(plugin): Support adding `suggestions` suggestion lists when defining plugin settings
9087

9188
[More release notes](https://github.com/purocean/yn/releases)
9289

README_ZH-CN.md

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

7777
## 更新日志
7878

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

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)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-win-x64-3.84.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-mac-arm64-3.84.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-mac-x64-3.84.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-linux-x86_64-3.84.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.84.0/Yank-Note-linux-amd64-3.84.0.deb)
8282

83-
1. feat: 增加配置编辑器滚轮敏感度配置
84-
2. feat: 增加配置编辑器标尺配置
85-
3. feat: 增加渲染自定义 CSS 样式配置
86-
4. feat: 双击编辑器可以在预览中高亮当前行
87-
5. fix: 修复保存加密文档可能卡死问题
88-
6. fix: 修复扩展详情可能不显示问题
89-
7. feat(plugin): `SETTING_PANEL_AFTER_SHOW` Hook 增加 `editor` 回调参数,用来获取配置编辑器实例
83+
1. feat: 支持解析文档中的 `#tag` 标签和 frontmatter 中定义的标签
84+
2. feat: 支持在设置中自定义 PlantUML API
85+
3. feat: 增加编辑器换行缩进设置项
86+
4. feat(plugin): 插件定义设置项的时候支持增加 `suggestions` 建议列表
9087

9188
[更多发布说明](https://github.com/purocean/yn/releases)
9289

help/FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Type '/' in the editor to get prompts
7070
*[W3C]: World Wide Web Consortium
7171
The HTML specification is maintained by the W3C.
7272
+ Wiki Link: Supports using `[[filename#anchor|display text]]` or `[[filename:line,column|display text]]` syntax to link documents, such as [[README#Highlights|Features]] [[README:3,4]]
73+
+ Tags: #Markdown #Help
7374

7475
## Github Alerts
7576

@@ -633,6 +634,7 @@ variable name | type | description
633634
`headingNumber` | `boolean` | whether to enable the page title serial number
634635
`wrapCode` | `boolean` | whether to enable code wrapping
635636
`enableMacro` | `boolean` | whether to enable macro replacement
637+
`tags` | `string[]` | 文档标签
636638
`define` | `Record<string, string>` | Macro definition, string replacing
637639
`defaultPreviewer` | `string` | The default previewer for the document, some extensions may provide a special preview interface. Such as *<a href="javascript: ctx.showExtensionManager('@yank-note/extension-reveal-js')">Reveal.js extension</a>*
638640
`mdOptions` | `Record<string, boolean>` | Markdown-it parse options

help/FEATURES_ZH-CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ define:
7171
*[W3C]: World Wide Web Consortium
7272
The HTML specification is maintained by the W3C.
7373
+ Wiki 链接:支持使用 `[[文件名#锚点|显示文本]]``[[文件名:行,列|显示文本]]` 语法来链接文档,如 [[README#Highlights|特色功能]] [[README:3,4]]
74+
+ 标签:#Markdown #使用帮助
7475

7576
## Github Alerts
7677

@@ -631,6 +632,7 @@ Yank Note 接入了 [OpenAI](https://openai.com)、[Google AI](https://ai.google
631632
`wrapCode` | `boolean` | 是否开启代码换行
632633
`enableMacro` | `boolean` | 是否开启宏替换
633634
`define` | `Record<string, string>` | 宏定义,定义文本替换
635+
`tags` | `string[]` | 文档标签
634636
`defaultPreviewer` | `string` | 文档默认的预览器,某些扩展可能提供特殊的预览界面。如 *<a href="javascript: ctx.showExtensionManager('@yank-note/extension-reveal-js')">Reveal.js 扩展</a>*
635637
`mdOptions` | `Record<string, boolean>` | Markdown-it 解析参数
636638
`mdOptions.html` | `boolean` | 开启 HTML 解析

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.2",
3+
"version": "3.84.0",
44
"description": "Yank Note: A highly extensible Markdown editor, designed for productivity.",
55
"main": "dist/main/app.js",
66
"license": "AGPL-3.0",

src/main/server/plantuml.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async function getCacheData (key: string, gen: () => Promise<any>) {
6666
}
6767

6868
export default async function (data: string): Promise<{ content: any, type: string }> {
69-
const api: string = config.get('plantuml-api', 'local')
69+
const api: string = config.get('plantuml-api', 'local') || 'local'
7070

7171
if (api.startsWith('local')) {
7272
try {
@@ -99,7 +99,7 @@ export default async function (data: string): Promise<{ content: any, type: stri
9999
} else {
100100
const url = api.replace('{data}', plantumlBase64(data))
101101
const dispatcher = await getAction('get-proxy-dispatcher')(url)
102-
let type = api.includes('/svg/') ? 'image/svg+xml' : 'image/png'
102+
let type = api.includes('svg') ? 'image/svg+xml' : 'image/png'
103103

104104
const cacheKey = getCacheKey(api, type, data)
105105
const content = await getCacheData(cacheKey, async () => {

src/renderer/components/ContextMenu.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export default defineComponent({
8181
}
8282
8383
function show (menuItems: Components.ContextMenu.Item[], opts?: Components.ContextMenu.ShowOpts) {
84+
// Do not show context menu if all items are hidden
85+
if (menuItems.every(item => item.hidden)) {
86+
return
87+
}
88+
8489
items.value = menuItems
8590
currentItemIdx.value = -1
8691

src/renderer/components/Filter.vue

Lines changed: 62 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,93 @@
11
<template>
22
<XMask :show="show" @close="close">
33
<QuickOpen
4-
@choose-file="chooseFile"
4+
ref="quickOpen"
5+
@choose-item="chooseItem"
56
@close="close"
6-
:filter-item="filterItem"
7-
:only-current-repo="onlyCurrentRepo" />
7+
:filter-item="filterItem" />
88
</XMask>
99
</template>
1010

1111
<script lang="ts">
12-
import { computed, defineComponent, onMounted, onUnmounted, ref, shallowRef } from 'vue'
12+
import { computed, defineComponent, nextTick, onMounted, onUnmounted, ref, shallowRef } from 'vue'
1313
import { registerAction, removeAction } from '@fe/core/action'
1414
import { CtrlCmd } from '@fe/core/keybinding'
1515
import { switchDoc } from '@fe/services/document'
1616
import { t } from '@fe/services/i18n'
17-
import type { Doc, BaseDoc } from '@fe/types'
17+
import type { BaseDoc, Components, Doc } from '@fe/types'
18+
import { isMarkdownFile } from '@share/misc'
19+
import store from '@fe/support/store'
1820
import XMask from './Mask.vue'
1921
import QuickOpen from './QuickOpen.vue'
20-
import { isMarkdownFile } from '@share/misc'
2122
2223
export default defineComponent({
2324
name: 'x-filter',
2425
components: { QuickOpen, XMask },
2526
setup () {
26-
const callback = ref<((doc: Doc | null) => void) | null>(null)
27-
const onlyCurrentRepo = ref(false)
28-
const filterItem = shallowRef<(item: BaseDoc) => boolean>()
27+
const callback = ref<((item: Components.QuickOpen.DataItem | null) => void) | null>(null)
28+
const filterItem = shallowRef<(item: Components.QuickOpen.DataItem) => boolean>()
29+
const quickOpen = ref<InstanceType<typeof QuickOpen> | null>(null)
2930
30-
function showQuickOpen () {
31-
onlyCurrentRepo.value = false
32-
callback.value = (f: Doc | null) => {
33-
if (f) {
34-
switchDoc(f)
31+
function bindAction (
32+
cb: (item: Components.QuickOpen.DataItem | null) => void,
33+
filter: (item: Components.QuickOpen.DataItem) => boolean
34+
) {
35+
filterItem.value = filter
36+
callback.value = (item: Components.QuickOpen.DataItem | null) => {
37+
if (item?.type === 'tag') {
38+
quickOpen.value?.switchTab('file')
39+
quickOpen.value?.updateSearchText(item.payload + ' ')
40+
} else {
41+
cb(item)
42+
callback.value = null
43+
filterItem.value = undefined
3544
}
36-
37-
callback.value = null
38-
filterItem.value = undefined
3945
}
4046
}
4147
42-
function chooseFile (file: Doc | null) {
48+
function showQuickOpen (options?: { query?: string, tab?: Components.QuickOpen.TabKey }) {
49+
bindAction(
50+
(f: Components.QuickOpen.DataItem | null) => {
51+
if (f?.type === 'file') {
52+
switchDoc(f.payload as Doc)
53+
}
54+
},
55+
() => true
56+
)
57+
58+
nextTick(() => {
59+
if (options?.tab) {
60+
quickOpen.value?.switchTab(options.tab)
61+
}
62+
63+
if (typeof options?.query === 'string') {
64+
quickOpen.value?.updateSearchText(options.query)
65+
}
66+
})
67+
}
68+
69+
function chooseItem (item: Components.QuickOpen.DataItem | null) {
4370
if (callback.value) {
44-
callback.value(file)
71+
callback.value(item)
4572
}
4673
}
4774
4875
function chooseDocument (filter = (item: BaseDoc) => isMarkdownFile(item.path)) {
49-
return new Promise<Doc | null>(resolve => {
50-
callback.value = (f: Doc | null) => {
51-
resolve(f)
52-
callback.value = null
53-
filterItem.value = undefined
54-
}
76+
return new Promise<BaseDoc | null>(resolve => {
77+
bindAction(
78+
(item: Components.QuickOpen.DataItem | null) => {
79+
resolve((item && item.type === 'file') ? item.payload : null)
80+
},
81+
(item: Components.QuickOpen.DataItem) => {
82+
// if item is a tag, always show it
83+
if (item.type === 'tag') {
84+
return true
85+
}
5586
56-
onlyCurrentRepo.value = true
57-
filterItem.value = filter
87+
return item.type === 'file' &&
88+
item.payload.repo === store.state.currentRepo?.name && // only current repo
89+
filter(item.payload as BaseDoc)
90+
})
5891
})
5992
}
6093
@@ -88,9 +121,9 @@ export default defineComponent({
88121
show,
89122
close,
90123
callback,
91-
chooseFile,
92-
onlyCurrentRepo,
124+
chooseItem,
93125
filterItem,
126+
quickOpen,
94127
}
95128
},
96129
})

src/renderer/components/IndexStatus.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ import store from '@fe/support/store'
3838
import { setCurrentRepo, toggleRepoIndexing } from '@fe/services/repo'
3939
import { rebuildCurrentRepo } from '@fe/services/indexer'
4040
import { useI18n } from '@fe/services/i18n'
41+
import type { Components } from '@fe/types'
4142
4243
const props = defineProps<{
4344
title?: string;
4445
disableCheckCurrentFile?: boolean;
4546
}>()
4647
47-
type Status = 'not-open-file' | 'not-open-repo' | 'not-same-repo' | 'index-disabled' | 'indexing' | 'indexed'
48+
type Status = Components.IndexStatus.Status
4849
4950
const emit = defineEmits<{
5051
'status-change': [Status]

0 commit comments

Comments
 (0)