mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-06-15 19:37:37 +02:00
Compare commits
4 commits
95a4ad624a
...
f37cebd594
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f37cebd594 | ||
![]() |
0be474c285 | ||
![]() |
7ec9bf8ca3 | ||
![]() |
5fd0485aa7 |
8 changed files with 2393 additions and 238 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -22,7 +22,5 @@ logs
|
|||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
bun.lockb
|
||||
.gitignore
|
||||
.vscode
|
||||
bun.lock
|
||||
.vscode
|
2
app.vue
2
app.vue
|
@ -10,10 +10,8 @@ import { listen } from "@tauri-apps/api/event";
|
|||
import { app, window } from "@tauri-apps/api";
|
||||
import { disable, enable } from "@tauri-apps/plugin-autostart";
|
||||
import { onMounted } from "vue";
|
||||
import { keyboard } from "wrdu-keyboard";
|
||||
|
||||
const { $settings } = useNuxtApp();
|
||||
keyboard.init();
|
||||
|
||||
onMounted(async () => {
|
||||
await listen("settings", async () => {
|
||||
|
|
16
package.json
16
package.json
|
@ -10,17 +10,17 @@
|
|||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.3.0",
|
||||
"@tauri-apps/cli": "2.3.1",
|
||||
"@tauri-apps/plugin-autostart": "2.2.0",
|
||||
"@tauri-apps/api": "2.5.0",
|
||||
"@tauri-apps/cli": "2.5.0",
|
||||
"@tauri-apps/plugin-autostart": "2.3.0",
|
||||
"@tauri-apps/plugin-os": "2.2.1",
|
||||
"nuxt": "3.16.0",
|
||||
"overlayscrollbars": "2.11.1",
|
||||
"nuxt": "3.17.4",
|
||||
"overlayscrollbars": "2.11.3",
|
||||
"overlayscrollbars-vue": "0.5.9",
|
||||
"sass-embedded": "1.85.1",
|
||||
"sass-embedded": "1.89.0",
|
||||
"uuid": "11.1.0",
|
||||
"vue": "3.5.13",
|
||||
"wrdu-keyboard": "github:0PandaDEV/keyboard"
|
||||
"vue": "3.5.15",
|
||||
"@waradu/keyboard": "4.2.0"
|
||||
},
|
||||
"overrides": {
|
||||
"chokidar": "^3.6.0"
|
||||
|
|
|
@ -73,7 +73,6 @@ import type {
|
|||
InfoColor,
|
||||
InfoCode,
|
||||
} from "~/types/types";
|
||||
import { Key, keyboard } from "wrdu-keyboard";
|
||||
import {
|
||||
selectedGroupIndex,
|
||||
selectedItemIndex,
|
||||
|
@ -82,6 +81,7 @@ import {
|
|||
} from "~/lib/selectedResult";
|
||||
import IconsEnter from "~/components/Icons/Enter.vue";
|
||||
import IconsK from "~/components/Icons/K.vue";
|
||||
import { Key, useKeyboard } from "@waradu/keyboard";
|
||||
|
||||
interface GroupedHistory {
|
||||
label: string;
|
||||
|
@ -90,6 +90,8 @@ interface GroupedHistory {
|
|||
|
||||
const { $history } = useNuxtApp();
|
||||
|
||||
const keyboard = useKeyboard();
|
||||
|
||||
const CHUNK_SIZE = 50;
|
||||
const SCROLL_THRESHOLD = 100;
|
||||
const SCROLL_PADDING = 8;
|
||||
|
@ -527,33 +529,33 @@ const setupEventListeners = async (): Promise<void> => {
|
|||
}
|
||||
focusSearchInput();
|
||||
|
||||
keyboard.clear();
|
||||
keyboard.prevent.down([Key.DownArrow], () => {
|
||||
keyboard.init();
|
||||
keyboard.listen([Key.DownArrow], () => {
|
||||
selectNext();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.UpArrow], () => {
|
||||
keyboard.listen([Key.UpArrow], () => {
|
||||
selectPrevious();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.Enter], () => {
|
||||
keyboard.listen([Key.Enter], () => {
|
||||
pasteSelectedItem();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.Escape], () => {
|
||||
keyboard.listen([Key.Escape], () => {
|
||||
hideApp();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
switch (os.value) {
|
||||
case "macos":
|
||||
keyboard.prevent.down([Key.LeftMeta, Key.K], () => { });
|
||||
keyboard.prevent.down([Key.RightMeta, Key.K], () => { });
|
||||
keyboard.listen([Key.Meta, Key.K], () => { }, { prevent: true });
|
||||
keyboard.listen([Key.Meta, Key.K], () => { }, { prevent: true });
|
||||
break;
|
||||
|
||||
case "linux":
|
||||
case "windows":
|
||||
keyboard.prevent.down([Key.LeftControl, Key.K], () => { });
|
||||
keyboard.prevent.down([Key.RightControl, Key.K], () => { });
|
||||
keyboard.listen([Key.Control, Key.K], () => { }, { prevent: true });
|
||||
keyboard.listen([Key.Control, Key.K], () => { }, { prevent: true });
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
@ -563,32 +565,32 @@ const setupEventListeners = async (): Promise<void> => {
|
|||
keyboard.clear();
|
||||
});
|
||||
|
||||
keyboard.prevent.down([Key.DownArrow], () => {
|
||||
keyboard.listen([Key.DownArrow], () => {
|
||||
selectNext();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.UpArrow], () => {
|
||||
keyboard.listen([Key.UpArrow], () => {
|
||||
selectPrevious();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.Enter], () => {
|
||||
keyboard.listen([Key.Enter], () => {
|
||||
pasteSelectedItem();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.Escape], () => {
|
||||
keyboard.listen([Key.Escape], () => {
|
||||
hideApp();
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
switch (os.value) {
|
||||
case "macos":
|
||||
keyboard.prevent.down([Key.LeftMeta, Key.K], () => { });
|
||||
keyboard.prevent.down([Key.RightMeta, Key.K], () => { });
|
||||
keyboard.listen([Key.Meta, Key.K], () => { }, { prevent: true });
|
||||
keyboard.listen([Key.Meta, Key.K], () => { }, { prevent: true });
|
||||
break;
|
||||
|
||||
case "linux":
|
||||
case "windows":
|
||||
keyboard.prevent.down([Key.LeftControl, Key.K], () => { });
|
||||
keyboard.prevent.down([Key.RightControl, Key.K], () => { });
|
||||
keyboard.listen([Key.Control, Key.K], () => { }, { prevent: true });
|
||||
keyboard.listen([Key.Control, Key.K], () => { }, { prevent: true });
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -633,6 +635,10 @@ onMounted(async () => {
|
|||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
keyboard.clear();
|
||||
});
|
||||
|
||||
const getFormattedDate = computed(() => {
|
||||
if (!selectedItem.value?.timestamp) return "";
|
||||
return new Intl.DateTimeFormat("en-US", {
|
||||
|
|
|
@ -78,10 +78,10 @@ import { onMounted, onUnmounted, reactive, ref } from "vue";
|
|||
import { platform } from "@tauri-apps/plugin-os";
|
||||
import { useRouter } from "vue-router";
|
||||
import { KeyValues, KeyLabels } from "../types/keys";
|
||||
import { disable, enable } from "@tauri-apps/plugin-autostart";
|
||||
import { Key, keyboard } from "wrdu-keyboard";
|
||||
import { disable, enable } from "@tauri-apps/plugin-autostart";
|
||||
import BottomBar from "../components/BottomBar.vue";
|
||||
import IconsEnter from "~/components/Icons/Enter.vue";
|
||||
import { Key, useKeyboard } from "@waradu/keyboard";
|
||||
|
||||
const activeModifiers = reactive<Set<KeyValues>>(new Set());
|
||||
const isKeybindInputFocused = ref(false);
|
||||
|
@ -93,6 +93,7 @@ const router = useRouter();
|
|||
const showEmptyKeybindError = ref(false);
|
||||
const autostart = ref(false);
|
||||
const { $settings } = useNuxtApp();
|
||||
const keyboard = useKeyboard();
|
||||
|
||||
const modifierKeySet = new Set([
|
||||
KeyValues.AltLeft,
|
||||
|
@ -174,48 +175,48 @@ const toggleAutostart = async () => {
|
|||
os.value = platform();
|
||||
|
||||
onMounted(async () => {
|
||||
keyboard.prevent.down([Key.All], (event: KeyboardEvent) => {
|
||||
keyboard.listen([Key.All], (event: KeyboardEvent) => {
|
||||
if (isKeybindInputFocused.value) {
|
||||
onKeyDown(event);
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.Escape], () => {
|
||||
keyboard.listen([Key.Escape], () => {
|
||||
if (isKeybindInputFocused.value) {
|
||||
keybindInput.value?.blur();
|
||||
} else {
|
||||
router.push("/");
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
switch (os.value) {
|
||||
case "macos":
|
||||
keyboard.prevent.down([Key.LeftMeta, Key.Enter], () => {
|
||||
keyboard.listen([Key.Meta, Key.Enter], () => {
|
||||
if (!isKeybindInputFocused.value) {
|
||||
saveKeybind();
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.RightMeta, Key.Enter], () => {
|
||||
keyboard.listen([Key.Meta, Key.Enter], () => {
|
||||
if (!isKeybindInputFocused.value) {
|
||||
saveKeybind();
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
break;
|
||||
|
||||
case "linux":
|
||||
case "windows":
|
||||
keyboard.prevent.down([Key.LeftControl, Key.Enter], () => {
|
||||
keyboard.listen([Key.Control, Key.Enter], () => {
|
||||
if (!isKeybindInputFocused.value) {
|
||||
saveKeybind();
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
|
||||
keyboard.prevent.down([Key.RightControl, Key.Enter], () => {
|
||||
keyboard.listen([Key.Control, Key.Enter], () => {
|
||||
if (!isKeybindInputFocused.value) {
|
||||
saveKeybind();
|
||||
}
|
||||
});
|
||||
}, { prevent: true });
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
371
src-tauri/Cargo.lock
generated
371
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -4,49 +4,49 @@ version = "0.4.0"
|
|||
description = "Qopy"
|
||||
authors = ["pandadev"]
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
rust-version = "1.80"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.6", features = [] }
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.3.1", features = [
|
||||
tauri = { version = "2.5.1", features = [
|
||||
"macos-private-api",
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
] }
|
||||
tauri-plugin-sql = { version = "2.2.0", features = ["sqlite"] }
|
||||
tauri-plugin-autostart = "2.2.0"
|
||||
tauri-plugin-autostart = "2.3.0"
|
||||
tauri-plugin-os = "2.2.1"
|
||||
tauri-plugin-updater = "2.6.0"
|
||||
tauri-plugin-dialog = "2.2.0"
|
||||
tauri-plugin-fs = "2.2.0"
|
||||
tauri-plugin-updater = "2.7.1"
|
||||
tauri-plugin-dialog = "2.2.2"
|
||||
tauri-plugin-fs = "2.3.0"
|
||||
tauri-plugin-clipboard = "2.1.11"
|
||||
tauri-plugin-prevent-default = "1.2.1"
|
||||
tauri-plugin-global-shortcut = "2.2.0"
|
||||
tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "v2" }
|
||||
sqlx = { version = "0.8.3", features = [
|
||||
tauri-plugin-prevent-default = "2.1.0"
|
||||
tauri-plugin-global-shortcut = "2.2.1"
|
||||
tauri-plugin-aptabase = "1.0.0"
|
||||
sqlx = { version = "0.8.6", features = [
|
||||
"runtime-tokio-native-tls",
|
||||
"sqlite",
|
||||
"chrono",
|
||||
] }
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
tokio = { version = "1.44.1", features = ["full"] }
|
||||
tokio = { version = "1.45.1", features = ["full"] }
|
||||
serde_json = "1.0.140"
|
||||
rdev = "0.5.3"
|
||||
rand = "0.9.0"
|
||||
rand = "0.9.1"
|
||||
base64 = "0.22.1"
|
||||
image = "0.25.5"
|
||||
reqwest = { version = "0.12.14", features = ["json", "blocking"] }
|
||||
image = "0.25.6"
|
||||
reqwest = { version = "0.12.15", features = ["json", "blocking"] }
|
||||
url = "2.5.4"
|
||||
regex = "1.11.1"
|
||||
sha2 = "0.10.8"
|
||||
sha2 = "0.10.9"
|
||||
lazy_static = "1.5.0"
|
||||
time = "0.3.39"
|
||||
global-hotkey = "0.6.4"
|
||||
chrono = { version = "0.4.40", features = ["serde"] }
|
||||
log = { version = "0.4.26", features = ["std"] }
|
||||
uuid = "1.16.0"
|
||||
time = "0.3.41"
|
||||
global-hotkey = "0.7.0"
|
||||
chrono = { version = "0.4.41", features = ["serde"] }
|
||||
log = { version = "0.4.27", features = ["std"] }
|
||||
uuid = { version = "1.17.0", features = ["v4"] }
|
||||
include_dir = "0.7.4"
|
||||
# hyperpolyglot = { git = "https://github.com/0pandadev/hyperpolyglot" }
|
||||
applications = { git = "https://github.com/HuakunShen/applications-rs", branch = "fix/win-app-detection" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue