Use tta crate from tauri app

This commit is contained in:
Joscha 2025-01-21 23:40:26 +01:00
parent 90c48d4723
commit aab7973928
4 changed files with 7 additions and 5 deletions

View file

@ -18,10 +18,11 @@ crate-type = ["staticlib", "cdylib", "rlib"]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
tta = { workspace = true }
[lints]
workspace = true

View file

@ -1,7 +1,7 @@
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
tta::greet(name)
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]

View file

@ -29,7 +29,7 @@ async function greet() {
<p>Click on the Tauri, Vite, and Vue logos to learn more.</p>
<form class="row" @submit.prevent="greet">
<input id="greet-input" v-model="name" placeholder="Enter a name..." />
<input id="greet-input" v-model="name" placeholder="Greetee" />
<button type="submit">Greet</button>
</form>
<p>{{ greetMsg }}</p>
@ -157,4 +157,4 @@ button {
}
}
</style>
</style>