diff --git a/README.md b/README.md index 664e9ac3f..633c635c0 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,9 @@ For more information on how to use the following functions, please see [characte ## Changelogs -### [v3.80.2](https://github.com/purocean/yn/releases/tag/v3.80.2) 2025-01-11 +### [v3.80.4](https://github.com/purocean/yn/releases/tag/v3.80.4) 2025-01-13 -[Windows](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-win-x64-3.80.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-mac-arm64-3.80.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-mac-x64-3.80.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-linux-x86_64-3.80.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-linux-amd64-3.80.2.deb) +[Windows](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-win-x64-3.80.4.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-mac-arm64-3.80.4.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-mac-x64-3.80.4.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-linux-x86_64-3.80.4.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-linux-amd64-3.80.4.deb) 1. feat: Added warehouse search and replace all functionality 2. feat: Added text comparison tool (requires extension installation) diff --git a/README_ZH-CN.md b/README_ZH-CN.md index 3b6fadd32..ec35378fa 100644 --- a/README_ZH-CN.md +++ b/README_ZH-CN.md @@ -76,9 +76,9 @@ ## 更新日志 -### [v3.80.2](https://github.com/purocean/yn/releases/tag/v3.80.2) 2025-01-11 +### [v3.80.4](https://github.com/purocean/yn/releases/tag/v3.80.4) 2025-01-11 -[Windows](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-win-x64-3.80.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-mac-arm64-3.80.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-mac-x64-3.80.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-linux-x86_64-3.80.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.80.2/Yank-Note-linux-amd64-3.80.2.deb) +[Windows](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-win-x64-3.80.4.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-mac-arm64-3.80.4.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-mac-x64-3.80.4.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-linux-x86_64-3.80.4.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.80.4/Yank-Note-linux-amd64-3.80.4.deb) 1. feat: 增加仓库搜索并全部替换功能 2. feat: 增加文本对比工具(需安装扩展) diff --git a/mas-release.sh b/mas-release.sh deleted file mode 100644 index b16b3d1c5..000000000 --- a/mas-release.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -ex - -#rm -r src/renderer/public/vs - -yarn -node scripts/download-pandoc.js -yarn run build - - -yarn electron-builder --mac --universal diff --git a/package.json b/package.json index 1525cb417..e2468869b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yank.note", - "version": "3.80.2", + "version": "3.80.4", "description": "Yank Note: A highly extensible Markdown editor, designed for productivity.", "main": "dist/main/app.js", "license": "AGPL-3.0", diff --git a/src/renderer/components/Filter.vue b/src/renderer/components/Filter.vue index 34618fc09..569927f95 100644 --- a/src/renderer/components/Filter.vue +++ b/src/renderer/components/Filter.vue @@ -23,28 +23,31 @@ export default defineComponent({ name: 'x-filter', components: { QuickOpen, XMask }, setup () { - const callback = ref(null) + const callback = ref<((doc: Doc | null) => void) | null>(null) const onlyCurrentRepo = ref(false) const filterItem = shallowRef<(item: BaseDoc) => boolean>() function showQuickOpen () { onlyCurrentRepo.value = false - callback.value = (f: any) => { - switchDoc(f) + callback.value = (f: Doc | null) => { + if (f) { + switchDoc(f) + } + callback.value = null filterItem.value = undefined } } - function chooseFile (file: any) { + function chooseFile (file: Doc | null) { if (callback.value) { callback.value(file) } } function chooseDocument (filter = (item: BaseDoc) => isMarkdownFile(item.path)) { - return new Promise(resolve => { - callback.value = (f: Doc) => { + return new Promise(resolve => { + callback.value = (f: Doc | null) => { resolve(f) callback.value = null filterItem.value = undefined diff --git a/src/renderer/plugins/markdown-code-run.ts b/src/renderer/plugins/markdown-code-run.ts index 4fa579f87..df5c1558f 100644 --- a/src/renderer/plugins/markdown-code-run.ts +++ b/src/renderer/plugins/markdown-code-run.ts @@ -66,7 +66,7 @@ const RunCode = defineComponent({ } if (value.length > 32 * 1024) { - value = '------Output too long, truncated to 32KB------\n' + value.slice(-32 * 1024) + value = '------Output too long, truncated to 32K------\n' + value.slice(-32 * 1024) } result.value = value diff --git a/src/renderer/support/store.ts b/src/renderer/support/store.ts index 8075ae224..a00c07dd6 100644 --- a/src/renderer/support/store.ts +++ b/src/renderer/support/store.ts @@ -107,7 +107,7 @@ watchEffect(() => { storage.set('currentFile', data ? pick(data, 'repo', 'path', 'type', 'name', 'extra') : null) - if (data && data.type === 'file' && !isNormalRepoName(data.repo)) { // record recent open time, except for repo starts with '__' + if (data && data.type === 'file' && isNormalRepoName(data.repo)) { // record recent open time, except for repo starts with '__' const record: Record = { ...(state.recentOpenTime || {}), [`${data.repo}|${data.path}`]: Date.now()