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/app.component.ts b/web/src/app/app.component.ts
index b4ed6d9..98a110a 100644
--- a/web/src/app/app.component.ts
+++ b/web/src/app/app.component.ts
@@ -12,6 +12,7 @@ import { GlobalSearchComponent } from './shared/global-search/global-search.comp
import { UpdateBannerComponent } from './shared/update-banner/update-banner.component';
import { ConfirmDialogHostComponent } from './shared/confirm-dialog/confirm-dialog-host.component';
import { WritingCoachPanelComponent } from './shared/writing-coach/writing-coach-panel.component';
+import { ActiveSessionShortcutComponent } from './sessions/active-session-shortcut/active-session-shortcut.component';
import { LayoutService } from './services/layout.service';
import { GlobalSearchService } from './services/global-search.service';
import { VersionCheckerService } from './services/version-checker.service';
@@ -36,6 +37,7 @@ const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), selec
UpdateBannerComponent,
ConfirmDialogHostComponent,
WritingCoachPanelComponent,
+ ActiveSessionShortcutComponent,
AsyncPipe
],
templateUrl: './app.component.html',
diff --git a/web/src/app/campaigns/campaign/campaign-detail/campaign-detail.component.scss b/web/src/app/campaigns/campaign/campaign-detail/campaign-detail.component.scss
index 58c8347..22dc1ea 100644
--- a/web/src/app/campaigns/campaign/campaign-detail/campaign-detail.component.scss
+++ b/web/src/app/campaigns/campaign/campaign-detail/campaign-detail.component.scss
@@ -307,8 +307,10 @@
.section-header {
display: flex;
+ flex-wrap: wrap; // écran étroit : les actions passent sous le titre au lieu de déborder
align-items: center;
justify-content: space-between;
+ gap: 0.75rem;
margin-bottom: 1.5rem;
h2 { color: #d1d5db; font-size: 1rem; font-weight: 600; }
@@ -316,6 +318,7 @@
.section-header-actions {
display: flex;
+ flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
}
diff --git a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.html b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.html
index 439f753..9cfa646 100644
--- a/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.html
+++ b/web/src/app/sessions/active-session-shortcut/active-session-shortcut.component.html
@@ -4,21 +4,28 @@
[class.shortcut-main--current]="entries.length === 1 && isCurrent(entries[0])"
[attr.aria-expanded]="entries.length > 1 ? expanded : null"
[title]="(entries.length === 1 ? 'playAccess.shortcut.openTitle' : 'playAccess.shortcut.listTitle') | translate"
+ [attr.aria-label]="compact ? ((entries.length === 1 ? 'playAccess.shortcut.openTitle' : 'playAccess.shortcut.listTitle') | translate) : null"
(click)="onMainClick()">
-
-
+ @if (compact) {
+ @if (entries.length > 1) {
+ {{ entries.length }}
+ }
+ } @else {
+
+
+ @if (entries.length === 1) {
+ {{ 'playAccess.shortcut.one' | translate }}
+ } @else {
+ {{ 'playAccess.shortcut.many' | translate:{ n: entries.length } }}
+ }
+
@if (entries.length === 1) {
- {{ 'playAccess.shortcut.one' | translate }}
- } @else {
- {{ 'playAccess.shortcut.many' | translate:{ n: entries.length } }}
+ {{ entries[0].session.name }}
}
- @if (entries.length === 1) {
- {{ entries[0].session.name }}
- }
-
- @if (entries.length > 1) {
+ }
+ @if (entries.length > 1 && !compact) {
}
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) {