feat: hide performance menu item if disabled (#832)

Hide the Performance UI item of the navigation bar if its disabled.
This commit is contained in:
g2mt
2026-06-21 13:38:29 -07:00
committed by GitHub
parent eff9b60434
commit e37077a963
4 changed files with 34 additions and 12 deletions
+2 -1
View File
@@ -8,7 +8,7 @@
import Performance from "./routes/Performance.svelte";
import Playground from "./routes/Playground.svelte";
import PlaygroundStub from "./routes/PlaygroundStub.svelte";
import { enableAPIEvents } from "./stores/api";
import { enableAPIEvents, checkPerformanceEnabled } from "./stores/api";
import { initScreenWidth, initSystemThemeListener, isDarkMode, appTitle, connectionState } from "./stores/theme";
import { currentRoute } from "./stores/route";
@@ -39,6 +39,7 @@
const cleanupScreenWidth = initScreenWidth();
const cleanupSystemTheme = initSystemThemeListener();
enableAPIEvents(true);
checkPerformanceEnabled();
return () => {
cleanupScreenWidth();