diff --git a/routes/games/game_dashboard.py b/routes/games/game_dashboard.py index de93aaee..4cee98ad 100644 --- a/routes/games/game_dashboard.py +++ b/routes/games/game_dashboard.py @@ -24,4 +24,5 @@ def game_dashboard(slug): "game_dashboard.html", game=game, definitions=definitions, screen_list=screen_list, element_types=element_types, element_type_usage=element_type_usage, variables=variables, + variable_types=db.GLOBAL_VARIABLE_TYPES, ) diff --git a/static/style.css b/static/style.css index 23dd0df4..b92f902f 100644 --- a/static/style.css +++ b/static/style.css @@ -494,16 +494,16 @@ code{ background:var(--panel2); border:1px solid var(--border); border-radius:4p .animKeyframeRow textarea{ font-family:monospace; font-size:11px; } /* ---------- Tableau de bord d'un jeu (game_dashboard.html) ---------- */ -/* Résumé/point d'entrée : une carte par catégorie (écrans, objets, - éléments de jeu, variables), toutes de même hauteur dans leur ligne - (align-items:stretch, par défaut en grid) pour un rendu net même quand - une carte a beaucoup plus d'entrées qu'une autre. */ -.dashboardGrid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; margin-top:8px; } -.dashboardCard{ display:flex; flex-direction:column; border:1px solid var(--border); border-radius:10px; padding:16px; background:var(--panel); } -.dashboardCard h2{ display:flex; align-items:center; justify-content:space-between; margin:0 0 10px; } -.dashboardCardCount{ font-size:11px; color:var(--text-dim); background:var(--panel2); border-radius:999px; padding:2px 8px; text-transform:none; letter-spacing:0; } -.dashboardCardList{ display:flex; flex-direction:column; gap:2px; flex:1 1 auto; min-height:0; } -.dashboardCardItem{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; border-radius:6px; text-decoration:none; color:var(--text); font-size:12.5px; } -a.dashboardCardItem:hover{ background:var(--panel2); } -.dashboardCardItem span:first-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } -.dashboardCardFooter{ margin-top:10px; padding-top:10px; border-top:1px solid var(--border); font-size:12.5px; } +/* Une seule fenêtre, un onglet par catégorie (écrans/objets/éléments de + jeu/variables) — réutilise .builderTabs/.builderTabBtn/.builderTabPanel + (voir plus bas, éditeur d'écran) pour la même sensation de "fenêtre à + onglets" qu'ailleurs dans l'outil, plutôt que d'inventer un 2e système. + Contrairement à leur usage dans l'éditeur d'écran, ici la page défile + normalement (pas de hauteur figée) : une liste peut être longue, pas + besoin d'un défilement interne séparé par panneau. */ +.dashTabCount{ font-size:10px; color:var(--text-dim); background:var(--panel2); border-radius:999px; padding:1px 6px; margin-left:4px; } +.dashPanelHeader{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; } +.dashPanelHeader h2{ margin:0; } +.dashCreateBar{ display:flex; gap:8px; align-items:center; margin-bottom:12px; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--panel); } +.dashCreateBar input, .dashCreateBar select{ width:auto; flex:1 1 160px; } +.dashDangerZone{ margin-top:28px; } diff --git a/templates/game_dashboard.html b/templates/game_dashboard.html index aae0ef67..4627b2dc 100644 --- a/templates/game_dashboard.html +++ b/templates/game_dashboard.html @@ -3,87 +3,192 @@ {% block content_class %}content-wide{% endblock %} {% block content %}
Base de données : projects/{{ game.slug }}/game.db
+Base de données : projects/{{ game.slug }}/game.db
-Aucun écran pour l'instant.
- {% endif %} - -Aucun objet pour l'instant.
- {% endif %} - -Aucun élément de jeu pour l'instant.
- {% endif %} - -Aucune variable pour l'instant.
- {% endif %} - -| # | Nom | |
|---|---|---|
| {{ loop.index }} | ++ {{ s.name }} + {% if loop.first %} ★ Départ{% endif %} + | ++ + + ✏️ + + | +
Aucun écran pour l'instant.
+ {% endif %} +Un objet a des champs typés (nombre, texte, relation...) — sa création se fait sur sa propre page.
+ {% if definitions %} +| Nom | Table SQL | |
|---|---|---|
| {{ d.name }} | +{{ d.table_name }} | ++ ✏️ + | +
Aucun objet pour l'instant.
+ {% endif %} +| Nom | Usage | |
|---|---|---|
| {{ t.icon or '🧩' }} {{ t.name }} | ++ {{ element_type_usage.get(t.id, 0) }} instance(s) + {% if t.bound_definition_id %} + {% for d in definitions %}{% if d.id == t.bound_definition_id %} · « {{ d.name }} »{% endif %}{% endfor %} + {% endif %} + | ++ ✏️ + + | +
Aucun élément de jeu pour l'instant.
+ {% endif %} +| Nom | Type | Valeur | |
|---|---|---|---|
| {{ v.name }} | ++ + | ++ | + + + | +
Aucune variable pour l'instant.
+ {% endif %} +