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
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/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/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/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/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();
}
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/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();
}
}
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
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