mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-13 18:29:07 +02:00
* desktop UI light mode * Theme review fixes plus macOS window outline fix * Windows runtime chrome re-theming plus apply serialization * Windows chrome threading and theme event ordering fixes * Darken toggle and setting sidebar text * resolve theme appearance, apply on UI thread * read theme once per window * Re-assert Windows dark opt-in after SetTheme * split app-wide GTK theming from per-window chrome * Update Wails dependency and checksums * KDE tray icon panel fix * Five review fixes: theme ordering, cgo dedup, KDE panel resolution * Path guard hardening, toggle contrast, windows comment * non-vacuous escape tests * Default view edits * Polish settings nav, controls, borders, and disc * Profiles settings boarder, modals, and buttons * Additional edits based on feedback * Switch colors away from slight blue hue * Update missing lang * Fix vertical tab active view
74 lines
3.2 KiB
TypeScript
74 lines
3.2 KiB
TypeScript
import React from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
import "./globals.css";
|
|
import { HashRouter, Navigate, Route, Routes } from "react-router-dom";
|
|
import SessionExpirationDialog from "@/modules/session/SessionExpirationDialog.tsx";
|
|
import UpdateInProgressDialog from "@/modules/auto-update/UpdateInProgressDialog.tsx";
|
|
import WelcomeDialog from "@/modules/welcome/WelcomeDialog.tsx";
|
|
import ErrorDialog from "@/modules/error/ErrorDialog.tsx";
|
|
import { AppLayout } from "@/layouts/AppLayout.tsx";
|
|
import { MainPage } from "@/modules/main/MainPage.tsx";
|
|
import { SettingsPage } from "@/modules/settings/SettingsPage.tsx";
|
|
import { SkeletonTheme } from "react-loading-skeleton";
|
|
import "react-loading-skeleton/dist/skeleton.css";
|
|
import { welcome } from "@/lib/welcome";
|
|
import LoginWaitingForBrowserDialog from "@/modules/login/LoginWaitingForBrowserDialog.tsx";
|
|
import { ThemeProvider } from "@/contexts/ThemeContext.tsx";
|
|
import { initI18n } from "@/lib/i18n";
|
|
import { initPlatform } from "@/lib/platform";
|
|
import { initLogForwarding } from "@/lib/logs";
|
|
import { initStallWatch } from "@/lib/stallwatch";
|
|
|
|
// Must run first so even init-time logs reach the Go log pipeline.
|
|
initLogForwarding();
|
|
|
|
initStallWatch();
|
|
|
|
welcome();
|
|
|
|
Promise.all([
|
|
initI18n().catch((e) => {
|
|
console.error("i18n init failed:", e);
|
|
}),
|
|
initPlatform().catch((e) => {
|
|
console.error("platform init failed:", e);
|
|
}),
|
|
]).finally(() => {
|
|
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
<React.StrictMode>
|
|
<ThemeProvider>
|
|
<SkeletonTheme
|
|
baseColor={"rgb(var(--skeleton-base))"}
|
|
highlightColor={"rgb(var(--skeleton-highlight))"}
|
|
>
|
|
<HashRouter>
|
|
<Routes>
|
|
<Route path={"dialog"}>
|
|
<Route
|
|
path={"browser-login"}
|
|
element={<LoginWaitingForBrowserDialog />}
|
|
/>
|
|
<Route
|
|
path={"install-progress"}
|
|
element={<UpdateInProgressDialog />}
|
|
/>
|
|
<Route
|
|
path={"session-expiration"}
|
|
element={<SessionExpirationDialog />}
|
|
/>
|
|
<Route path={"welcome"} element={<WelcomeDialog />} />
|
|
<Route path={"error"} element={<ErrorDialog />} />
|
|
</Route>
|
|
<Route element={<AppLayout />}>
|
|
<Route index element={<MainPage />} />
|
|
<Route path={"settings"} element={<SettingsPage />} />
|
|
<Route path={"*"} element={<Navigate to={"/"} replace />} />
|
|
</Route>
|
|
</Routes>
|
|
</HashRouter>
|
|
</SkeletonTheme>
|
|
</ThemeProvider>
|
|
</React.StrictMode>,
|
|
);
|
|
});
|