diff --git a/crates/devtools/src/server.rs b/crates/devtools/src/server.rs index 89e4bcd5..4d64946f 100644 --- a/crates/devtools/src/server.rs +++ b/crates/devtools/src/server.rs @@ -268,6 +268,7 @@ impl metadata_server::Metadata for MetaService { os: std::env::consts::OS.to_string(), arch: std::env::consts::ARCH.to_string(), debug_assertions: cfg!(debug_assertions), + has_embedded_assets: self.app_handle.asset_resolver().iter().count() > 0, }; Ok(Response::new(meta)) diff --git a/crates/wire/proto/meta.proto b/crates/wire/proto/meta.proto index e76918f7..971f2162 100644 --- a/crates/wire/proto/meta.proto +++ b/crates/wire/proto/meta.proto @@ -36,4 +36,6 @@ message AppMetadata { string arch = 6; /// Whether the app was compiled with debug assertions enabled. bool debug_assertions = 7; + /// Whether the app has embedded assets or not. + bool has_embedded_assets = 8; } \ No newline at end of file diff --git a/crates/wire/src/generated/rs.devtools.meta.rs b/crates/wire/src/generated/rs.devtools.meta.rs index e16351af..6dcdaadd 100644 --- a/crates/wire/src/generated/rs.devtools.meta.rs +++ b/crates/wire/src/generated/rs.devtools.meta.rs @@ -38,6 +38,9 @@ pub struct AppMetadata { /// / Whether the app was compiled with debug assertions enabled. #[prost(bool, tag = "7")] pub debug_assertions: bool, + /// / Whether the app has embedded assets or not. + #[prost(bool, tag = "8")] + pub has_embedded_assets: bool, } /// Generated server implementations. #[allow(clippy::all)] diff --git a/tauri-v1/devtools/src/server.rs b/tauri-v1/devtools/src/server.rs index 36f0115c..d6bb03f8 100644 --- a/tauri-v1/devtools/src/server.rs +++ b/tauri-v1/devtools/src/server.rs @@ -258,6 +258,7 @@ impl metadata_server::Metadata for MetaService { os: std::env::consts::OS.to_string(), arch: std::env::consts::ARCH.to_string(), debug_assertions: cfg!(debug_assertions), + has_embedded_assets: self.app_handle.asset_resolver().iter().count() == 0, }; Ok(Response::new(meta)) diff --git a/web-client/src/components/navigation.tsx b/web-client/src/components/navigation.tsx index c4921e30..2193e5cf 100644 --- a/web-client/src/components/navigation.tsx +++ b/web-client/src/components/navigation.tsx @@ -1,21 +1,26 @@ -import { For } from "solid-js"; +import { For, Show } from "solid-js"; import { A, useParams, useLocation } from "@solidjs/router"; import clsx from "clsx"; +import { useMonitor } from "~/context/monitor-provider"; const TABS = [ { + id: "console", url: (host: string, port: string) => `/app/dash/${host}/${port}/console`, title: "Console", }, { + id: "calls", url: (host: string, port: string) => `/app/dash/${host}/${port}/calls`, title: "Calls", }, { + id: "sources", url: (host: string, port: string) => `/app/dash/${host}/${port}/sources`, title: "Sources", }, { + id: "tauri", url: (host: string, port: string) => `/app/dash/${host}/${port}/tauri`, title: "Tauri", }, @@ -24,38 +29,49 @@ const TABS = [ export function Navigation() { const { host, port } = useParams(); const location = useLocation(); + const { monitorData } = useMonitor(); return (