From 58745f0e9ce92c944746f95025848951032e4dbb Mon Sep 17 00:00:00 2001 From: hrzlgnm Date: Tue, 12 Mar 2024 22:53:55 +0100 Subject: [PATCH] Use thawui components for frontend (#40) --- Cargo.toml | 4 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- src/app.rs | 108 ++++++++++++++++++++----------------- styles.css | 110 ++------------------------------------ 5 files changed, 68 insertions(+), 158 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3ce309f..9cf4baa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mdns-browser-ui" -version = "0.0.3" +ersion = "0.0.4" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,6 +14,8 @@ serde-wasm-bindgen = "0.6" log = "^0.4.21" console_error_panic_hook = "0.1.7" console_log = "1.0.0" +thaw = { version = "0.2.3", features = ["csr"] } +leptos_meta = { version = "0.6.9", features = ["csr"] } [workspace] members = ["src-tauri"] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 38911c0..b150cc2 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mdns-browser" -version = "0.0.3" +version = "0.0.4" description = "mDNS browser" authors = ["hrzlgnm"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 127aae5..380652c 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "mdns-browser", - "version": "0.0.3" + "version": "0.0.4" }, "tauri": { "allowlist": { diff --git a/src/app.rs b/src/app.rs index a3c6317..249b54e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,8 +1,10 @@ use std::{fmt::Display, net::IpAddr}; -use leptos::{html::Input, *}; +use leptos::*; +use leptos_meta::provide_meta_context; use serde::{Deserialize, Serialize}; use serde_wasm_bindgen::{from_value, to_value}; +use thaw::{Button, GlobalStyle, Input, Layout, Space, Table, Theme, ThemeProvider}; use wasm_bindgen::prelude::*; #[wasm_bindgen] @@ -68,11 +70,18 @@ async fn resolve_service(service_type: String) -> ResolvedServices { #[component] fn ShowServicesTypes(services: ServiceTypes) -> impl IntoView { view! { -