From 4064381fd32e62a8159d13d287cf2a587ba013be Mon Sep 17 00:00:00 2001 From: rememberber Date: Fri, 6 Dec 2024 20:18:00 +0800 Subject: [PATCH 1/5] 1.6.6 --- pom.xml | 2 +- src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java | 2 +- src/main/resources/version_summary.json | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5bb2e0a0..6ce87de9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.luoboduner.moo.tool MooTool - 1.6.5 + 1.6.6 jar MooTool diff --git a/src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java b/src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java index 95942ff9..ad3a3a5c 100644 --- a/src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java +++ b/src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java @@ -19,7 +19,7 @@ public class UiConsts { * 软件名称,版本 */ public static final String APP_NAME = "MooTool"; - public static final String APP_VERSION = "v1.6.5"; + public static final String APP_VERSION = "v1.6.6"; public static final int TABLE_ROW_HEIGHT = 30; diff --git a/src/main/resources/version_summary.json b/src/main/resources/version_summary.json index 55bf0b16..0ef1b696 100644 --- a/src/main/resources/version_summary.json +++ b/src/main/resources/version_summary.json @@ -1,5 +1,5 @@ { - "currentVersion": "v1.6.5", + "currentVersion": "v1.6.6", "versionIndex": { "v0.0.0": "0", "v1.0.0": "1", @@ -36,7 +36,8 @@ "v1.6.2": "32", "v1.6.3": "33", "v1.6.4": "34", - "v1.6.5": "35" + "v1.6.5": "35", + "v1.6.6": "36" }, "versionDetailList": [ { @@ -218,6 +219,11 @@ "version": "v1.6.5", "title": "首次初始化时的细节优化和一些功能更新", "log": "● 首次初始化时的细节优化\n● 新增快捷键:Command + W 最小化窗口\n● JSON工具增加JavaBean和JSON互转功能\n● 格式化Tab支持文本格式化\n\n" + }, + { + "version": "v1.6.6", + "title": "初步支持翻译功能", + "log": "● 初步支持翻译功能\n● HTTP请求无HTTP前缀时默认添加http://前缀 感谢:guozhipeng\n● 二维码保存按钮文案改为:保存\n● About页面增加贡献者列表\n\n" } ] } \ No newline at end of file From cd42075b97f9398efe897ff2056799058456b2e5 Mon Sep 17 00:00:00 2001 From: rememberber Date: Fri, 6 Dec 2024 20:44:04 +0800 Subject: [PATCH 2/5] opt --- .../moo/tool/util/translator/GoogleTranslatorUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/luoboduner/moo/tool/util/translator/GoogleTranslatorUtil.java b/src/main/java/com/luoboduner/moo/tool/util/translator/GoogleTranslatorUtil.java index b61f12fb..938beff2 100644 --- a/src/main/java/com/luoboduner/moo/tool/util/translator/GoogleTranslatorUtil.java +++ b/src/main/java/com/luoboduner/moo/tool/util/translator/GoogleTranslatorUtil.java @@ -63,7 +63,7 @@ public String translate(String word, String sourceLanguage, String targetLanguag return "访问Google翻译接口超时:" + e.getMessage(); } catch (Exception e) { log.error("访问Google翻译异常", e); - return e.getMessage(); + return "访问Google翻译接口异常:" + e.getMessage(); } } From 99a245803da648b6444e37ce4cd906172be9f695 Mon Sep 17 00:00:00 2001 From: rememberber Date: Fri, 6 Dec 2024 20:51:29 +0800 Subject: [PATCH 3/5] opt --- .../com/luoboduner/moo/tool/ui/form/func/TranslationForm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/luoboduner/moo/tool/ui/form/func/TranslationForm.java b/src/main/java/com/luoboduner/moo/tool/ui/form/func/TranslationForm.java index bceb71c7..746cfa3e 100644 --- a/src/main/java/com/luoboduner/moo/tool/ui/form/func/TranslationForm.java +++ b/src/main/java/com/luoboduner/moo/tool/ui/form/func/TranslationForm.java @@ -63,7 +63,7 @@ private static void initUi() { translationForm.getSplitPane().setDividerLocation((int) (App.mainFrame.getWidth() / 5)); translationForm.getListTable().setRowHeight(UiConsts.TABLE_ROW_HEIGHT); - translationForm.getTranslationLayoutForm().getSplitPane().setDividerLocation((int) (App.mainFrame.getWidth() / 2)); + translationForm.getTranslationLayoutForm().getSplitPane().setDividerLocation((int) (App.mainFrame.getWidth() / 2) - 80); translationForm.getTranslationPanel().updateUI(); } From 01fd7623b6f0da34f9f30b900adef027baf9d695 Mon Sep 17 00:00:00 2001 From: rememberber Date: Fri, 6 Dec 2024 22:39:13 +0800 Subject: [PATCH 4/5] 1.6.6 --- download_links.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/download_links.json b/download_links.json index aa01e863..cbecc05a 100644 --- a/download_links.json +++ b/download_links.json @@ -1,6 +1,6 @@ { - "windows": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.5/MooTool-1.6.5-windows.exe", - "mac": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.5/MooTool_1.6.5.dmg", - "macSilicon": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.5/MooTool_1.6.5-AppleSilicon.dmg", - "linux": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.5/MooTool_1.6.5.deb" + "windows": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.6/MooTool-1.6.6-windows.exe", + "mac": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.6/MooTool_1.6.6.dmg", + "macSilicon": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.6/MooTool_1.6.6-AppleSilicon.dmg", + "linux": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.6.6/MooTool_1.6.6.deb" } \ No newline at end of file From 12ce96bd3f766f73d77a6579652ae1e3bf3ef687 Mon Sep 17 00:00:00 2001 From: rememberber Date: Fri, 6 Dec 2024 22:42:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E8=AE=B0=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=97=B6=E6=94=AF=E6=8C=81=E5=8C=85=E5=90=AB=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luoboduner/moo/tool/dao/TQuickNoteMapper.java | 2 ++ .../moo/tool/ui/form/func/QuickNoteForm.java | 14 +++++++++++++- .../tool/ui/listener/func/QuickNoteListener.java | 5 +++++ src/main/resources/mapper/TQuickNoteMapper.xml | 8 ++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/luoboduner/moo/tool/dao/TQuickNoteMapper.java b/src/main/java/com/luoboduner/moo/tool/dao/TQuickNoteMapper.java index 2b405321..f413640a 100644 --- a/src/main/java/com/luoboduner/moo/tool/dao/TQuickNoteMapper.java +++ b/src/main/java/com/luoboduner/moo/tool/dao/TQuickNoteMapper.java @@ -26,4 +26,6 @@ public interface TQuickNoteMapper { int updateAll(TQuickNote tQuickNote); List selectAllByFilter(String titleFilterKeyWord); + + List selectAllByFilterContainsContent(String titleFilterKeyWord); } \ No newline at end of file diff --git a/src/main/java/com/luoboduner/moo/tool/ui/form/func/QuickNoteForm.java b/src/main/java/com/luoboduner/moo/tool/ui/form/func/QuickNoteForm.java index c404752e..5ec3d727 100644 --- a/src/main/java/com/luoboduner/moo/tool/ui/form/func/QuickNoteForm.java +++ b/src/main/java/com/luoboduner/moo/tool/ui/form/func/QuickNoteForm.java @@ -100,6 +100,7 @@ public class QuickNoteForm { private JCheckBox commaDoubleQuotesToEnterCheckBox; private JToggleButton colorButton; + private JCheckBox searchContentCheckBox; private JToolBar toolBar; public final static String[] COLOR_KEYS = { @@ -122,6 +123,7 @@ private QuickNoteForm() { colorButton.setEnabled(true); toolBar = new JToolBar(); + searchContentCheckBox = new JCheckBox(); UndoUtil.register(this); } @@ -155,6 +157,9 @@ private static void initUi() { quickNoteForm.getSearchTextField().putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "搜索"); quickNoteForm.getSearchTextField().putClientProperty(FlatClientProperties.TEXT_FIELD_LEADING_ICON, new FlatSearchIcon()); + quickNoteForm.getSearchContentCheckBox().setToolTipText("包含内容"); + quickNoteForm.getSearchTextField().putClientProperty(FlatClientProperties.TEXT_FIELD_TRAILING_COMPONENT, quickNoteForm.getSearchContentCheckBox()); + quickNoteForm.getAddButton().setIcon(new FlatSVGIcon("icon/add.svg")); quickNoteForm.getSaveButton().setIcon(new FlatSVGIcon("icon/save.svg")); quickNoteForm.getFindButton().setIcon(new FlatSVGIcon("icon/find.svg")); @@ -363,7 +368,14 @@ public static void initNoteListTable() { String titleFilterKeyWord = quickNoteForm.getSearchTextField().getText(); titleFilterKeyWord = "%" + titleFilterKeyWord + "%"; - List quickNoteList = quickNoteMapper.selectAllByFilter(titleFilterKeyWord); + boolean searchContent = quickNoteForm.getSearchContentCheckBox().isSelected(); + + List quickNoteList; + if (searchContent && StringUtils.isNotBlank(titleFilterKeyWord)) { + quickNoteList = quickNoteMapper.selectAllByFilterContainsContent(titleFilterKeyWord); + } else { + quickNoteList = quickNoteMapper.selectAllByFilter(titleFilterKeyWord); + } for (TQuickNote tQuickNote : quickNoteList) { data = new Object[2]; diff --git a/src/main/java/com/luoboduner/moo/tool/ui/listener/func/QuickNoteListener.java b/src/main/java/com/luoboduner/moo/tool/ui/listener/func/QuickNoteListener.java index cfdcfceb..1220bb02 100644 --- a/src/main/java/com/luoboduner/moo/tool/ui/listener/func/QuickNoteListener.java +++ b/src/main/java/com/luoboduner/moo/tool/ui/listener/func/QuickNoteListener.java @@ -413,6 +413,11 @@ public void changedUpdate(DocumentEvent e) { // QuickNoteForm.initNoteListTable(); } }); + + // 搜索框包含内容checkbox变更事件 + quickNoteForm.getSearchContentCheckBox().addActionListener(e -> { + QuickNoteForm.initNoteListTable(); + }); } public static void showFindPanel() { diff --git a/src/main/resources/mapper/TQuickNoteMapper.xml b/src/main/resources/mapper/TQuickNoteMapper.xml index 26eda843..aa8b740f 100644 --- a/src/main/resources/mapper/TQuickNoteMapper.xml +++ b/src/main/resources/mapper/TQuickNoteMapper.xml @@ -181,6 +181,14 @@ where name like #{titleFilterKeyWord,jdbcType=VARCHAR} order by modified_time desc + update t_quick_note