feat(gui): Clickable addresses to copy to clipboard (#38)

This commit is contained in:
Einliterflasche 2024-08-29 14:28:23 +02:00 committed by GitHub
parent 1b1fe0add5
commit ff1ded55ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 405 additions and 37 deletions

View file

@ -21,3 +21,4 @@ serde = { version = "1", features = [ "derive" ] }
serde_json = "1"
swap = { path = "../swap", features = [ "tauri" ] }
tauri = { version = "2.0.0-rc.1", features = [ "config-json5" ] }
tauri-plugin-clipboard-manager = "2.1.0-beta.7"

View file

@ -2,6 +2,12 @@
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": ["core:event:allow-emit", "core:event:default"]
}
"windows": [
"main"
],
"permissions": [
"core:event:allow-emit",
"core:event:default",
"clipboard-manager:allow-write-text"
]
}

View file

@ -112,6 +112,7 @@ fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_clipboard_manager::init())
.invoke_handler(tauri::generate_handler![
get_balance,
get_swap_infos_all,