This commit is contained in:
Jonas Kruckenberg 2022-11-14 11:18:23 +01:00
parent d5f1a6e03e
commit 99ca3a3393
16 changed files with 27 additions and 2231 deletions

View file

@ -1,4 +1,5 @@
use anyhow::ensure;
use log::debug;
use tauri_sys::app;
pub async fn get_name() -> anyhow::Result<()> {
@ -24,6 +25,8 @@ pub async fn get_version() -> anyhow::Result<()> {
pub async fn get_tauri_version() -> anyhow::Result<()> {
let version = app::get_tauri_version().await?;
debug!("version {}", version);
ensure!(version.major == 1);
ensure!(version.minor == 1);
ensure!(version.patch == 0);

View file

@ -59,6 +59,8 @@ where
}
fn main() {
wasm_logger::init(wasm_logger::Config::default());
panic::set_hook(Box::new(|info| {
console_error_panic_hook::hook(info);
@ -67,6 +69,11 @@ fn main() {
}));
sycamore::render(|cx| {
#[cfg(feature = "ci")]
sycamore::suspense::await_suspense(cx, async {
tauri_sys::process::exit(0).await;
});
view! { cx,
table {
tbody {
@ -82,7 +89,4 @@ fn main() {
}
}
});
#[cfg(feature = "ci")]
wasm_bindgen_futures::spawn_local(async { tauri_sys::process::exit(0).await; });
}