mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
admin header: added links to docs and version
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { SegmentedControl, Tooltip } from "@mantine/core";
|
import { SegmentedControl, Tooltip } from "@mantine/core";
|
||||||
import { IconApi, IconKeyOff, IconSettings, IconUser } from "@tabler/icons-react";
|
import { IconApi, IconBook, IconKeyOff, IconSettings, IconUser } from "@tabler/icons-react";
|
||||||
import {
|
import {
|
||||||
TbDatabase,
|
TbDatabase,
|
||||||
TbFingerprint,
|
TbFingerprint,
|
||||||
@@ -24,6 +24,7 @@ import { useLocation } from "wouter";
|
|||||||
import { NavLink } from "./AppShell";
|
import { NavLink } from "./AppShell";
|
||||||
import { autoFormatString } from "core/utils";
|
import { autoFormatString } from "core/utils";
|
||||||
import { appShellStore } from "ui/store";
|
import { appShellStore } from "ui/store";
|
||||||
|
import { getVersion } from "core/env";
|
||||||
|
|
||||||
export function HeaderNavigation() {
|
export function HeaderNavigation() {
|
||||||
const [location, navigate] = useLocation();
|
const [location, navigate] = useLocation();
|
||||||
@@ -164,6 +165,11 @@ function UserMenu() {
|
|||||||
onClick: () => window.open("/api/system/swagger", "_blank"),
|
onClick: () => window.open("/api/system/swagger", "_blank"),
|
||||||
icon: IconApi,
|
icon: IconApi,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Docs",
|
||||||
|
onClick: () => window.open("https://docs.bknd.io", "_blank"),
|
||||||
|
icon: IconBook,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (config.auth.enabled) {
|
if (config.auth.enabled) {
|
||||||
@@ -182,6 +188,11 @@ function UserMenu() {
|
|||||||
if (!options.theme) {
|
if (!options.theme) {
|
||||||
items.push(() => <UserMenuThemeToggler />);
|
items.push(() => <UserMenuThemeToggler />);
|
||||||
}
|
}
|
||||||
|
items.push(() => (
|
||||||
|
<div className="font-mono leading-none text-xs text-primary/50 text-center pb-1 pt-2 mt-1 border-t border-primary/5">
|
||||||
|
{getVersion()}
|
||||||
|
</div>
|
||||||
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user