mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: support hotkey (wip)
This commit is contained in:
@@ -213,7 +213,6 @@ pub fn patch_clash_config(payload: Mapping) -> CmdResult {
|
||||
wrap_err!(core.patch_clash(payload))
|
||||
}
|
||||
|
||||
/// get the verge config
|
||||
#[tauri::command]
|
||||
pub fn get_verge_config() -> CmdResult<Verge> {
|
||||
let global = Data::global();
|
||||
@@ -229,6 +228,13 @@ pub fn patch_verge_config(payload: Verge) -> CmdResult {
|
||||
wrap_err!(core.patch_verge(payload))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn update_hotkeys(hotkeys: Vec<String>) -> CmdResult {
|
||||
let core = Core::global();
|
||||
let mut hotkey = core.hotkey.lock();
|
||||
wrap_err!(hotkey.update(hotkeys))
|
||||
}
|
||||
|
||||
/// change clash core
|
||||
#[tauri::command]
|
||||
pub fn change_clash_core(clash_core: Option<String>) -> CmdResult {
|
||||
|
||||
Reference in New Issue
Block a user