Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Put feed url as link

Chocobozzz7af5ded409c5
diff --git a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
index 6d19707df7..62d862ec92 100644
--- a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
@@ -60,22 +60,24 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
tokens => {
const feeds = this.videoService.getVideoSubscriptionFeedUrls(user.account.id, tokens.feedToken)
feedUrl = feedUrl + feeds.find(f => f.format === FeedFormat.RSS).url
+
+ this.actions.unshift({
+ label: $localize`Copy feed URL`,
+ iconName: 'syndication',
+ justIcon: true,
+ href: feedUrl,
+ click: e => {
+ e.preventDefault()
+ copyToClipboard(feedUrl)
+ this.activateCopiedMessage()
+ }
+ })
},
err => {
this.notifier.error(err.message)
}
)
-
- this.actions.unshift({
- label: $localize`Feed`,
- iconName: 'syndication',
- justIcon: true,
- click: () => {
- copyToClipboard(feedUrl)
- this.activateCopiedMessage()
- }
- })
}
ngOnDestroy () {
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.html b/client/src/app/shared/shared-video-miniature/abstract-video-list.html
index 18294513fd..368a7d70e6 100644
--- a/client/src/app/shared/shared-video-miniature/abstract-video-list.html
+++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.html
@@ -12,13 +12,12 @@
<a *ngIf="action.routerLink" class="ml-2" [routerLink]="action.routerLink" routerLinkActive="active">
<ng-container *ngTemplateOutlet="actionContent; context:{ $implicit: action }"></ng-container>
</a>
- <a *ngIf="!action.routerLink && action.click && !action.clipboard" class="ml-2" (click)="action.click()" (key.enter)="action.click()">
- <ng-container *ngTemplateOutlet="actionContent; context:{ $implicit: action }"></ng-container>
- </a>
- <a *ngIf="!action.routerLink && !action.click && action.clipboard" class="ml-2" [cdkCopyToClipboard]="action.clipboard">
+
+ <a *ngIf="!action.routerLink && !action.href && action.click" class="ml-2" (click)="action.click($event)" (key.enter)="action.click($event)">
<ng-container *ngTemplateOutlet="actionContent; context:{ $implicit: action }"></ng-container>
</a>
- <a *ngIf="!action.routerLink && action.click && action.clipboard" class="ml-2" (click)="action.click()" (key.enter)="action.click()" [cdkCopyToClipboard]="action.clipboard">
+
+ <a *ngIf="!action.routerLink && action.href && action.click" class="ml-2" (click)="action.click($event)" (key.enter)="action.click($event)" [href]="action.href">
<ng-container *ngTemplateOutlet="actionContent; context:{ $implicit: action }"></ng-container>
</a>
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
index c55e85afef..a5f22585dd 100644
--- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
+++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
@@ -74,8 +74,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
label: string
justIcon?: boolean
routerLink?: string
- click?: Function
- clipboard?: string
+ href?: string
+ click?: (e: Event) => void
}[] = []
onDataSubject = new Subject<any[]>()