From d926545e3d0fbbe365f662c960b067f6619242fb Mon Sep 17 00:00:00 2001 From: "IETM_FIXE\\ietm6" Date: Sat, 17 Oct 2026 14:07:20 +0200 Subject: [PATCH] =?UTF-8?q?Mobile=20:=20raccourci=20=C2=AB=20S=C3=A9ance?= =?UTF-8?q?=20en=20cours=20=C2=BB=20dans=20la=20barre=20haute=20+=20hub=20?= =?UTF-8?q?sans=20d=C3=A9bordement=20=C3=A0=20375=20px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Barre haute mobile : pastille « Séance en cours » (mode compact du raccourci, 44 px) — un tap ramène à la séance, liste déroulante s'il y en a plusieurs (fermée par Échap ou un tap à côté). - Hub campagne : l'en-tête de section « Arcs narratifs » passe à la ligne au lieu de déborder (3 boutons depuis l'ajout de « Méthode guidée »). Vérifié : core clean verify (1206 tests), web build + 337 vitest, lint sans erreur, e2e Playwright 80/80 (desktop + mobile 375 px) sur la branche fusionnée. À redéployer : web. --- web/src/app/app.component.html | 2 + web/src/app/app.component.ts | 2 + .../campaign-detail.component.scss | 3 ++ .../active-session-shortcut.component.html | 27 ++++++++----- .../active-session-shortcut.component.scss | 38 +++++++++++++++++++ .../active-session-shortcut.component.ts | 24 ++++++++++-- 6 files changed, 82 insertions(+), 14 deletions(-) diff --git a/web/src/app/app.component.html b/web/src/app/app.component.html index 8494970..08a1171 100644 --- a/web/src/app/app.component.html +++ b/web/src/app/app.component.html @@ -25,6 +25,8 @@ DM Loremind } + + diff --git a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.scss b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.scss index bf33853..b187775 100644 --- a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.scss +++ b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.scss @@ -111,3 +111,41 @@ .shortcut-item-name { font-size: 0.8rem; font-weight: 500; } .shortcut-item-ctx { font-size: 0.7rem; color: #9ca3af; } + +// --- Mode compact (barre haute mobile) ---------------------------------------------- +:host(.compact) { + position: relative; + + .active-shortcut { margin-top: 0; } + + .shortcut-main { + justify-content: center; + gap: 0.3rem; + width: auto; + min-width: 44px; + height: 44px; + padding: 0 0.55rem; + } + + .live-dot { width: 10px; height: 10px; } + + .shortcut-list { + position: absolute; + top: calc(100% + 6px); + right: 0; + z-index: 30; + width: min(280px, calc(100vw - 2rem)); + padding: 0.4rem; + background: #0f0f1a; + border: 1px solid #2a2a45; + border-radius: 8px; + box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); + } +} + +.compact-count { + font-size: 0.8rem; + font-weight: 700; + color: #d1fae5; + font-variant-numeric: tabular-nums; +} diff --git a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.ts b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.ts index 18d2494..127a572 100644 --- a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.ts +++ b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.ts @@ -1,4 +1,4 @@ -import { Component, DestroyRef, OnInit } from '@angular/core'; +import { Component, DestroyRef, ElementRef, HostBinding, HostListener, Input, OnInit, booleanAttribute } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { NavigationEnd, Router } from '@angular/router'; import { filter } from 'rxjs/operators'; @@ -11,8 +11,8 @@ import { ActiveSessionEntry, ActiveSessionsService } from '../../services/active * un clic y ramène depuis n'importe quel écran. Plusieurs séances (plusieurs tables) : * le bouton déplie la liste, la plus récente en tête. * - *

Composant autonome (styles propres) pour pouvoir le réutiliser tel quel dans la - * barre haute mobile.

+ *

Composant autonome (styles propres). En mode {@code compact} (barre haute mobile) : + * une pastille de 44 px, et la liste s'ouvre en menu déroulant (Échap / tap à côté la ferme).

*/ @Component({ selector: 'app-active-session-shortcut', @@ -24,6 +24,9 @@ export class ActiveSessionShortcutComponent implements OnInit { readonly ChevronDown = ChevronDown; readonly ChevronUp = ChevronUp; + /** Barre haute mobile : pastille seule, liste en menu déroulant. */ + @Input({ transform: booleanAttribute }) @HostBinding('class.compact') compact = false; + entries: ActiveSessionEntry[] = []; expanded = false; currentUrl = ''; @@ -31,7 +34,8 @@ export class ActiveSessionShortcutComponent implements OnInit { constructor( private activeSessions: ActiveSessionsService, private router: Router, - private destroyRef: DestroyRef + private destroyRef: DestroyRef, + private host: ElementRef ) {} ngOnInit(): void { @@ -50,6 +54,18 @@ export class ActiveSessionShortcutComponent implements OnInit { }); } + @HostListener('document:click', ['$event']) + onDocumentClick(event: MouseEvent): void { + if (this.compact && this.expanded && !this.host.nativeElement.contains(event.target as Node)) { + this.expanded = false; + } + } + + @HostListener('document:keydown.escape') + onEscape(): void { + if (this.expanded) this.expanded = false; + } + /** Une seule séance : on y va ; plusieurs : on déplie la liste. */ onMainClick(): void { if (this.entries.length === 1) {