Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const LANGUAGE = {

export const LISTEN_KEY = {
ACTIVATE_BACK_TOP: "activate-back-top",
ACTIVATE_SHOW_ALL: "activate-show-all",
CLIPBOARD_ITEM_DELETE: "clipboard-item-delete",
CLIPBOARD_ITEM_FAVORITE: "clipboard-item-favorite",
CLIPBOARD_ITEM_PASTE: "clipboard-item-paste",
Expand Down
5 changes: 5 additions & 0 deletions src/pages/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ const Main = () => {
}
});

// 激活时切换至全部分组
useTauriListen(LISTEN_KEY.ACTIVATE_SHOW_ALL, () => {
state.group = "all";
});

// 监听粘贴为纯文本的快捷键
useKeyPress(shortcut.pastePlain, (event) => {
event.preventDefault();
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export const toggleWindowVisible = async () => {
if (appWindow.label === WINDOW_LABEL.MAIN) {
const { window } = clipboardStore;

// 激活时切换至全部分组
if (window.showAll) {
await emit(LISTEN_KEY.ACTIVATE_SHOW_ALL);
}

// 激活时回到顶部
if (window.backTop) {
await emit(LISTEN_KEY.ACTIVATE_BACK_TOP);
Expand Down