From 67fbdf27b2dc5425e5661e326122569a07f9fd16 Mon Sep 17 00:00:00 2001 From: geoffreychen777 Date: Mon, 11 Mar 2024 16:56:44 +0000 Subject: [PATCH] Fix: smartfilter UI bug --- CHANGELOG_CN.md | 6 +++++ CHANGELOG_EN.md | 6 +++++ .../components/smart-filter-rule-box.vue | 25 +++++++++++++------ package.json | 2 +- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index fea2278d..cceffca1 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,9 @@ +# v3.0.0-beta.13 11/03 2024 + +1. 新特性:再其他 App 中和 Paperlib 通信的 API:paperlib://APIGroup.serviceName.methodName/?args=\[...\] +2. 改进: 添加了一个新的快捷键 `Ctrl/Cmd + s` 来保存当前编辑的论文。 +3. 修复:一个 smartfilter 编辑器的 Bug。致谢 @Rccubc + # v3.0.0-beta.12 11/03 2024 1. 新特性:再其他 App 中和 Paperlib 通信的 API:paperlib://APIGroup.serviceName.methodName/?args=\[...\] diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index da37bc98..6964215c 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -1,3 +1,9 @@ +## v3.0.0-beta.13 11/03 2024 + +1. New Feature: API for other APPs: paperlib://APIGroup.serviceName.methodName/?args=\[...\] +2. Enhance: add `Ctrl/CMD + s` shortcut for the editing window. +3. Fix: a bug in smartfilter editor. Thanks @Rccubc + ## v3.0.0-beta.12 11/03 2024 1. New Feature: API for other APPs: paperlib://APIGroup.serviceName.methodName/?args=\[...\] diff --git a/app/renderer/ui/edit-view/components/smart-filter-rule-box.vue b/app/renderer/ui/edit-view/components/smart-filter-rule-box.vue index 429cbfa6..ad67fdc2 100644 --- a/app/renderer/ui/edit-view/components/smart-filter-rule-box.vue +++ b/app/renderer/ui/edit-view/components/smart-filter-rule-box.vue @@ -34,15 +34,24 @@ const parseInitFilter = () => { const comps = filter.split(" "); if (Array.from(Object.values(startOps.value)).includes(comps[0])) { selectedStartOp.value = comps[0].toUpperCase(); + selectedField.value = comps[1]; + selectedOp.value = comps[2].toUpperCase().replaceAll("[C]", "[c]"); + + selectedValue.value = comps + .slice(3) + .join(" ") + .replace(/^["']/, "") + .replace(/["']$/, ""); + } else { + selectedField.value = comps[0]; + selectedOp.value = comps[1].toUpperCase().replaceAll("[C]", "[c]"); + + selectedValue.value = comps + .slice(2) + .join(" ") + .replace(/^["']/, "") + .replace(/["']$/, ""); } - selectedField.value = comps[1]; - selectedOp.value = comps[2].toUpperCase().replaceAll("[C]", "[c]"); - - selectedValue.value = comps - .slice(3) - .join(" ") - .replace(/^["']/, "") - .replace(/["']$/, ""); } }; diff --git a/package.json b/package.json index c15b08b9..27648ab5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paperlib-beta", - "version": "3.0.0-beta.12", + "version": "3.0.0-beta.13", "main": "dist/main-entry.js", "description": "A simple academic paper management tool.", "author": "Future Scholars ",