diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 8c44678..e26af1b 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -28,6 +28,7 @@ struct ResolvedService { hostname: String, port: u16, addresses: Vec, + subtype: Option, } #[tauri::command] @@ -54,6 +55,7 @@ fn resolve_service(service_type: String, state: State) -> Vec { diff --git a/src/app.rs b/src/app.rs index 497f9fc..ed69628 100644 --- a/src/app.rs +++ b/src/app.rs @@ -25,6 +25,7 @@ struct ResolvedService { hostname: String, port: u16, addresses: Vec, + subtype: Option, } type ResolvedServices = Vec; @@ -48,7 +49,7 @@ async fn resolve_service(service_type: String) -> ResolvedServices { } #[component] -fn ShowServices(services: ServiceTypes) -> impl IntoView { +fn ShowServicesTypes(services: ServiceTypes) -> impl IntoView { view! {
    {services.into_iter() @@ -59,7 +60,7 @@ fn ShowServices(services: ServiceTypes) -> impl IntoView { } #[component] -fn ServiceTypeList() -> impl IntoView { +fn EnumerateServiceTypes() -> impl IntoView { let enum_action = create_action(|_input: &()| async move { enum_service_types().await }); let value = enum_action.value(); view! {
    impl IntoView { None => view! {

    "Click on button above."

    }.into_view(), Some(services) => { view! { - + }.into_view() } }} @@ -91,6 +92,7 @@ fn ShowResolvedServices(services: ResolvedServices) -> impl IntoView { .map(|n| view! {
    Instance name: {n.instance_name}
    +
    Subtype: {n.subtype}
    Hostname: {n.hostname}
    Port: {n.port}
    IPs: {n.addresses.iter().map(|n|n.to_string()).collect::>().join(", ")}
    @@ -140,7 +142,7 @@ pub fn App() -> impl IntoView { view! {
    - +
    } }