Merge branch 'main' of https://github.com/VAR-Virtual-Air-Rescue/var-monorepo
This commit is contained in:
30
apps/dispatch/app/_components/navbar/ModeSwitchDropdown.tsx
Normal file
30
apps/dispatch/app/_components/navbar/ModeSwitchDropdown.tsx
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { ArrowLeftRight, Plane, Workflow } from "lucide-react";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
|
export default function ModeSwitchDropdown() {
|
||||||
|
const path = usePathname();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<details className="dropdown z-[9999]">
|
||||||
|
<summary className="btn m-1">
|
||||||
|
<ArrowLeftRight /> {path.includes("pilot") && "Pilot"}
|
||||||
|
{path.includes("dispatch") && "Leitstelle"}
|
||||||
|
</summary>
|
||||||
|
<ul className="menu dropdown-content bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm">
|
||||||
|
<li>
|
||||||
|
<Link href={"/dispatch"}>
|
||||||
|
<Workflow /> Leitstelle
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Link href={"/pilot"}>
|
||||||
|
<Plane /> Pilot
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -6,7 +6,8 @@ import { Audio } from "../../../_components/Audio";
|
|||||||
/* import { useState } from "react"; */
|
/* import { useState } from "react"; */
|
||||||
import { ExitIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
|
import { ExitIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Settings } from "_components/Settings";
|
import { Settings } from "_components/navbar/Settings";
|
||||||
|
import ModeSwitchDropdown from "_components/navbar/ModeSwitchDropdown";
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
/* const [isDark, setIsDark] = useState(false);
|
/* const [isDark, setIsDark] = useState(false);
|
||||||
@@ -22,10 +23,7 @@ export default function Navbar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="navbar bg-base-100 shadow-sm flex gap-5 justify-between">
|
<div className="navbar bg-base-100 shadow-sm flex gap-5 justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<ModeSwitchDropdown />
|
||||||
<a className="btn btn-ghost text-xl">VAR Leitstelle V2</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center gap-5">
|
<div className="flex items-center gap-5">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Audio />
|
<Audio />
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
--color-fms-9: rgb(10, 134, 25);
|
--color-fms-9: rgb(10, 134, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root:has(:is(.modal-open, .modal:target, .modal-toggle:checked + .modal, .modal[open])) {
|
||||||
|
scrollbar-gutter: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.leaflet-popup-tip-container {
|
.leaflet-popup-tip-container {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import { Audio } from "../../../_components/Audio";
|
|||||||
/* import { useState } from "react"; */
|
/* import { useState } from "react"; */
|
||||||
import { ExitIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
|
import { ExitIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Settings } from "_components/Settings";
|
import { Settings } from "_components/navbar/Settings";
|
||||||
|
import ModeSwitchDropdown from "_components/navbar/ModeSwitchDropdown";
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
/* const [isDark, setIsDark] = useState(false);
|
/* const [isDark, setIsDark] = useState(false);
|
||||||
@@ -22,10 +23,7 @@ export default function Navbar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="navbar bg-base-100 shadow-sm flex gap-5 justify-between">
|
<div className="navbar bg-base-100 shadow-sm flex gap-5 justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<ModeSwitchDropdown />
|
||||||
<a className="btn btn-ghost text-xl">VAR Leitstelle V2</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center gap-5">
|
<div className="flex items-center gap-5">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Audio />
|
<Audio />
|
||||||
|
|||||||
Reference in New Issue
Block a user