diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.html | 2 | ||||
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.ts | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.html b/client/src/app/shared/user-subscription/subscribe-button.component.html index c4dec239f..25f3be215 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.html +++ b/client/src/app/shared/user-subscription/subscribe-button.component.html | |||
@@ -46,7 +46,7 @@ | |||
46 | <div class="dropdown-divider"></div> | 46 | <div class="dropdown-divider"></div> |
47 | 47 | ||
48 | <h6 class="dropdown-header" i18n>Using a syndication feed</h6> | 48 | <h6 class="dropdown-header" i18n>Using a syndication feed</h6> |
49 | <button (click)="rssOpen()" class="dropdown-item" i18n>Subscribe via RSS</button> | 49 | <a [href]="rssUri" target="_blank" class="dropdown-item" i18n>Subscribe via RSS</a> |
50 | 50 | ||
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index 25515f6ea..b04e230f0 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts | |||
@@ -36,6 +36,14 @@ export class SubscribeButtonComponent implements OnInit { | |||
36 | return this.videoChannel.url | 36 | return this.videoChannel.url |
37 | } | 37 | } |
38 | 38 | ||
39 | get rssUri () { | ||
40 | const rssFeed = this.videoService | ||
41 | .getVideoChannelFeedUrls(this.videoChannel.id) | ||
42 | .find(i => i.format === FeedFormat.RSS) | ||
43 | |||
44 | return rssFeed.url | ||
45 | } | ||
46 | |||
39 | ngOnInit () { | 47 | ngOnInit () { |
40 | if (this.isUserLoggedIn()) { | 48 | if (this.isUserLoggedIn()) { |
41 | this.userSubscriptionService.doesSubscriptionExist(this.channelHandle) | 49 | this.userSubscriptionService.doesSubscriptionExist(this.channelHandle) |
@@ -100,12 +108,4 @@ export class SubscribeButtonComponent implements OnInit { | |||
100 | gotoLogin () { | 108 | gotoLogin () { |
101 | this.router.navigate([ '/login' ]) | 109 | this.router.navigate([ '/login' ]) |
102 | } | 110 | } |
103 | |||
104 | rssOpen () { | ||
105 | const rssFeed = this.videoService | ||
106 | .getVideoChannelFeedUrls(this.videoChannel.id) | ||
107 | .find(i => i.format === FeedFormat.RSS) | ||
108 | |||
109 | window.open(rssFeed.url) | ||
110 | } | ||
111 | } | 111 | } |