feat(lecteur): menu FAB partage /watch et /shorts
CI / build-and-test (push) Successful in 14m48s

- PlayerMenuComponent : FAB circulaire translucide (haut-gauche) + panneau
  deroulant, commun aux deux pages (position, style, open/close, clic exterieur)
- /shorts : consolidation de tous les boutons (fournisseurs, langue, actions)
  dans le menu FAB ; suppression du rail a droite et de la rangee du haut
- /watch : actions (cinema, qualite, j'aime, playlist, transcription,
  telechargement, partage, ouvrir) deplacees dans le menu FAB
- AddToPlaylistComponent : variante menuItem pour s'integrer au menu
- styles .pm-item/.pm-sep/.pm-section-label dans index.css
This commit is contained in:
2026-09-30 22:50:46 -04:00
parent 2bcc7321aa
commit 01e0671de9
7 changed files with 301 additions and 240 deletions
@@ -12,18 +12,22 @@ import { forkJoin } from 'rxjs';
// HttpClient sans intercepteurs (plus de Bearer/refresh -> 401).
imports: [CommonModule],
template: `
<div class="relative inline-block text-left" (click)="$event.stopPropagation();">
<div [class]="menuItem ? 'relative w-full text-left' : 'relative inline-block text-left'" (click)="$event.stopPropagation();">
<button (click)="toggleOpen($event)"
[disabled]="!isAuthenticated()"
class="flex items-center space-x-2 bg-slate-700 hover:bg-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500/60 disabled:opacity-60 disabled:cursor-not-allowed px-4 py-2 rounded-full transition text-slate-200 font-semibold"
[class]="menuItem ? 'pm-item' : 'flex items-center space-x-2 bg-slate-700 hover:bg-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500/60 disabled:opacity-60 disabled:cursor-not-allowed px-4 py-2 rounded-full transition text-slate-200 font-semibold'"
[attr.aria-expanded]="open()"
[attr.aria-haspopup]="true"
[attr.title]="!isAuthenticated() ? 'Connectez-vous pour gérer vos playlists' : 'Ajouter à une playlist'">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
<path d="M4 6a2 2 0 012-2h12a1 1 0 010 2H6v10a1 1 0 11-2 0V6z" />
<path d="M14 11a1 1 0 011-1h5a1 1 0 110 2h-5a1 1 0 01-1-1zM14 15a1 1 0 011-1h5a1 1 0 110 2h-5a1 1 0 01-1-1zM10 11a1 1 0 112 0v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1H9a1 1 0 110-2h1v-1z" />
</svg>
<span class="sr-only">Ajouter à une playlist</span>
@if (menuItem) {
<span class="pm-item-label">Ajouter à une playlist</span>
} @else {
<span class="sr-only">Ajouter à une playlist</span>
}
</button>
@if (open()) {
@@ -115,6 +119,8 @@ export class AddToPlaylistComponent implements OnInit, OnDestroy {
@Input() videoId: string = '';
@Input() title?: string;
@Input() thumbnail?: string;
/** Rendu « élément de menu » (menu FAB du lecteur) : plein largeur, icon + label. */
@Input() menuItem = false;
open = signal<boolean>(false);
loading = signal<boolean>(false);