Skip to content

Commit

Permalink
Merge branch 'release/3.78.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Dec 27, 2024
2 parents ddb312a + 90ade24 commit 64cefb5
Show file tree
Hide file tree
Showing 28 changed files with 1,903 additions and 804 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,15 @@ For more information on how to use the following functions, please see [characte

## Changelogs

### [v3.78.1](https://github.com/purocean/yn/releases/tag/v3.78.1) 2024-12-19

[Windows](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-win-x64-3.78.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-mac-arm64-3.78.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-mac-x64-3.78.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-linux-x86_64-3.78.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-linux-amd64-3.78.1.deb)

1. feat: Added the ability to view resource links and external links referenced in the current document through the link panel.
2. feat: Added a table insertion panel, supporting quick specification of rows and columns.
3. feat: Exporting to HTML now supports the inclusion of a table of contents.
4. feat: When unable to move a file to the recycle bin, prompt whether to permanently delete the file.
5. feat: Support for introducing images using the Wiki link method `![[Image Link]]`, but fuzzy path matching is not yet supported.
6. feat: Added the `{docPath}` variable to the image save path settings.
7. fix: Fixed the issue of incorrect automatic numbering of document titles in the latest version of the Chrome browser.
8. fix: Fixed the issue of incorrect UI element layering in certain situations.
9. feat(plugin): Added the `AFTER_PARSE_LINK` Hook to intercept link parsing.
10. feat(plugin): Added the `VIEW_DOM_ERROR` Hook to listen for errors in the preview area.
11. feat(plugin): Added the `ctx.components.IndexStatus` component.
### [v3.78.2](https://github.com/purocean/yn/releases/tag/v3.78.2) 2024-12-27

[Windows](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-win-x64-3.78.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-mac-arm64-3.78.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-mac-x64-3.78.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-linux-x86_64-3.78.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-linux-amd64-3.78.2.deb)

1. feat: Enhance search result highlighting and interaction, automatically select search results in the editor when switching files
2. feat: Optimize ordered list auto-numbering, support single-entry multi-line recognition
3. fix: Fix the issue of losing styles when exporting to HTML
4. fix: Fix the issue of document index not updating after deleting a directory
5. fix: Fix the issue where searching for a large number of results may cause the application to freeze

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

Expand Down
24 changes: 9 additions & 15 deletions README_ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,15 @@

## 更新日志

### [v3.78.1](https://github.com/purocean/yn/releases/tag/v3.78.1) 2024-12-19

[Windows](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-win-x64-3.78.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-mac-arm64-3.78.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-mac-x64-3.78.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-linux-x86_64-3.78.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.78.1/Yank-Note-linux-amd64-3.78.1.deb)

1. feat: 查看链接面板增加查看当前文档引用的资源链接和外部链接功能
2. feat: 增加插入表格面板,支持快速指定行列数
3. feat: 导出 HTML 支持包含目录
4. feat: 当无法将文件移动到回收站时,询问是否永久删除文件
5. feat: 支持 `![[图片链接]]` Wiki 链接方式引入图片,但暂不支持模糊匹配路径
6. feat: 设置图片保存路径变量增加 `{docPath}` 变量
7. fix: 修复新版 Chrome 浏览器上文档标题自动编号不正确问题
8. fix: 修复某些情况下 UI 元素层级不正确问题
9. feat(plugin): 增加 `AFTER_PARSE_LINK` Hook 用以拦截链接解析
10. feat(plugin): 增加 `VIEW_DOM_ERROR` Hook 用以监听预览区错误事件
11. feat(plugin): 增加 `ctx.components.IndexStatus` 组件
### [v3.78.2](https://github.com/purocean/yn/releases/tag/v3.78.2) 2024-12-27

[Windows](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-win-x64-3.78.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-mac-arm64-3.78.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-mac-x64-3.78.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-linux-x86_64-3.78.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.78.2/Yank-Note-linux-amd64-3.78.2.deb)

1. feat: 优化搜索结果高亮显示和交互,切换文件时候编辑器自动选择搜索结果
2. feat: 优化有序列表自动编号,支持单条目跨多行识别
3. fix: 修复导出 HTML 丢失样式问题
4. fix: 修复删除目录后文档索引不更新问题
5. fix: 修复搜索出大量结果可能导致应用卡住问题

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

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yank.note",
"version": "3.78.1",
"version": "3.78.2",
"description": "Yank Note: A highly extensible Markdown editor, designed for productivity.",
"main": "dist/main/app.js",
"license": "AGPL-3.0",
Expand Down Expand Up @@ -96,9 +96,9 @@
"@types/yargs": "^15.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vue/compiler-sfc": "^3.4.35",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"@vue/compiler-sfc": "^3.5.13",
"@vue/eslint-config-standard": "^8.0.1",
"@vue/eslint-config-typescript": "^13.0.0",
"autoprefixer": "^10.4.16",
Expand Down Expand Up @@ -138,7 +138,7 @@
"parse-author": "^2.0.0",
"path-browserify": "^1.0.1",
"prismjs": "^1.29.0",
"sass": "^1.35.1",
"sass": "^1.83.0",
"socket.io-client": "^4.7.2",
"sortablejs": "^1.13.0",
"ts-jest": "^29.1.1",
Expand All @@ -148,9 +148,9 @@
"typescript": "^5.5.4",
"utility-types": "^3.10.0",
"viewerjs": "^1.11.6",
"vite": "^5.3.6",
"vue": "^3.4.35",
"vue-tsc": "^2.0.29",
"vite": "^6.0.6",
"vue": "^3.5.13",
"vue-tsc": "^2.2.0",
"xterm": "^4.18.0",
"xterm-addon-fit": "^0.5.0",
"xterm-theme": "^1.1.0"
Expand Down
10 changes: 6 additions & 4 deletions src/main/server/file.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { app, shell } from 'electron'
import ch from 'child_process'
import type { WatchOptions } from 'chokidar'
import orderBy from 'lodash/orderBy'
import * as fs from 'fs-extra'
import * as path from 'path'
Expand All @@ -13,6 +12,7 @@ import { createStreamResponse } from '../helper'
import { HISTORY_DIR } from '../constant'
import config from '../config'
import repository from './repository'
import type { WatchOpts } from './watch-worker'

// make sure watch-worker.ts is compiled
import './watch-worker'
Expand Down Expand Up @@ -576,8 +576,10 @@ export async function commentHistoryVersion (repo: string, p: string, version: s
}, p)
}

export async function watchFile (repo: string, p: string, options: WatchOptions & { mdContent?: boolean }) {
return withRepo(repo, async (_, filePath) => {
export async function watchFile (repo: string, p: string | string[], options: WatchOpts) {
return withRepo(repo, async (_, ...args) => {
const filePath = args.length === 1 ? args[0] : args

const { response, enqueue, close } = createStreamResponse()

type Message = { id: number, type: 'init' | 'stop' | 'enqueue', payload?: any }
Expand Down Expand Up @@ -641,5 +643,5 @@ export async function watchFile (repo: string, p: string, options: WatchOptions
})

return response
}, p)
}, ...(Array.isArray(p) ? p : [p]))
}
4 changes: 4 additions & 0 deletions src/main/server/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ if (os.platform() === 'darwin') {
}

export async function search (query: ITextQuery) {
if (!query.maxFileSize) {
query.maxFileSize = 3 * 1024 * 1024 // limit to 3MB
}

const cts = new CancellationTokenSource()
const cancel = () => {
cts.cancel()
Expand Down
11 changes: 9 additions & 2 deletions src/main/server/watch-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import path from 'path'
import { isMarkdownFile } from '../../share/misc'

export type Message = { id: number, type: 'init' | 'stop' | 'enqueue', payload?: any }
export type WatchOpts = chokidar.WatchOptions & { mdContent?: boolean, mdFilesOnly?: boolean }

function init (id: number, filePath: string, options: chokidar.WatchOptions & { mdContent?: boolean }) {
function init (id: number, filePath: string | string[], options: WatchOpts) {
console.log(`watch process ${id} >`, filePath, 'init')

try {
Expand Down Expand Up @@ -46,6 +47,12 @@ function init (id: number, filePath: string, options: chokidar.WatchOptions & {
}

watcher.on('all', async (eventName, path, stats) => {
const isMdFile = isMarkdownFile(path)

if (options.mdFilesOnly && !isMdFile) {
return
}

promiseQueue.unshift(new Promise<any>(resolve => {
const result = {
eventName,
Expand All @@ -58,7 +65,7 @@ function init (id: number, filePath: string, options: chokidar.WatchOptions & {
} : undefined
}

if (options.mdContent && isMarkdownFile(path) && (eventName === 'add' || eventName === 'change')) {
if (options.mdContent && isMdFile && (eventName === 'add' || eventName === 'change')) {
fs.readFile(path, 'utf-8').then(content => {
result.content = content
resolve(result)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
@import '@fe/styles/mixins.scss';
@use '@fe/styles/mixins.scss' as *;
.menu {
list-style: none;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/DefaultPreviewerRender.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ watch(fileUri, () => {
</style>

<style lang="scss">
@import '@fe/styles/mixins.scss';
@use '@fe/styles/mixins.scss' as *;
body.find-in-preview-highlight ::selection {
background-color: #ffeb3b !important;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/GroupTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
@import '@fe/styles/mixins.scss';
@use '@fe/styles/mixins.scss' as *;
.tabs {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/KeyboardShortcuts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ onUnmounted(() => {
</script>

<style lang="scss" scoped>
@import '@fe/styles/mixins.scss';
@use '@fe/styles/mixins.scss' as *;
.wrapper {
width: 90vw;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/MonacoEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default defineComponent({
</style>

<style lang="scss">
@import '@fe/styles/mixins.scss';
@use '@fe/styles/mixins.scss' as *;
.monaco-editor .inputarea {
display: unset;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/QuickOpen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@keydown.up.exact="selectItem(-1)"
@keydown.down.exact="selectItem(1)"
@click.stop>
<div class="tab">
<div class="tab" v-if="tabs.length > 1">
<div
v-for="tab in tabs"
:key="tab.key"
Expand Down
Loading

0 comments on commit 64cefb5

Please sign in to comment.