Dashboard Design and Buttons
This commit is contained in:
parent
c923789d0b
commit
9062d39a17
|
|
@ -21,18 +21,18 @@ def setup_routes():
|
|||
|
||||
def home_page():
|
||||
ui.dark_mode(True)
|
||||
with ui.card().classes('w-full items-center mt-10'):
|
||||
ui.label('Warhammer League').classes('text-2xl font-bold')
|
||||
|
||||
with ui.card().classes('w-full items-center mt-10'):
|
||||
# --- LOGIN BEREICH ---
|
||||
if app.storage.user.get('authenticated', False):
|
||||
discord_name = app.storage.user.get('discord_name')
|
||||
db_id = app.storage.user.get('db_id')
|
||||
|
||||
ui.label(f'Welcome back, {discord_name}!').classes('text-green-500 font-bold')
|
||||
|
||||
ui.button('Enter Match', on_click=lambda: ui.navigate.to('/add-match')).classes('mt-4 bg-blue-500 text-white')
|
||||
|
||||
|
||||
|
||||
def logout():
|
||||
app.storage.user.clear()
|
||||
ui.navigate.to('/')
|
||||
|
|
@ -41,7 +41,26 @@ def setup_routes():
|
|||
else:
|
||||
ui.button('Login with Discord', on_click=lambda: ui.navigate.to(discord_auth_url))
|
||||
|
||||
if app.storage.user.get('authenticated', False):
|
||||
with ui.card().classes("w-full"):
|
||||
# 1. Die Row muss wissen, dass sie die volle Breite nutzen darf (w-full)
|
||||
# und wir geben ihr einen kleinen Abstand zwischen den Karten (gap-4)
|
||||
with ui.row().classes("w-full h-30 gap-4 items-center"):
|
||||
|
||||
with ui.card().classes("flex-1 h-full items-center"):
|
||||
ui.label(text="40k")
|
||||
|
||||
with ui.card().classes("flex-1 h-full items-center"):
|
||||
ui.label(text="AoS")
|
||||
|
||||
with ui.card().classes("flex-1 h-full items-center"):
|
||||
ui.label(text="Spearhead")
|
||||
|
||||
|
||||
|
||||
|
||||
# --- LEADERBOARD BEREICH ---
|
||||
if app.storage.user.get('authenticated', False):
|
||||
with ui.card().classes('w-full items-center mt-6'):
|
||||
ui.label('Leaderboard').classes('text-xl font-bold mb-4')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user