Kleine UI Verbesserung auf der main seite.
This commit is contained in:
parent
21fa6773a3
commit
aaaf6d44e9
|
|
@ -132,9 +132,10 @@ def setup_routes(admin_discord_id):
|
|||
calc_match.calculate_match(m_id)
|
||||
|
||||
with ui.row().classes('w-full items-center justify-between bg-zinc-900 p-3 rounded shadow-inner'):
|
||||
# Info-Text: Was wurde eingetragen?
|
||||
info_text = f"[{match['system_name']}] {match['p1_name']} behauptet: Er hat {match['score_player1']} : {match['score_player2']} gegen dich gespielt."
|
||||
ui.label(info_text).classes('text-lg text-gray-200')
|
||||
info_text = f"{match['system_name']} - {match["played_at"]} "
|
||||
detail_text = f"{match['p1_name']} behauptet: {match['p1_name']} ({match['score_player1']}) vs. Du ({match['score_player2']})"
|
||||
ui.label(info_text).classes('text-bold text-lg text-normaltext')
|
||||
ui.label(detail_text).classes('text-bold text-normaltext')
|
||||
|
||||
# Die Buttons (Funktion machen wir im nächsten Schritt!)
|
||||
with ui.row().classes('gap-2'):
|
||||
|
|
@ -143,7 +144,7 @@ def setup_routes(admin_discord_id):
|
|||
ui.space()
|
||||
# BESTÄTIGEN und spiel berechnen lassen
|
||||
ui.button(color="positive", icon="check", on_click=lambda e, m_id=match['match_id']: acccept_match(m_id))
|
||||
|
||||
ui.label("Bestätigen wenn die Angaben stimmen, ablehnen wenn sich ein Fehler eingeschlichen hat.")
|
||||
|
||||
# ---------------------------
|
||||
# --- Selbst eingetragene, offene Spiele ---
|
||||
|
|
@ -152,7 +153,7 @@ def setup_routes(admin_discord_id):
|
|||
if len(submitted_matches) > 0:
|
||||
# Eine etwas dezentere Karte (grau)
|
||||
with ui.card().classes('w-full bg-zinc-800 border border-gray-600 mb-6'):
|
||||
ui.label(f"Warten auf Gegner: Du hast {len(submitted_matches)} offene(s) Spiel(e) eingetragen.").classes('text-xl font-bold text-gray-300 mb-2')
|
||||
ui.label(f"Warten auf Gegner: Du hast {len(submitted_matches)} offene(s) Spiel(e).").classes('text-xl font-bold text-gray-300 mb-2')
|
||||
|
||||
for match in submitted_matches:
|
||||
# Die Lösch-Funktion, die beim Klick ausgeführt wird
|
||||
|
|
@ -163,14 +164,13 @@ def setup_routes(admin_discord_id):
|
|||
|
||||
# Für jedes Match machen wir eine kleine Reihe
|
||||
with ui.row().classes('w-full items-center justify-between bg-zinc-900 p-3 rounded shadow-inner'):
|
||||
|
||||
# Info-Text: Auf wen warten wir?
|
||||
info_text = f"[{match['system_name']}] Warten auf Bestätigung von {match['p2_name']} ({match['score_player1']} : {match['score_player2']})"
|
||||
ui.label(info_text).classes('text-lg text-gray-400')
|
||||
|
||||
# Der Zurückziehen-Button (wieder mit unserem lambda m_id=... Trick!)
|
||||
ui.button("Zurückziehen", color="warning", icon="delete", on_click=lambda e, m_id=match['match_id']: retract_match(m_id))
|
||||
|
||||
info_text = f"{match['system_name']} - {match["played_at"]} "
|
||||
detail_text = f"Du ({match["score_player1"]}) vs. {match["p2_name"]}({match["score_player2"]})"
|
||||
ui.label(info_text).classes('text-bold text-lg text-normaltext')
|
||||
ui.label(detail_text).classes('text-bold text-normaltext')
|
||||
ui.button(color="warning", icon="delete", on_click=lambda e, m_id=match['match_id']: retract_match(m_id))
|
||||
ui.label("Dein Gegner muss das Match noch bestätigen. Wenn du einen Fehler gemacht hast, kannst du es löschen.")
|
||||
|
||||
# ---------------------------
|
||||
# --- Spielsysteme ---
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user