fletchtime 0.3.3__tar.gz → 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fletchtime-0.3.3/src/fletchtime.egg-info → fletchtime-0.3.5}/PKG-INFO +1 -1
- fletchtime-0.3.5/docs/_templates/page.html +21 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/conf.py +5 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/_version.py +3 -3
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/gui.py +43 -32
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/server/config_store.py +9 -1
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/index.html +1 -1
- {fletchtime-0.3.3 → fletchtime-0.3.5/src/fletchtime.egg-info}/PKG-INFO +1 -1
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/SOURCES.txt +1 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/scm_file_list.json +1 -0
- fletchtime-0.3.5/src/fletchtime.egg-info/scm_version.json +8 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_config_store.py +25 -0
- fletchtime-0.3.3/src/fletchtime.egg-info/scm_version.json +0 -8
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/workflows/build.yml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/workflows/docs.yml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.github/workflows/test.yml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/.gitignore +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/CLAUDE.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/CODE_OF_CONDUCT.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/CONTRIBUTING.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/LICENSE +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/README.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/REMERCIEMENTS.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/SECURITY.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/config/app.toml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/config/flint.toml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/config/indoor.toml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/demo.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/_static/logo.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/api-reference.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/architecture.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/dev-guide/index.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/index.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/premier-club.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/remerciements.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/requirements.txt +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/roadmap.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/specifications.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/docs/user-guide/index.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/fletchtime.spec +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/pyproject.toml +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/run_server.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/run_tests.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/scripts/generate_classic_sounds.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/setup.cfg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/__init__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/__main__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/__init__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/engine.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/models.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/modes/__init__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/modes/base.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/modes/flint.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/modes/indoor.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/sequence.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/engine/turn_modes.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/logging_setup.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/runtime.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/server/__init__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/server/http_static.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/server/match_server.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/server/ws_server.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/__init__.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/banners/README.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/club/README.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/README.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/countdown_tick.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/emergency_end.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/emergency_start.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/end_of_match.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/end_of_volee.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/pause_end.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/pause_start.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/prep_start.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/shoot_start.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/sounds/packs/classic/warning_orange.wav +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/flint_20cm_4spot.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/flint_35cm_1spot.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/indoor_compound.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/indoor_recurve.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/config.html +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/control.html +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/display.html +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/i18n.js +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/logo.ico +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/logo.svg +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/manual.html +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/screenshots/config.png +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/screenshots/control.png +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/screenshots/display.png +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/screenshots/index.png +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/theme.js +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/dependency_links.txt +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/entry_points.txt +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/requires.txt +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime.egg-info/top_level.txt +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_engine.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_flint_mode.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_indoor_mode.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_main_cli.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_match_server.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_runtime.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/tests/test_theme_drift.py +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/web/assets/banners/README.md +0 -0
- {fletchtime-0.3.3 → fletchtime-0.3.5}/web/assets/sounds/packs/README.md +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{# Lien croisé vers fletchapps en pied de page (retour utilisateur,
|
|
2
|
+
ticket #17) -- étend le bloc "footer" du thème furo plutôt que de le
|
|
3
|
+
remplacer, pour garder la navigation précédente/suivante, le
|
|
4
|
+
copyright et le crédit Sphinx/Furo déjà en place. `{{ super() }}`
|
|
5
|
+
restitue tout le contenu d'origine du bloc avant d'ajouter notre
|
|
6
|
+
ligne. Même phrase que sur les pages web des projets frères (voir
|
|
7
|
+
CLAUDE.md global, section "Footer/signature des sites web"), pas de
|
|
8
|
+
variante EN : cette doc est entièrement en français (`language =
|
|
9
|
+
"fr"` dans conf.py, pas de bascule de langue ici contrairement aux
|
|
10
|
+
pages web JS des projets). #}
|
|
11
|
+
{% extends "!page.html" %}
|
|
12
|
+
{% block footer %}
|
|
13
|
+
{{ super() }}
|
|
14
|
+
<div class="bottom-of-page">
|
|
15
|
+
<div class="left-details">
|
|
16
|
+
<div class="copyright">
|
|
17
|
+
<a class="muted-link" href="https://mrfanghodev.github.io/fletchapps/" target="_blank" rel="noopener">Découvre les autres outils du club sur fletchapps →</a>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
{% endblock footer %}
|
|
@@ -59,6 +59,11 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
|
59
59
|
|
|
60
60
|
language = "fr"
|
|
61
61
|
|
|
62
|
+
# Template maison (docs/_templates/page.html) -- ajoute le lien croisé
|
|
63
|
+
# vers fletchapps en pied de page (retour utilisateur, ticket #17), voir
|
|
64
|
+
# ce fichier pour le détail.
|
|
65
|
+
templates_path = ["_templates"]
|
|
66
|
+
|
|
62
67
|
# -- Options for HTML output --------------------------------------------------
|
|
63
68
|
|
|
64
69
|
html_theme = "furo" # thème moderne, responsive, lisible sur mobile
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
21
|
+
__version__ = version = '0.3.5'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 5)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g382703600'
|
|
@@ -60,6 +60,14 @@ from fletchtime.server import config_store
|
|
|
60
60
|
|
|
61
61
|
SECTIONS = ["accueil", "affichage", "reseau", "statut_technique", "journal", "aide"]
|
|
62
62
|
|
|
63
|
+
# Mêmes icônes que la vue web (theme.css, boutons .theme-btn) et que le
|
|
64
|
+
# sélecteur de thème de FletchScore (gui/app.py::ICONES_THEME, issue #49)
|
|
65
|
+
# -- reprises telles quelles ici (issue #15) pour remplacer le dropdown
|
|
66
|
+
# texte "Système"/"Clair"/"Sombre" d'avant, qui devait être retraduit à
|
|
67
|
+
# chaque changement de langue.
|
|
68
|
+
ICONES_THEME = {"system": "◐", "light": "☀", "dark": "☾"}
|
|
69
|
+
_THEME_PAR_ICONE = {icone: theme for theme, icone in ICONES_THEME.items()}
|
|
70
|
+
|
|
63
71
|
# Même fichier que celui utilisé comme icône de fletchtime.spec -- pas de
|
|
64
72
|
# nouvel asset à ajouter, seulement "*.ico" au package-data pip (voir
|
|
65
73
|
# pyproject.toml, absent jusqu'ici -- déjà embarqué par PyInstaller, qui
|
|
@@ -73,6 +81,7 @@ _TRANSLATIONS = {
|
|
|
73
81
|
"start": "Démarrer",
|
|
74
82
|
"stop": "Arrêter",
|
|
75
83
|
"quit": "Quitter",
|
|
84
|
+
"fletchappsLink": "Découvre les autres outils du club sur fletchapps →",
|
|
76
85
|
"quitConfirmMessage": "Veux-tu vraiment quitter FletchTime ?",
|
|
77
86
|
"quitConfirmServerNote": "Le serveur sera arrêté et tous les écrans connectés seront déconnectés.",
|
|
78
87
|
"cancel": "Annuler",
|
|
@@ -110,9 +119,6 @@ _TRANSLATIONS = {
|
|
|
110
119
|
"log_title": "Journal",
|
|
111
120
|
"club_data": "Données du club :",
|
|
112
121
|
"addressCaption": "Adresse :",
|
|
113
|
-
"themeSystem": "Système",
|
|
114
|
-
"themeLight": "Clair",
|
|
115
|
-
"themeDark": "Sombre",
|
|
116
122
|
"networkCaption": "Ports (HTTP/WS) :",
|
|
117
123
|
"displayOptionsCaption": "Lane à ouvrir :",
|
|
118
124
|
"muteLabel": "Muet",
|
|
@@ -138,6 +144,7 @@ _TRANSLATIONS = {
|
|
|
138
144
|
"start": "Start",
|
|
139
145
|
"stop": "Stop",
|
|
140
146
|
"quit": "Quit",
|
|
147
|
+
"fletchappsLink": "Discover the club's other tools on fletchapps →",
|
|
141
148
|
"quitConfirmMessage": "Do you really want to quit FletchTime?",
|
|
142
149
|
"quitConfirmServerNote": "The server will stop and all connected screens will be disconnected.",
|
|
143
150
|
"cancel": "Cancel",
|
|
@@ -175,9 +182,6 @@ _TRANSLATIONS = {
|
|
|
175
182
|
"log_title": "Log",
|
|
176
183
|
"club_data": "Club data:",
|
|
177
184
|
"addressCaption": "Address:",
|
|
178
|
-
"themeSystem": "System",
|
|
179
|
-
"themeLight": "Light",
|
|
180
|
-
"themeDark": "Dark",
|
|
181
185
|
"networkCaption": "Ports (HTTP/WS):",
|
|
182
186
|
"displayOptionsCaption": "Lane to open:",
|
|
183
187
|
"muteLabel": "Muted",
|
|
@@ -317,7 +321,7 @@ class FletchTimeApp(ctk.CTk):
|
|
|
317
321
|
|
|
318
322
|
super().__init__()
|
|
319
323
|
|
|
320
|
-
self.language = "
|
|
324
|
+
self.language = gui_config["language"]
|
|
321
325
|
self.log_queue: queue.Queue[str] = queue.Queue()
|
|
322
326
|
self.status_queue: queue.Queue = queue.Queue()
|
|
323
327
|
# Sources de vérité pour le journal et le statut technique --
|
|
@@ -458,23 +462,23 @@ class FletchTimeApp(ctk.CTk):
|
|
|
458
462
|
self.langue_caption = ctk.CTkLabel(self.barre_laterale, text=self._t("languageCaption"))
|
|
459
463
|
self.langue_caption.grid(row=ligne, column=0, padx=20, pady=(10, 0), sticky="w")
|
|
460
464
|
ligne += 1
|
|
461
|
-
self.
|
|
465
|
+
self.segment_langue = ctk.CTkSegmentedButton(
|
|
462
466
|
self.barre_laterale, values=["FR", "EN"], command=self._on_language_change
|
|
463
467
|
)
|
|
464
|
-
self.
|
|
465
|
-
self.
|
|
468
|
+
self.segment_langue.set(self.language.upper())
|
|
469
|
+
self.segment_langue.grid(row=ligne, column=0, padx=20, pady=(5, 10), sticky="ew")
|
|
466
470
|
ligne += 1
|
|
467
471
|
|
|
468
472
|
self.theme_caption = ctk.CTkLabel(self.barre_laterale, text=self._t("themeCaption"))
|
|
469
473
|
self.theme_caption.grid(row=ligne, column=0, padx=20, pady=(0, 0), sticky="w")
|
|
470
474
|
ligne += 1
|
|
471
|
-
self.
|
|
475
|
+
self.segment_theme = ctk.CTkSegmentedButton(
|
|
472
476
|
self.barre_laterale,
|
|
473
|
-
values=
|
|
477
|
+
values=list(ICONES_THEME.values()),
|
|
474
478
|
command=self._on_theme_change,
|
|
475
479
|
)
|
|
476
|
-
self.
|
|
477
|
-
self.
|
|
480
|
+
self.segment_theme.set(ICONES_THEME[self.theme])
|
|
481
|
+
self.segment_theme.grid(row=ligne, column=0, padx=20, pady=(5, 15), sticky="ew")
|
|
478
482
|
ligne += 1
|
|
479
483
|
|
|
480
484
|
self.quit_button = ctk.CTkButton(
|
|
@@ -487,6 +491,27 @@ class FletchTimeApp(ctk.CTk):
|
|
|
487
491
|
self.quit_button.grid(row=ligne, column=0, padx=20, pady=(0, 15), sticky="ew")
|
|
488
492
|
ligne += 1
|
|
489
493
|
|
|
494
|
+
# Lien croisé vers fletchapps (retour utilisateur, ticket #17) --
|
|
495
|
+
# juste au-dessus du numéro de version, même convention que les
|
|
496
|
+
# pages web des projets frères (voir CLAUDE.md global, section
|
|
497
|
+
# "Footer/signature des sites web"). CTkLabel + bind clic plutôt
|
|
498
|
+
# qu'un CTkButton : customtkinter n'a pas de widget "lien" natif,
|
|
499
|
+
# et un vrai bouton aurait été visuellement trop proche de
|
|
500
|
+
# "Quitter" juste au-dessus pour un simple lien externe.
|
|
501
|
+
self.fletchapps_link = ctk.CTkLabel(
|
|
502
|
+
self.barre_laterale,
|
|
503
|
+
text=self._t("fletchappsLink"),
|
|
504
|
+
font=ctk.CTkFont(size=11),
|
|
505
|
+
text_color=("#a8781f", "#d1a13d"),
|
|
506
|
+
cursor="hand2",
|
|
507
|
+
)
|
|
508
|
+
self.fletchapps_link.grid(row=ligne, column=0, padx=20, pady=(0, 8), sticky="w")
|
|
509
|
+
self.fletchapps_link.bind(
|
|
510
|
+
"<Button-1>",
|
|
511
|
+
lambda _evenement: webbrowser.open("https://mrfanghodev.github.io/fletchapps/"),
|
|
512
|
+
)
|
|
513
|
+
ligne += 1
|
|
514
|
+
|
|
490
515
|
ctk.CTkLabel(
|
|
491
516
|
self.barre_laterale,
|
|
492
517
|
text=f"v{__version__}",
|
|
@@ -904,36 +929,22 @@ class FletchTimeApp(ctk.CTk):
|
|
|
904
929
|
|
|
905
930
|
def _on_language_change(self, value: str) -> None:
|
|
906
931
|
self.language = value.lower()
|
|
932
|
+
config_store.save_gui_config({"language": self.language})
|
|
907
933
|
self.title(self._t("title"))
|
|
908
934
|
for cle, bouton in self.boutons_sections.items():
|
|
909
935
|
bouton.configure(text=self._libelle_section(cle))
|
|
910
936
|
self.langue_caption.configure(text=self._t("languageCaption"))
|
|
911
937
|
self.theme_caption.configure(text=self._t("themeCaption"))
|
|
912
|
-
self.theme_menu.configure(
|
|
913
|
-
values=[self._t("themeSystem"), self._t("themeLight"), self._t("themeDark")]
|
|
914
|
-
)
|
|
915
|
-
self.theme_menu.set(self._theme_label(self.theme))
|
|
916
938
|
self.quit_button.configure(text=self._t("quit"))
|
|
939
|
+
self.fletchapps_link.configure(text=self._t("fletchappsLink"))
|
|
917
940
|
# Reconstruit l'écran actif pour retraduire tout son contenu --
|
|
918
941
|
# plus simple et plus sûr que de retrouver et reconfigurer
|
|
919
942
|
# individuellement chaque widget d'un écran qui pourrait ne même
|
|
920
943
|
# pas être l'écran actuellement affiché.
|
|
921
944
|
self.afficher_section(self.section_active)
|
|
922
945
|
|
|
923
|
-
def
|
|
924
|
-
|
|
925
|
-
"system": self._t("themeSystem"),
|
|
926
|
-
"light": self._t("themeLight"),
|
|
927
|
-
"dark": self._t("themeDark"),
|
|
928
|
-
}.get(theme, self._t("themeSystem"))
|
|
929
|
-
|
|
930
|
-
def _on_theme_change(self, label: str) -> None:
|
|
931
|
-
reverse = {
|
|
932
|
-
self._t("themeSystem"): "system",
|
|
933
|
-
self._t("themeLight"): "light",
|
|
934
|
-
self._t("themeDark"): "dark",
|
|
935
|
-
}
|
|
936
|
-
theme = reverse.get(label, "system")
|
|
946
|
+
def _on_theme_change(self, icone: str) -> None:
|
|
947
|
+
theme = _THEME_PAR_ICONE[icone]
|
|
937
948
|
self.theme = theme
|
|
938
949
|
ctk.set_appearance_mode(theme)
|
|
939
950
|
config_store.save_gui_config({"theme": theme})
|
|
@@ -84,10 +84,16 @@ _HEX_COLOR_RE = re.compile(r"^#[0-9a-fA-F]{6}$")
|
|
|
84
84
|
|
|
85
85
|
GUI_COMMENTS: dict[str, str] = {
|
|
86
86
|
"theme": 'Thème de la fenêtre : "system" (suit le thème du système), "light" ou "dark"',
|
|
87
|
+
"language": 'Langue de la fenêtre : "fr" ou "en"',
|
|
87
88
|
"http_port": "Port HTTP (pages web) -- change ceci pour faire tourner plusieurs salles sur le même PC",
|
|
88
89
|
"ws_port": "Port WebSocket (temps réel) -- doit être différent du port HTTP",
|
|
89
90
|
}
|
|
90
|
-
DEFAULT_GUI_CONFIG: dict[str, Any] = {
|
|
91
|
+
DEFAULT_GUI_CONFIG: dict[str, Any] = {
|
|
92
|
+
"theme": "system",
|
|
93
|
+
"language": "fr",
|
|
94
|
+
"http_port": 8000,
|
|
95
|
+
"ws_port": 8765,
|
|
96
|
+
}
|
|
91
97
|
|
|
92
98
|
AUTH_COMMENTS: dict[str, str] = {
|
|
93
99
|
"password": (
|
|
@@ -201,6 +207,8 @@ def save_gui_config(overrides: dict[str, Any]) -> dict[str, Any]:
|
|
|
201
207
|
merged.update({k: v for k, v in overrides.items() if k in DEFAULT_GUI_CONFIG})
|
|
202
208
|
if merged["theme"] not in ("system", "light", "dark"):
|
|
203
209
|
raise ValueError(f'theme must be "system", "light" or "dark", got {merged["theme"]!r}')
|
|
210
|
+
if merged["language"] not in ("fr", "en"):
|
|
211
|
+
raise ValueError(f'language must be "fr" or "en", got {merged["language"]!r}')
|
|
204
212
|
for key in ("http_port", "ws_port"):
|
|
205
213
|
port = merged[key]
|
|
206
214
|
if not isinstance(port, int) or not (1 <= port <= 65535):
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
body {
|
|
45
45
|
display: flex; flex-direction: column; align-items: center;
|
|
46
|
-
padding:
|
|
46
|
+
padding: 5.5rem 1.25rem 2rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 640px; }
|
|
@@ -16,11 +16,13 @@ class TestConfigStore(unittest.TestCase):
|
|
|
16
16
|
self._original_app = config_store.APP_TOML
|
|
17
17
|
self._original_auth = config_store.AUTH_TOML
|
|
18
18
|
self._original_match_state = config_store.MATCH_STATE_JSON
|
|
19
|
+
self._original_gui = config_store.GUI_TOML
|
|
19
20
|
config_store.INDOOR_TOML = Path(self._tmpdir.name) / "indoor.toml"
|
|
20
21
|
config_store.FLINT_TOML = Path(self._tmpdir.name) / "flint.toml"
|
|
21
22
|
config_store.APP_TOML = Path(self._tmpdir.name) / "app.toml"
|
|
22
23
|
config_store.AUTH_TOML = Path(self._tmpdir.name) / "auth.toml"
|
|
23
24
|
config_store.MATCH_STATE_JSON = Path(self._tmpdir.name) / "match_state.json"
|
|
25
|
+
config_store.GUI_TOML = Path(self._tmpdir.name) / "gui.toml"
|
|
24
26
|
|
|
25
27
|
def tearDown(self) -> None:
|
|
26
28
|
config_store.INDOOR_TOML = self._original_indoor
|
|
@@ -28,6 +30,7 @@ class TestConfigStore(unittest.TestCase):
|
|
|
28
30
|
config_store.APP_TOML = self._original_app
|
|
29
31
|
config_store.AUTH_TOML = self._original_auth
|
|
30
32
|
config_store.MATCH_STATE_JSON = self._original_match_state
|
|
33
|
+
config_store.GUI_TOML = self._original_gui
|
|
31
34
|
self._tmpdir.cleanup()
|
|
32
35
|
|
|
33
36
|
def test_missing_file_falls_back_to_dataclass_defaults(self) -> None:
|
|
@@ -63,6 +66,28 @@ class TestConfigStore(unittest.TestCase):
|
|
|
63
66
|
cfg = config_store.load_indoor_config()
|
|
64
67
|
self.assertEqual(cfg.shoot_time, 210.0)
|
|
65
68
|
|
|
69
|
+
def test_gui_config_defaults_to_french(self) -> None:
|
|
70
|
+
# issue #16 : la langue n'avait pas de valeur par défaut avant ce
|
|
71
|
+
# ticket -- absente de DEFAULT_GUI_CONFIG.
|
|
72
|
+
cfg = config_store.load_gui_config()
|
|
73
|
+
self.assertEqual(cfg["language"], "fr")
|
|
74
|
+
|
|
75
|
+
def test_gui_config_language_round_trip(self) -> None:
|
|
76
|
+
config_store.save_gui_config({"language": "en"})
|
|
77
|
+
self.assertEqual(config_store.load_gui_config()["language"], "en")
|
|
78
|
+
|
|
79
|
+
def test_gui_config_invalid_language_raises_and_does_not_write(self) -> None:
|
|
80
|
+
with self.assertRaises(ValueError):
|
|
81
|
+
config_store.save_gui_config({"language": "de"})
|
|
82
|
+
self.assertFalse(config_store.GUI_TOML.exists())
|
|
83
|
+
|
|
84
|
+
def test_gui_config_language_survives_alongside_theme(self) -> None:
|
|
85
|
+
config_store.save_gui_config({"theme": "dark"})
|
|
86
|
+
config_store.save_gui_config({"language": "en"})
|
|
87
|
+
cfg = config_store.load_gui_config()
|
|
88
|
+
self.assertEqual(cfg["theme"], "dark")
|
|
89
|
+
self.assertEqual(cfg["language"], "en")
|
|
90
|
+
|
|
66
91
|
def test_flint_distances_round_trip_as_lists(self) -> None:
|
|
67
92
|
custom = ["1 yard", "2 yards", "3 yards", "4 yards", "5 yards", "6 yards"]
|
|
68
93
|
config_store.save_flint_config({"standard_distances": custom})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/flint_20cm_4spot.svg
RENAMED
|
File without changes
|
{fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/flint_35cm_1spot.svg
RENAMED
|
File without changes
|
{fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/indoor_compound.svg
RENAMED
|
File without changes
|
{fletchtime-0.3.3 → fletchtime-0.3.5}/src/fletchtime/web/_defaults/targets/indoor_recurve.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|