Skip to content

Commit faf2981

Browse files
authored
Merge pull request #7 from TanNhatCMS/fix
feat: 支持issue中的部分功能 EcoPasteHub#1074
2 parents 60e48a7 + 30aaa18 commit faf2981

20 files changed

Lines changed: 355 additions & 160 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"typescript-plugin-css-modules": "^5.1.0",
9191
"unocss": "^0.63.6",
9292
"unplugin-auto-import": "^0.18.6",
93-
"vite": "^5.4.18"
93+
"vite": "^5.4.19"
9494
},
9595
"simple-git-hooks": {
9696
"commit-msg": "npx --no-install commitlint -e",

pnpm-lock.yaml

Lines changed: 142 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ pub fn run() {
7373
.plugin(tauri_plugin_eco_window::init())
7474
// 自定义剪贴板插件
7575
.plugin(tauri_plugin_eco_clipboard::init())
76+
// Shell 插件
77+
.plugin(tauri_plugin_shell::init())
7678
// 自定义图片识别插件
7779
.plugin(tauri_plugin_eco_ocr::init())
7880
// 自定义粘贴的插件

src/constants/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const LISTEN_KEY = {
3434
CLOSE_DATABASE: "close-database",
3535
TOGGLE_LISTEN_CLIPBOARD: "toggle-listen-clipboard",
3636
CLIPBOARD_ITEM_FAVORITE: "clipboard-item-favorite",
37+
CLIPBOARD_ITEM_COPY: "clipboard-item-copy",
3738
ACTIVATE_BACK_TOP: "activate-back-top",
3839
};
3940

@@ -43,4 +44,5 @@ export const PRESET_SHORTCUT = {
4344
OPEN_PREFERENCES: isMac ? "meta.comma" : "ctrl.comma",
4445
HIDE_WINDOW: isMac ? "meta.w" : "ctrl.w",
4546
FIXED_WINDOW: isMac ? "meta.p" : "ctrl.p",
47+
COPY: isMac ? "meta.c" : "ctrl.c",
4648
};

src/locales/en-US.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"delete_confirm": "Delete Confirmation",
7272
"auto_sort": "Auto Sort",
7373
"show_original_content": "Show Original Content",
74+
"auto_deduplicate": "Auto Deduplicate",
7475
"excluded_file_types": "Exclude specified file types",
7576
"file_size_limit": "File size limit"
7677
},
@@ -84,6 +85,7 @@
8485
"delete_confirm": "Pop-up confirmation dialog when deleting clipboard contents",
8586
"auto_sort": "Alignment to the top when copying existing content",
8687
"show_original_content": "Whether to display the original content on mouse hover after adding a note",
88+
"auto_deduplicate": "Automatically deduplicate when copying existing content",
8789
"excluded_file_types": "When copying, do not save files of the specified type",
8890
"excluded_file_types_placeholder": "For example .pdf .mp3",
8991
"file_size_limit": "File size limit, default 0 means no limit, if the file exceeds the specified size, the file will not be saved when copying"
@@ -200,7 +202,8 @@
200202
"back_to_top": "Back to Top",
201203
"fixed_window": "Fixed Window",
202204
"open_preferences": "Open Preferences",
203-
"hide_window": "Hide Window"
205+
"hide_window": "Hide Window",
206+
"copy": "Copy"
204207
}
205208
},
206209
"data_backup": {

src/locales/ja-JP.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"delete_confirm": "削除確認",
7272
"auto_sort": "自動整列",
7373
"show_original_content": "元の内容を表示します",
74+
"auto_deduplicate": "複製已存在的內容時自動去重"
7475
"excluded_file_types": "指定された種類のファイルを除外する",
7576
"file_size_limit": "ファイルサイズの制限"
7677
},
@@ -84,6 +85,7 @@
8485
"delete_confirm": "クリップボードの内容を削除する際に確認ダイアログを表示する",
8586
"auto_sort": "既存の内容をコピーして最前面に配置する",
8687
"show_original_content": "メモを追加した後、マウスをホバーしたときに元のコンテンツを表示するかどうか",
88+
"auto_deduplicate": "複製已存在的內容時自動去重",
8789
"excluded_file_types": "コピー時に、指定したタイプのファイルを保存しない",
8890
"excluded_file_types_placeholder": "例えば .pdf .mp3",
8991
"file_size_limit": "ファイルサイズの制限。デフォルトは 0 で制限なし。ファイルが指定されたサイズを超えると、コピー時にファイルは保存されません"
@@ -200,7 +202,8 @@
200202
"back_to_top": "トップへ戻る",
201203
"fixed_window": "固定ウィンドウ",
202204
"open_preferences": "環境設定を開く",
203-
"hide_window": "ウィンドウを隠す"
205+
"hide_window": "ウィンドウを隠す",
206+
"copy": "コピー"
204207
}
205208
},
206209
"data_backup": {

src/locales/zh-CN.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"delete_confirm": "删除确认",
7272
"auto_sort": "自动排序",
7373
"show_original_content": "显示原内容",
74+
"auto_deduplicate": "自动去重",
7475
"excluded_file_types": "排除指定类型文件",
7576
"file_size_limit": "文件大小限制"
7677
},
@@ -84,6 +85,7 @@
8485
"delete_confirm": "删除剪贴板内容时弹出确认对话框",
8586
"auto_sort": "复制已存在的内容时排列到最前面",
8687
"show_original_content": "添加备注后,鼠标悬停时是否显示原内容",
88+
"auto_deduplicate": "复制已存在的内容时,自动去重",
8789
"excluded_file_types": "复制时,不保存指定类型的文件",
8890
"excluded_file_types_placeholder": "例如 .pdf .mp3",
8991
"file_size_limit": "文件大小限制,默认 0 不限制,超过指定大小则在复制时不保存该文件"
@@ -182,11 +184,13 @@
182184
"open_clipboard": "打开剪贴板窗口",
183185
"open_settings": "打开偏好设置窗口",
184186
"quick_paste": "快速粘贴",
185-
"paste_as_plain": "粘贴为纯文本"
187+
"paste_as_plain": "粘贴为纯文本",
188+
"open_notes": "打开备注界面"
186189
},
187190
"hints": {
188191
"quick_paste": "隐藏窗口时,使用数字组合键快速粘贴前九项",
189-
"paste_as_plain": "激活窗口时,将选中的内容粘贴为纯文本、OCR文本和路径"
192+
"paste_as_plain": "激活窗口时,将选中的内容粘贴为纯文本、OCR文本和路径",
193+
"open_notes": "激活窗口时,打开备注界面"
190194
}
191195
},
192196
"preset": {
@@ -200,7 +204,8 @@
200204
"back_to_top": "回到顶部",
201205
"fixed_window": "固定窗口",
202206
"open_preferences": "打开偏好设置",
203-
"hide_window": "隐藏窗口"
207+
"hide_window": "隐藏窗口",
208+
"copy": "复制"
204209
}
205210
},
206211
"data_backup": {

src/locales/zh-TW.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"delete_confirm": "删除確認",
7272
"auto_sort": "自動排序",
7373
"show_original_content": "顯示原內容",
74+
"auto_deduplicate": "自動去重",
7475
"excluded_file_types": "排除指定類型文件",
7576
"file_size_limit": "檔案大小限制"
7677
},
@@ -84,6 +85,7 @@
8485
"delete_confirm": "删除剪貼板內容時彈出確認對話方塊",
8586
"auto_sort": "複製已存在的內容時排列到最前面",
8687
"show_original_content": "添加備註後,滑鼠懸停時是否顯示原內容",
88+
"auto_deduplicate": "複製已存在的內容時自動去重",
8789
"excluded_file_types": "複製時,不保存指定類型的檔案",
8890
"excluded_file_types_placeholder": "例如 .pdf .mp3",
8991
"file_size_limit": "文件大小限制,預設 0 不限制,超過指定大小則在複製時不儲存該文件"
@@ -200,7 +202,8 @@
200202
"back_to_top": "回到頂部",
201203
"fixed_window": "固定視窗",
202204
"open_preferences": "打開偏好設定",
203-
"hide_window": "隱藏視窗"
205+
"hide_window": "隱藏視窗",
206+
"copy": "複製"
204207
}
205208
},
206209
"data_backup": {

src/pages/Main/components/Group/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ const Group = () => {
6969

7070
setChecked(key);
7171

72+
// 切换时清空多选
73+
state.selectedIds = [];
7274
Object.assign(state, { group, favorite });
7375
};
7476

src/pages/Main/components/List/components/Item/components/Header/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ const Header: FC<HeaderProps> = (props) => {
119119
align="center"
120120
gap={6}
121121
className={clsx("opacity-0 transition group-hover:opacity-100", {
122-
"opacity-100": state.activeId === id,
122+
"opacity-100":
123+
state.activeId === id || state.selectedIds.includes(id),
123124
})}
124125
onDoubleClick={(event) => event.stopPropagation()}
125126
>

0 commit comments

Comments
 (0)