Proposer l'installation de l'app au bon moment (lot 3d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-18 15:17:39 +01:00
co-authored by Claude Opus 5.5
parent 888aec1003
commit 84b4027796
7 changed files with 461 additions and 4 deletions
+2
View File
@@ -16,6 +16,7 @@ import { proposalCard } from "../proposal-card.js";
import { estimatedMinutes } from "../../domain/progression.js";
import { hud } from "../game.js";
import { toast } from "../feedback.js";
import { installOffer, strengthSessions } from "../install.js";
/** @typedef {import("../../domain/state.js").State} State */
/** @typedef {import("../../domain/planning.js").Slot} Slot */
@@ -163,6 +164,7 @@ function homeContent(store, nav, today, synced) {
hud(state, today),
h("header", { class: "visually-hidden" }, h("h1", null, program.name)),
todayBlock,
installOffer("home", { hasProgram: true, sessions: strengthSessions(state) }),
oneOffs.length > 0 && [
h("h2", { class: "tape" }, "WOD proposé", h("span", { class: "tape__hint" }, "hors rotation")),
+4 -1
View File
@@ -1,6 +1,7 @@
// Profil (ProfileUpdated) et mode (ModeChanged) : ce que l'IA doit savoir pour
// construire et faire évoluer le programme. Plus le thème, simple préférence
// d'affichage de l'appareil (pas un événement, ADR 0006 point 3).
// d'affichage de l'appareil (pas un événement, ADR 0006 point 3), et l'entrée
// permanente pour installer l'app sur l'écran d'accueil (install.js).
import { h } from "../dom.js";
import { MODES } from "../../domain/vocabulary.js";
@@ -9,6 +10,7 @@ import { screenHeader } from "../layout.js";
import { href } from "../router.js";
import { toast } from "../feedback.js";
import { getTheme, setTheme } from "../theme-pref.js";
import { installEntry } from "../install.js";
/** @type {Record<string, {label: string, text: string}>} */
export const MODE_LABELS = {
@@ -117,6 +119,7 @@ export function profileScreen({ store, nav }) {
h("h2", { class: "tape" }, "Affichage"),
h("div", { class: "segmented", role: "group", "aria-label": "Thème" }, themeBtns),
h("p", { class: "muted" }, "Sombre par défaut : un écran OLED noir consomme moins."),
installEntry(),
h("h2", { class: "tape" }, "Appareils et IA"),
h("p", { class: "muted" }, "Relier ton téléphone et ton PC, brancher ton IA : sans compte, par une clé de synchro."),
h("a", { class: "btn btn--block sync-gap", href: href.sync() }, "Synchro et IA"));