mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
fix: update keybind references to settings in app and tray setup
This commit is contained in:
parent
b3daaaa633
commit
6514abcdb3
3 changed files with 6 additions and 8 deletions
4
app.vue
4
app.vue
|
@ -10,15 +10,13 @@ import { app, window } from '@tauri-apps/api';
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await listen('change_keybind', async () => {
|
await listen('settings', async () => {
|
||||||
console.log("change_keybind");
|
|
||||||
await navigateTo('/settings')
|
await navigateTo('/settings')
|
||||||
await app.show();
|
await app.show();
|
||||||
await window.getCurrentWindow().show();
|
await window.getCurrentWindow().show();
|
||||||
})
|
})
|
||||||
|
|
||||||
await listen('main_route', async () => {
|
await listen('main_route', async () => {
|
||||||
console.log("main_route");
|
|
||||||
await navigateTo('/')
|
await navigateTo('/')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
.enabled(false)
|
.enabled(false)
|
||||||
.build(app)?])
|
.build(app)?])
|
||||||
.items(&[&MenuItemBuilder::with_id("show", "Show/Hide").build(app)?])
|
.items(&[&MenuItemBuilder::with_id("show", "Show/Hide").build(app)?])
|
||||||
.items(&[&MenuItemBuilder::with_id("keybind", "Change keybind").build(app)?])
|
.items(&[&MenuItemBuilder::with_id("settings", "Settings").build(app)?])
|
||||||
.items(&[&MenuItemBuilder::with_id("quit", "Quit").build(app)?])
|
.items(&[&MenuItemBuilder::with_id("quit", "Quit").build(app)?])
|
||||||
.build()?,
|
.build()?,
|
||||||
)
|
)
|
||||||
|
@ -44,9 +44,9 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
}
|
}
|
||||||
window.emit("main_route", ()).unwrap();
|
window.emit("main_route", ()).unwrap();
|
||||||
}
|
}
|
||||||
"keybind" => {
|
"settings" => {
|
||||||
let _ = _app.track_event("tray_keybind_change", None);
|
let _ = _app.track_event("tray_settings", None);
|
||||||
window.emit("change_keybind", ()).unwrap();
|
window.emit("settings", ()).unwrap();
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue