From 39287d4460e196fadfd83f7000a89386a419f4ef Mon Sep 17 00:00:00 2001 From: Anton Ulyanov Date: Tue, 5 Mar 2024 12:39:31 +0300 Subject: [PATCH] StatsHouse UI: hard dash --- statshouse-ui/src/common/settings.ts | 2 ++ statshouse-ui/src/components/HeaderMenu/HeaderMenu.tsx | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/statshouse-ui/src/common/settings.ts b/statshouse-ui/src/common/settings.ts index f09117e84..d3221bc94 100644 --- a/statshouse-ui/src/common/settings.ts +++ b/statshouse-ui/src/common/settings.ts @@ -21,6 +21,7 @@ export interface settings { readonly skip_error_count: number; readonly event_preset: string[]; readonly links: { name: string; url: string }[]; + readonly admin_dash?: number | null; } const defaultSettings: settings = { @@ -36,6 +37,7 @@ const defaultSettings: settings = { skip_error_count: 10, event_preset: [], links: [], + admin_dash: null, }; const meta = document.querySelector('meta[name="settings"]'); diff --git a/statshouse-ui/src/components/HeaderMenu/HeaderMenu.tsx b/statshouse-ui/src/components/HeaderMenu/HeaderMenu.tsx index 3f9a17eec..8cf775a1c 100644 --- a/statshouse-ui/src/components/HeaderMenu/HeaderMenu.tsx +++ b/statshouse-ui/src/components/HeaderMenu/HeaderMenu.tsx @@ -10,6 +10,7 @@ import { ReactComponent as SVGLightning } from 'bootstrap-icons/icons/lightning. import { ReactComponent as SVGGridFill } from 'bootstrap-icons/icons/grid-fill.svg'; import { ReactComponent as SVGPlus } from 'bootstrap-icons/icons/plus.svg'; import { ReactComponent as SVGCardList } from 'bootstrap-icons/icons/card-list.svg'; +import { ReactComponent as SVGCpu } from 'bootstrap-icons/icons/cpu.svg'; import { ReactComponent as SVGBrightnessHighFill } from 'bootstrap-icons/icons/brightness-high-fill.svg'; import { ReactComponent as SVGMoonStarsFill } from 'bootstrap-icons/icons/moon-stars-fill.svg'; import { ReactComponent as SVGCircleHalf } from 'bootstrap-icons/icons/circle-half.svg'; @@ -246,6 +247,14 @@ export const HeaderMenu: React.FC = ({ className }) => { )} + {!!globalSettings.admin_dash && ( + + )}