Fuehre die Pflicht-Suite gegen eine Wegwerfdatenbank und lege Nutzer als Betreiber an.
Deploy Development / deploy (push) Failing after 40s
Deploy Development / deploy (push) Failing after 40s
Testdaten entstehen nur dort und werden danach entfernt, damit Dev und Produktion sie nicht behalten. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
528fc191e8
commit
4420790707
24 files changed
+1264
-26
No files matched your search
@@ -10,10 +10,16 @@ const NAV = [
|
||||
{ to: "/sources", label: "Quellen", icon: "sources" },
|
||||
];
|
||||
|
||||
function navItems(session) {
|
||||
if (!session?.account?.is_superadmin) return NAV;
|
||||
return [...NAV, { to: "/users", label: "Nutzer", icon: "users" }];
|
||||
}
|
||||
|
||||
export function Shell() {
|
||||
const { session, logout } = useContext(SessionContext);
|
||||
const navigate = useNavigate();
|
||||
const [query, setQuery] = useState("");
|
||||
const items = navItems(session);
|
||||
|
||||
function onSearch(event) {
|
||||
event.preventDefault();
|
||||
@@ -30,7 +36,7 @@ export function Shell() {
|
||||
<div className="desktop-sidebar__title">Tsumugu</div>
|
||||
</div>
|
||||
<nav className="desktop-sidebar__nav">
|
||||
{NAV.map((item) => (
|
||||
{items.map((item) => (
|
||||
<NavLink key={item.to} to={item.to} end={item.end} className={({ isActive }) => `desktop-sidebar__link${isActive ? " active" : ""}`}>
|
||||
<NavIcon name={item.icon} />
|
||||
<span>{item.label}</span>
|
||||
@@ -67,7 +73,7 @@ export function Shell() {
|
||||
<Outlet />
|
||||
</div>
|
||||
<nav className="bottom-nav" aria-label="Hauptnavigation">
|
||||
{NAV.map((item) => (
|
||||
{items.map((item) => (
|
||||
<NavLink key={item.to} to={item.to} end={item.end} className={({ isActive }) => `nav-item${isActive ? " active" : ""}`}>
|
||||
<NavIcon name={item.icon} />
|
||||
<span>{item.label}</span>
|
||||
@@ -93,6 +99,9 @@ function NavIcon({ name }) {
|
||||
if (name === "sources") {
|
||||
return <svg {...common}><path d="M4 7h16" /><path d="M4 12h10" /><path d="M4 17h16" /><path d="M18 10v4" /></svg>;
|
||||
}
|
||||
if (name === "users") {
|
||||
return <svg {...common}><circle cx="12" cy="8" r="3" /><path d="M5 19c1.2-2.4 3.4-3.5 7-3.5s5.8 1.1 7 3.5" /></svg>;
|
||||
}
|
||||
if (name === "logout") {
|
||||
return <svg {...common}><path d="M9 6H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h4" /><path d="M14 16l4-4-4-4" /><path d="M18 12H9" /></svg>;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user