Ui update #7
No files matched your search
+27
-28
@@ -120,30 +120,30 @@ export default function AdminPage() {
|
|||||||
|
|
||||||
<Card title="Neues Liederbuch">
|
<Card title="Neues Liederbuch">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
|
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
|
||||||
<Input.Text
|
<Input.Text
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="z.B. Gesangbuch"
|
placeholder="z.B. Gesangbuch"
|
||||||
value={newBookName}
|
value={newBookName}
|
||||||
onChange={(e) => setNewBookName(e.target.value)}
|
onChange={(e) => setNewBookName(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
|
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
|
||||||
<Input.Text
|
<Input.Text
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="z.B. Deutsch"
|
placeholder="z.B. Deutsch"
|
||||||
value={newBookLanguage}
|
value={newBookLanguage}
|
||||||
onChange={(e) => setNewBookLanguage(e.target.value)}
|
onChange={(e) => setNewBookLanguage(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<Input.Button
|
||||||
onClick={addSongbook}
|
onClick={addSongbook}
|
||||||
className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
|
className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
|
||||||
>
|
>
|
||||||
Liederbuch erstellen
|
Liederbuch erstellen
|
||||||
</button>
|
</Input.Button>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ export default function AdminPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button onClick={addSong} className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm">Lied speichern</button>
|
<Input.Button onClick={addSong} className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm">Lied speichern</Input.Button>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
@@ -214,12 +214,11 @@ export default function AdminPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-6 space-y-3">
|
<div className="mt-6 space-y-3">
|
||||||
<button
|
<Input.Button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
|
|
||||||
>
|
>
|
||||||
Hochladen & Verarbeiten
|
Hochladen & Verarbeiten
|
||||||
</button>
|
</Input.Button >
|
||||||
{uploadStatus && (
|
{uploadStatus && (
|
||||||
<p className="text-xs text-center font-medium px-3 py-2 rounded-md bg-black border border-neutral-800 text-blue-400">
|
<p className="text-xs text-center font-medium px-3 py-2 rounded-md bg-black border border-neutral-800 text-blue-400">
|
||||||
{uploadStatus}
|
{uploadStatus}
|
||||||
|
|||||||
+3
-3
@@ -138,12 +138,12 @@ export default function SenderPage() {
|
|||||||
{song.song_number}
|
{song.song_number}
|
||||||
</td>
|
</td>
|
||||||
<td className="p-3 text-right">
|
<td className="p-3 text-right">
|
||||||
<button
|
<Input.Button
|
||||||
onClick={() => sendID(String(song.song_id), String(song.songbook_id))}
|
onClick={() => sendID(String(song.song_id), String(song.songbook_id))}
|
||||||
className="bg-white dark:bg-black hover:bg-blue-600 dark:hover:bg-blue-600 border border-neutral-300 dark:border-neutral-700 hover:border-blue-600 dark:hover:border-blue-500 text-neutral-700 dark:text-neutral-200 hover:text-white font-medium rounded-md px-3 py-1.5 transition text-xs shadow-sm"
|
className="bg-white dark:bg-black hover:bg-blue-600 dark:hover:bg-blue-600 border border-neutral-300 dark:border-neutral-700 hover:border-blue-600 dark:hover:border-blue-500 hover:text-white font-medium rounded-md px-3 py-1.5 transition text-xs"
|
||||||
>
|
>
|
||||||
Anzeigen
|
Anzeigen
|
||||||
</button>
|
</Input.Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function Dropdown({ children, ...props }: ComponentPropsWithoutRef<"select">) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function File({ ...props }: ComponentPropsWithoutRef<"input">) {
|
function File({ ...props }: ComponentPropsWithoutRef<"input">) {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@@ -34,8 +34,21 @@ export function File({ ...props }: ComponentPropsWithoutRef<"input">) {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Button({ children, ...props }: ComponentPropsWithoutRef<"button">) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const Input = {
|
export const Input = {
|
||||||
Text: Textfield,
|
Text: Textfield,
|
||||||
Select: Dropdown,
|
Select: Dropdown,
|
||||||
File: File,
|
File: File,
|
||||||
|
Button: Button,
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user