Commentaires
-
Les commentaires s’affichent dans la page Watch, avec la description complète.
+
Aucune source de commentaires pour ce fournisseur. La page complète donne la description, les pistes de téléchargement et le transcript.
@if (watchLink()) {
-
- Voir les commentaires
+
+ Ouvrir la page complète
}
diff --git a/src/components/shorts/watch-short.component.ts b/src/components/shorts/watch-short.component.ts
index 37db8d5..4043f15 100644
--- a/src/components/shorts/watch-short.component.ts
+++ b/src/components/shorts/watch-short.component.ts
@@ -157,6 +157,10 @@ export class WatchShortComponent implements OnDestroy {
liked = signal(false);
private likedCheckedFor = '';
likeBusy = signal(false);
+ /** « Enregistrer » = liste « À regarder plus tard » (même stockage que J'aime). */
+ saved = signal(false);
+ private savedCheckedFor = '';
+ saveBusy = signal(false);
/** Abonnement à la chaîne du short courant. */
subBusy = signal(false);
/** Partage : "copié" éphémère. */
@@ -750,9 +754,20 @@ export class WatchShortComponent implements OnDestroy {
error: () => {},
});
}
+ // État « Enregistré » (tag watch-later) : même tuyau que J'aime.
+ if (key !== this.savedCheckedFor) {
+ this.savedCheckedFor = key;
+ this.saved.set(false);
+ this.likes.isLiked(this.providerOf(v), v.videoId, 'watch-later').subscribe({
+ next: (r) => { if (this.savedCheckedFor === key) this.saved.set(!!(r as any)?.liked); },
+ error: () => {},
+ });
+ }
} else {
this.liked.set(false);
this.likedCheckedFor = '';
+ this.saved.set(false);
+ this.savedCheckedFor = '';
}
} catch {}
});
@@ -1154,6 +1169,30 @@ export class WatchShortComponent implements OnDestroy {
}
}
+ /**
+ * « Enregistrer » = « À regarder plus tard » (même stockage que J'aime, tag
+ * `watch-later`, page /library/watch-later). Connecté uniquement : la liste
+ * est serveur, un invité n'a nulle part où l'écrire.
+ */
+ toggleSave(): void {
+ const v = this.current();
+ if (!v?.videoId || !this.isLoggedIn() || this.saveBusy()) return;
+ const p = this.providerOf(v);
+ this.saveBusy.set(true);
+ const done = (saved: boolean) => { this.saved.set(saved); this.saveBusy.set(false); };
+ if (this.saved()) {
+ this.likes.unlike(p, v.videoId, 'watch-later').subscribe({
+ next: () => done(false),
+ error: () => this.saveBusy.set(false),
+ });
+ } else {
+ this.likes.like(p, v.videoId, v.title, v.thumbnail, 'watch-later').subscribe({
+ next: () => done(true),
+ error: () => this.saveBusy.set(false),
+ });
+ }
+ }
+
toggleSubscribe(): void {
const key = this.currentChannelKey();
if (!key || !this.isLoggedIn() || this.subBusy()) return;