From 7af5ded409c50f4f19a220cea36a8bbd16b0be24 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Jan 2021 10:19:12 +0100 Subject: [PATCH] Put feed url as link --- .../video-user-subscriptions.component.ts | 22 ++++++++++--------- .../abstract-video-list.html | 9 ++++---- .../abstract-video-list.ts | 4 ++-- 3 files changed, 18 insertions(+), 17 deletions(-) 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 6d19707df..62d862ec9 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 18294513f..368a7d70e 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 @@ - + + - - - - + + 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 c55e85afe..a5f22585d 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()