Bug fix for mainscreen update and higher version of app to 1.0.2

This commit is contained in:
2026-04-13 11:30:42 +02:00
parent 024ab24ceb
commit d0a468b740
6 changed files with 25 additions and 25 deletions
+12 -8
View File
@@ -8,14 +8,18 @@ import os
import glob import glob
from datetime import datetime from datetime import datetime
# Base directory anchored to this file's location (project root), so paths work
# regardless of the current working directory when the app is launched.
_BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# File paths - organized in data directory # File paths - organized in data directory
SETTINGS_FILE = 'data/camera_settings.json' SETTINGS_FILE = os.path.join(_BASE_DIR, 'data', 'camera_settings.json')
PLAYERS_FILE = 'data/players.json' PLAYERS_FILE = os.path.join(_BASE_DIR, 'data', 'players.json')
TOURNAMENT_FILE = 'data/tournament_state.json' TOURNAMENT_FILE = os.path.join(_BASE_DIR, 'data', 'tournament_state.json')
RESULTS_FILE = 'data/tournament_results.json' RESULTS_FILE = os.path.join(_BASE_DIR, 'data', 'tournament_results.json')
LEAGUE_FILE = 'data/league_state.json' LEAGUE_FILE = os.path.join(_BASE_DIR, 'data', 'league_state.json')
ARCHIVE_DIR = 'data/tournament_archives' ARCHIVE_DIR = os.path.join(_BASE_DIR, 'data', 'tournament_archives')
LEAGUE_ARCHIVE_DIR = 'data/league_archives' LEAGUE_ARCHIVE_DIR = os.path.join(_BASE_DIR, 'data', 'league_archives')
# Default settings # Default settings
DEFAULT_SETTINGS = { DEFAULT_SETTINGS = {
@@ -40,7 +44,7 @@ class FileStorage:
@staticmethod @staticmethod
def _ensure_directory(directory): def _ensure_directory(directory):
"""Ensure directory exists""" """Ensure directory exists"""
if not os.path.exists(directory): if directory and not os.path.exists(directory):
os.makedirs(directory) os.makedirs(directory)
@staticmethod @staticmethod
+6 -6
View File
@@ -25,7 +25,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0px; padding: 0px;
gap: 15px; gap: 0px;
} }
.tournament-header { .tournament-header {
@@ -34,7 +34,7 @@
box-shadow: 0 2px 8px rgba(0,0,0,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.08);
padding: 10px 16px; padding: 10px 16px;
flex-shrink: 0; flex-shrink: 0;
margin: 10px 15px 5px 15px; margin: 8px 15px 0px 15px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
@@ -99,15 +99,15 @@
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 8px;
min-height: 0; min-height: 0;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
padding: 15px; padding: 10px;
background: white; background: white;
border-radius: 12px; border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin: 5px 15px 15px 15px; margin: 8px 15px 8px 15px;
} }
/* Custom scrollbar styling */ /* Custom scrollbar styling */
@@ -234,7 +234,7 @@
background: white; background: white;
border: 2px solid #9ca3af; border: 2px solid #9ca3af;
border-radius: 10px; border-radius: 10px;
overflow: visible; overflow: hidden;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
transition: all 0.3s ease; transition: all 0.3s ease;
+1 -1
View File
@@ -772,7 +772,7 @@
<!-- Version Information --> <!-- Version Information -->
<div class="version-info" style="margin-top: 30px; padding: 15px; text-align: center; border-top: 1px solid #e9ecef; color: #6c757d; font-size: 0.85rem;"> <div class="version-info" style="margin-top: 30px; padding: 15px; text-align: center; border-top: 1px solid #e9ecef; color: #6c757d; font-size: 0.85rem;">
Version 1.0.1 Version 1.0.2
</div> </div>
</div> </div>
</div> </div>
+3 -3
View File
@@ -47,9 +47,9 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: stretch; align-items: stretch;
padding: 12px 16px; padding: 8px;
box-sizing: border-box; box-sizing: border-box;
gap: 12px; gap: 8px;
min-height: 0; min-height: 0;
} }
@@ -69,7 +69,7 @@
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 8px;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
} }
+1 -2
View File
@@ -28,8 +28,7 @@
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 16px !important; padding: 8px !important;
padding-bottom: 16px !important;
} }
/* Specific tournament styles */ /* Specific tournament styles */
+2 -5
View File
@@ -20,7 +20,8 @@ from app.utils import (
from app.storage import ( from app.storage import (
SettingsStorage, PlayerStorage, TournamentStorage, SettingsStorage, PlayerStorage, TournamentStorage,
ResultsStorage, LeagueStorage, ArchiveStorage, ResultsStorage, LeagueStorage, ArchiveStorage,
TOURNAMENT_FILE, RESULTS_FILE, LEAGUE_FILE TOURNAMENT_FILE, RESULTS_FILE, LEAGUE_FILE,
ARCHIVE_DIR, LEAGUE_ARCHIVE_DIR
) )
from app.models import Tournament, Scoring, RoundManager from app.models import Tournament, Scoring, RoundManager
@@ -44,10 +45,6 @@ STREAMS = [
SUPPORTED_LANGUAGES = ['sl', 'en'] SUPPORTED_LANGUAGES = ['sl', 'en']
DEFAULT_LANGUAGE = 'sl' DEFAULT_LANGUAGE = 'sl'
# Data file paths (organized in data directory)
ARCHIVE_DIR = 'data/tournament_archives'
LEAGUE_ARCHIVE_DIR = 'data/league_archives'
# Convenience function wrappers that delegate to storage classes # Convenience function wrappers that delegate to storage classes
def load_settings(): def load_settings():
return SettingsStorage.load_settings() return SettingsStorage.load_settings()