feat: implement admin login form localization, add import functionality, and enhance file handling
This commit is contained in:
@@ -1,47 +1,55 @@
|
||||
import React from "react";
|
||||
import { Sheet, WholeWord } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import ImportGUI from "./ImportGUI";
|
||||
|
||||
// Sub navigation bar for admin views: provides import + clear selection actions
|
||||
const SubHeaderAdmin: React.FC = () => {
|
||||
const [showImport, setShowImport] = useState(false);
|
||||
|
||||
return (
|
||||
<header className="sticky top-0 z-30 w-full border-b border-gray-200/70 bg-white/90 backdrop-blur supports-[backdrop-filter]:bg-white/60">
|
||||
<div className="mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-2.5 md:px-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<h2 className="text-base font-semibold tracking-tight text-gray-800 sm:text-lg">
|
||||
Verwaltung
|
||||
</h2>
|
||||
<span
|
||||
className="hidden h-5 w-px bg-gray-300 sm:inline-block"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<p className="hidden text-sm text-gray-500 md:block">
|
||||
Aktionen für Daten in der Datenbank
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex items-center gap-2 rounded-md border border-gray-300 bg-white px-3.5 py-2 text-sm font-medium text-gray-700 shadow-sm transition hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/60 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
>
|
||||
<Sheet
|
||||
className="h-4 w-4 shrink-0 text-gray-500 transition group-hover:text-gray-600"
|
||||
strokeWidth={1.75}
|
||||
<>
|
||||
<header className="sticky top-0 z-30 w-full border-b border-gray-200/70 bg-white/90 backdrop-blur supports-[backdrop-filter]:bg-white/60">
|
||||
<div className="mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-2.5 md:px-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<h2 className="text-base font-semibold tracking-tight text-gray-800 sm:text-lg">
|
||||
Verwaltung
|
||||
</h2>
|
||||
<span
|
||||
className="hidden h-5 w-px bg-gray-300 sm:inline-block"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span className="whitespace-nowrap">Losnummern importieren</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex items-center gap-2 rounded-md bg-rose-600 px-3.5 py-2 text-sm font-medium text-white shadow-sm transition hover:bg-rose-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-rose-500/60 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
|
||||
>
|
||||
<WholeWord
|
||||
className="h-4 w-4 shrink-0 text-white/90 transition group-hover:text-white"
|
||||
strokeWidth={1.75}
|
||||
/>
|
||||
<span className="whitespace-nowrap">Auswahl löschen</span>
|
||||
</button>
|
||||
<p className="hidden text-sm text-gray-500 md:block">
|
||||
Aktionen für Daten in der Datenbank
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() => setShowImport(true)}
|
||||
type="button"
|
||||
className="group inline-flex items-center gap-2 rounded-md border border-gray-300 bg-white px-3.5 py-2 text-sm font-medium text-gray-700 shadow-sm transition hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/60 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
>
|
||||
<Sheet
|
||||
className="h-4 w-4 shrink-0 text-gray-500 transition group-hover:text-gray-600"
|
||||
strokeWidth={1.75}
|
||||
/>
|
||||
<span className="whitespace-nowrap">Losnummern importieren</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex items-center gap-2 rounded-md bg-rose-600 px-3.5 py-2 text-sm font-medium text-white shadow-sm transition hover:bg-rose-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-rose-500/60 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
|
||||
>
|
||||
<WholeWord
|
||||
className="h-4 w-4 shrink-0 text-white/90 transition group-hover:text-white"
|
||||
strokeWidth={1.75}
|
||||
/>
|
||||
<span className="whitespace-nowrap">Auswahl löschen</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
{showImport && <ImportGUI onClose={() => setShowImport(false)} />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user