kleine tweaks

This commit is contained in:
Daniel Nagel 2026-03-06 11:09:25 +00:00
parent 4da6c4c6be
commit 380f91957d
3 changed files with 8 additions and 7 deletions

View File

@ -1 +1 @@
{"authenticated":true,"discord_id":"277898241750859776","discord_name":"mrteels","db_id":2,"display_name":"Daniel Nagel","discord_avatar_url":"https://cdn.discordapp.com/avatars/277898241750859776/7c3446bb51fafd72b1b4c21124b4994f.png"} {"authenticated":true,"discord_id":"277898241750859776","discord_name":"mrteels","db_id":1,"display_name":"Daniel N.","discord_avatar_url":"https://cdn.discordapp.com/avatars/277898241750859776/7c3446bb51fafd72b1b4c21124b4994f.png"}

View File

@ -30,6 +30,7 @@ def init_db():
name TEXT NOT NULL, name TEXT NOT NULL,
picture TEXT, picture TEXT,
description TEXT, description TEXT,
active_players INTEGER DEFAULT 0,
min_score INTEGER DEFAULT 0, min_score INTEGER DEFAULT 0,
max_score INTEGER DEFAULT 100 max_score INTEGER DEFAULT 100
) )
@ -61,8 +62,8 @@ def init_db():
player2_id INTEGER, player2_id INTEGER,
score_player2 INTEGER, score_player2 INTEGER,
played_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, played_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
mmr_change_winner INTEGER, player1_mmr_change INTEGER,
mmr_change_looser INTEGER, player2_mmr_change INTEGER,
FOREIGN KEY (gamesystem_id) REFERENCES gamesystems (id), FOREIGN KEY (gamesystem_id) REFERENCES gamesystems (id),
FOREIGN KEY (player1_id) REFERENCES players (id), FOREIGN KEY (player1_id) REFERENCES players (id),
FOREIGN KEY (player2_id) REFERENCES players (id) FOREIGN KEY (player2_id) REFERENCES players (id)
@ -109,8 +110,8 @@ def seed_gamesystems():
cursor = connection.cursor() cursor = connection.cursor()
systems = [ systems = [
("Warhammer 40k", "/gui/pictures/wsdg.png", "Die Schlacht um die Galaxie in einer entfernten Zukunft.", 0, 100), ("Warhammer 40k", "/gui/pictures/wsdg.png", "Die Schlacht um die Galaxie in einer entfernten Zukunft.", 0, 100),
("Warhammer Age of Sigmar","/gui/pictures/wsdg.png","" , 0, 50), ("Warhammer Age of Sigmar", "/gui/pictures/wsdg.png", "Der ewige Krieg um die Reiche der Sterblichen in einer epischen Fantasy-Welt.", 0, 50),
("Spearhead","/gui/pictures/wsdg.png","" , 0, 50) ("Spearhead", "/gui/pictures/wsdg.png", "Schnelle und taktische Scharmützel für actiongeladene Kämpfe.", 0, 50)
] ]
# executemany ist eine extrem schnelle SQL For-Schleife für Inserts # executemany ist eine extrem schnelle SQL For-Schleife für Inserts

View File

@ -74,5 +74,5 @@ def setup_routes():
# Buttons ganz unten in einer Reihe # Buttons ganz unten in einer Reihe
with ui.row().classes("w-full items-center justify-between mt-8"): with ui.row().classes("w-full items-center justify-between mt-8"):
ui.button('Cancel', on_click=lambda: ui.navigate.to('/statistic/{systemname}')).classes('bg-gray-500 text-white') ui.button('Cancel', on_click=lambda: ui.navigate.to(f'/statistic/{systemname}')).classes('bg-gray-500 text-white')
ui.button(text="Absenden", color="positive", on_click=lambda: input_match_to_database()) ui.button(text="Absenden", color="positive", on_click=lambda: input_match_to_database())