Customize title bar (#1184)

* add basic title bar

* add title bar actions

* fix layout

* update title bar

* update layout

* fix title bar for macOS

* UI

* setup menu for macOS

* fix title bar logo
This commit is contained in:
an-lee
2024-11-17 16:02:17 +08:00
committed by GitHub
parent b8167a99d8
commit 8bebf2072c
27 changed files with 771 additions and 277 deletions

View File

@@ -0,0 +1,19 @@
import { Navigate } from "react-router-dom";
import { AppSettingsProviderContext } from "../context";
import { useContext } from "react";
export const ProtectedPage = ({
children,
redirectPath = "/landing",
}: {
children: React.ReactNode;
redirectPath?: string;
}) => {
const { initialized } = useContext(AppSettingsProviderContext);
if (!initialized) {
return <Navigate to={redirectPath} replace />;
}
return children;
};