mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 12:15:25 +03:00
a few style updates to better match figma
This commit is contained in:
parent
184196eab3
commit
1f24046993
@ -6,7 +6,7 @@ type ChipProps = {
|
|||||||
};
|
};
|
||||||
export default function Chip({ className, children }: ChipProps) {
|
export default function Chip({ className, children }: ChipProps) {
|
||||||
return (
|
return (
|
||||||
<div className={`flex p-1 rounded-lg items-center ${className}`}>
|
<div className={`flex px-2 py-1.5 rounded-2xl items-center ${className}`}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -57,36 +57,13 @@ import ActivityIndicator from "./ui/activity-indicator";
|
|||||||
import { useRestart } from "@/api/ws";
|
import { useRestart } from "@/api/ws";
|
||||||
import { ENV } from "@/env";
|
import { ENV } from "@/env";
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
|
import { navbarLinks } from "@/pages/site-navigation";
|
||||||
|
|
||||||
type HeaderProps = {
|
type HeaderProps = {
|
||||||
onToggleNavbar: () => void;
|
onToggleNavbar: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
function HeaderNavigation() {
|
function HeaderNavigation() {
|
||||||
const navbarLinks = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: "Live",
|
|
||||||
url: "/",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: "History",
|
|
||||||
url: "/history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: "Export",
|
|
||||||
url: "/export",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
title: "UI Playground",
|
|
||||||
url: "/playground",
|
|
||||||
dev: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="hidden md:flex">
|
<div className="hidden md:flex">
|
||||||
{navbarLinks.map((item) => {
|
{navbarLinks.map((item) => {
|
||||||
@ -97,7 +74,7 @@ function HeaderNavigation() {
|
|||||||
key={item.id}
|
key={item.id}
|
||||||
to={item.url}
|
to={item.url}
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
`py-4 px-2 flex flex-row items-center text-center rounded-lg gap-2 hover:bg-border ${
|
`my-2 py-3 px-4 text-muted-foreground flex flex-row items-center text-center rounded-lg gap-2 hover:bg-border ${
|
||||||
isActive ? "font-bold bg-popover text-popover-foreground" : ""
|
isActive ? "font-bold bg-popover text-popover-foreground" : ""
|
||||||
}`
|
}`
|
||||||
}
|
}
|
||||||
@ -145,7 +122,7 @@ function Header({ onToggleNavbar }: HeaderProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-10 lg:gap-20 justify-between pt-2 mb-2 border-b-[1px] px-4 items-center">
|
<div className="flex gap-10 lg:gap-20 justify-between pt-2 mb-2 border-b-[1px] px-4 items-center">
|
||||||
<div className="flex gap-4 items-center flex-shrink-0 m-5">
|
<div className="flex gap-4 items-center flex-shrink-0 m-1">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
|
|||||||
@ -1,49 +1,9 @@
|
|||||||
import { IconType } from "react-icons";
|
import { IconType } from "react-icons";
|
||||||
import {
|
|
||||||
LuConstruction,
|
|
||||||
LuFileUp,
|
|
||||||
LuFilm,
|
|
||||||
LuLayoutDashboard,
|
|
||||||
LuVideo,
|
|
||||||
} from "react-icons/lu";
|
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
import { Sheet, SheetContent } from "@/components/ui/sheet";
|
import { Sheet, SheetContent } from "@/components/ui/sheet";
|
||||||
import Logo from "./Logo";
|
import Logo from "./Logo";
|
||||||
import { ENV } from "@/env";
|
import { ENV } from "@/env";
|
||||||
|
import { navbarLinks } from "@/pages/site-navigation";
|
||||||
const navbarLinks = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
icon: LuLayoutDashboard,
|
|
||||||
title: "Dashboard",
|
|
||||||
url: "/",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
icon: LuVideo,
|
|
||||||
title: "Live",
|
|
||||||
url: "/live",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
icon: LuFilm,
|
|
||||||
title: "History",
|
|
||||||
url: "/history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
icon: LuFileUp,
|
|
||||||
title: "Export",
|
|
||||||
url: "/export",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5,
|
|
||||||
icon: LuConstruction,
|
|
||||||
title: "UI Playground",
|
|
||||||
url: "/playground",
|
|
||||||
dev: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
function Sidebar({
|
function Sidebar({
|
||||||
sheetOpen,
|
sheetOpen,
|
||||||
|
|||||||
@ -16,7 +16,8 @@ const buttonVariants = cva(
|
|||||||
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
||||||
secondary:
|
secondary:
|
||||||
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
||||||
ghost: "hover:bg-accent hover:text-accent-foreground",
|
ghost:
|
||||||
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
||||||
link: "text-primary underline-offset-4 hover:underline",
|
link: "text-primary underline-offset-4 hover:underline",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
|
|||||||
34
web/src/pages/site-navigation.ts
Normal file
34
web/src/pages/site-navigation.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import {
|
||||||
|
LuConstruction,
|
||||||
|
LuFileUp,
|
||||||
|
LuFilm,
|
||||||
|
LuVideo,
|
||||||
|
} from "react-icons/lu";
|
||||||
|
|
||||||
|
export const navbarLinks = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
icon: LuVideo,
|
||||||
|
title: "Live",
|
||||||
|
url: "/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
icon: LuFilm,
|
||||||
|
title: "History",
|
||||||
|
url: "/history",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
icon: LuFileUp,
|
||||||
|
title: "Export",
|
||||||
|
url: "/export",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
icon: LuConstruction,
|
||||||
|
title: "UI Playground",
|
||||||
|
url: "/playground",
|
||||||
|
dev: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
Loading…
Reference in New Issue
Block a user