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 24 additions and 10 deletions
Showing only changes of commit b97e5ea7bb - Show all commits

No files matched your search

+5 -8
View File
@@ -4,6 +4,7 @@ import { uploadCSVAction } from "./actions";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import Card from "@/components/Card" import Card from "@/components/Card"
import Textfield from "@/components/Textfield";
interface Songbook { interface Songbook {
id: number; id: number;
@@ -121,20 +122,18 @@ export default function AdminPage() {
<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 <Textfield
type="text" type="text"
placeholder="z.B. Gesangbuch" placeholder="z.B. Gesangbuch"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
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 <Textfield
type="text" type="text"
placeholder="z.B. Deutsch" placeholder="z.B. Deutsch"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={newBookLanguage} value={newBookLanguage}
onChange={(e) => setNewBookLanguage(e.target.value)} onChange={(e) => setNewBookLanguage(e.target.value)}
/> />
@@ -168,20 +167,18 @@ export default function AdminPage() {
<div className="grid grid-cols-3 gap-2"> <div className="grid grid-cols-3 gap-2">
<div className="col-span-1"> <div className="col-span-1">
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Nummer</label> <label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Nummer</label>
<input <Textfield
type="text" type="text"
placeholder="12a" placeholder="12a"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={number} value={number}
onChange={(e) => setNumber(e.target.value)} onChange={(e) => setNumber(e.target.value)}
/> />
</div> </div>
<div className="col-span-2"> <div className="col-span-2">
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Liedtitel</label> <label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Liedtitel</label>
<input <Textfield
type="text" type="text"
placeholder="Großer Gott, wir..." placeholder="Großer Gott, wir..."
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={title} value={title}
onChange={(e) => setTitle(e.target.value)} onChange={(e) => setTitle(e.target.value)}
/> />
+3 -2
View File
@@ -2,6 +2,8 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import Textfield from "@/components/Textfield";
interface Songbook { interface Songbook {
id: number; id: number;
name: string; name: string;
@@ -94,10 +96,9 @@ export default function SenderPage() {
</h2> </h2>
<div className="mb-4"> <div className="mb-4">
<input <Textfield
type="text" type="text"
placeholder="Nach Songtitel oder Nummer suchen..." placeholder="Nach Songtitel oder Nummer suchen..."
className="w-full border border-neutral-700 rounded-lg px-4 py-2.5 placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={song_search_name} value={song_search_name}
onChange={(e) => search(e.target.value)} onChange={(e) => search(e.target.value)}
/> />
+16
View File
@@ -0,0 +1,16 @@
import { ChangeEvent, ReactNode } from "react";
import { ComponentPropsWithoutRef } from "react";
interface TextfieldProps extends ComponentPropsWithoutRef<"input"> {}
export default function Textfield({value, onChange, placeholder}: TextfieldProps) {
return (
<input
type="text"
placeholder="Nach Songtitel oder Nummer suchen..."
className="w-full border border-neutral-700 rounded-lg px-4 py-2.5 placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={value}
onChange={onChange}
/>
)
}