Main #21

Merged
robin merged 37 commits from main into feat-dashboard 2026-07-29 10:48:35 +00:00
3 changed files with 7 additions and 4 deletions
Showing only changes of commit 1892314610 - Show all commits

No files matched your search

+2 -1
View File
@@ -231,8 +231,9 @@ export default function AdminPage() {
</Card> </Card>
</div> </div>
<Screens.Songs <Screens.Songs
actionName="Auswählen"
onSelectSong={(song) => console.log(song)} onSelectSong={(song) => console.log(song)}
className="w-[600px]" className="w-min"
/> />
</div> </div>
</div> </div>
+2 -1
View File
@@ -89,7 +89,8 @@ export default function SenderPage() {
}; };
return ( return (
<Screens.Songs <Screens.Songs
actionName="Anzeigen"
onSelectSong={(song) => sendID(String(song.song_id), String(song.songbook_id))} onSelectSong={(song) => sendID(String(song.song_id), String(song.songbook_id))}
/> />
); );
+3 -2
View File
@@ -5,6 +5,7 @@ import { Input } from "./FormElements"
interface SongsProps extends Omit<ComponentPropsWithoutRef<typeof Card>, "title" | "children"> { interface SongsProps extends Omit<ComponentPropsWithoutRef<typeof Card>, "title" | "children"> {
onSelectSong?: (song: Song) => void; onSelectSong?: (song: Song) => void;
actionName?: string;
} }
interface Song { interface Song {
@@ -20,7 +21,7 @@ interface Songbook {
language: string; language: string;
} }
function Songs({ onSelectSong, className = "", ...props }: SongsProps) { function Songs({ actionName, onSelectSong, className = "", ...props }: SongsProps) {
const [song_search_name, setSongSearchName] = useState(""); const [song_search_name, setSongSearchName] = useState("");
const [searchResults, setSearchResults] = useState<Song[]>([]); const [searchResults, setSearchResults] = useState<Song[]>([]);
const [allSongs, setAllSongs] = useState<Song[]>([]); const [allSongs, setAllSongs] = useState<Song[]>([]);
@@ -123,7 +124,7 @@ function Songs({ onSelectSong, className = "", ...props }: SongsProps) {
onClick={() => onSelectSong?.(song)} onClick={() => onSelectSong?.(song)}
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" 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 {actionName}
</Input.Button> </Input.Button>
</td> </td>
</tr> </tr>