Ui update #7

Merged
robin merged 13 commits from ui-update into main 2026-07-25 17:51:19 +00:00
3 changed files with 44 additions and 32 deletions
Showing only changes of commit ccf36197fe - Show all commits

No files matched your search

+27 -28
View File
@@ -120,30 +120,30 @@ export default function AdminPage() {
<Card title="Neues Liederbuch">
<div className="space-y-4">
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
<Input.Text
type="text"
placeholder="z.B. Gesangbuch"
value={newBookName}
onChange={(e) => setNewBookName(e.target.value)}
/>
</div>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
<Input.Text
type="text"
placeholder="z.B. Deutsch"
value={newBookLanguage}
onChange={(e) => setNewBookLanguage(e.target.value)}
/>
</div>
<button
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"
>
Liederbuch erstellen
</button>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
<Input.Text
type="text"
placeholder="z.B. Gesangbuch"
value={newBookName}
onChange={(e) => setNewBookName(e.target.value)}
/>
</div>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
<Input.Text
type="text"
placeholder="z.B. Deutsch"
value={newBookLanguage}
onChange={(e) => setNewBookLanguage(e.target.value)}
/>
</div>
<Input.Button
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"
>
Liederbuch erstellen
</Input.Button>
</div>
</Card>
@@ -183,7 +183,7 @@ export default function AdminPage() {
/>
</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>
</Card>
@@ -214,12 +214,11 @@ export default function AdminPage() {
/>
</div>
<div className="mt-6 space-y-3">
<button
<Input.Button
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
</button>
</Input.Button >
{uploadStatus && (
<p className="text-xs text-center font-medium px-3 py-2 rounded-md bg-black border border-neutral-800 text-blue-400">
{uploadStatus}
+3 -3
View File
@@ -138,12 +138,12 @@ export default function SenderPage() {
{song.song_number}
</td>
<td className="p-3 text-right">
<button
<Input.Button
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
</button>
</Input.Button>
</td>
</tr>
);
+14 -1
View File
@@ -25,7 +25,7 @@ function Dropdown({ children, ...props }: ComponentPropsWithoutRef<"select">) {
);
}
export function File({ ...props }: ComponentPropsWithoutRef<"input">) {
function File({ ...props }: ComponentPropsWithoutRef<"input">) {
return (
<input
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 = {
Text: Textfield,
Select: Dropdown,
File: File,
Button: Button,
};