diff options
author | Frank Sträter <fstrater@beeldengeluid.nl> | 2019-09-24 14:43:11 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-10-18 10:30:28 +0200 |
commit | 405ec98b916df9afb114ad20e847221d4eb94eea (patch) | |
tree | cb41af1595e29e5d7a03b3ea4525d492f5e0fb39 /client/src/app/shared/user-subscription/subscribe-button.component.ts | |
parent | 85c1df6ae899be2b1bdd9691b38a2a2b94bffdcf (diff) | |
download | PeerTube-405ec98b916df9afb114ad20e847221d4eb94eea.tar.gz PeerTube-405ec98b916df9afb114ad20e847221d4eb94eea.tar.zst PeerTube-405ec98b916df9afb114ad20e847221d4eb94eea.zip |
Change button with onclick to link with href
Diffstat (limited to 'client/src/app/shared/user-subscription/subscribe-button.component.ts')
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.ts | 16 |
1 files changed, 8 insertions, 8 deletions
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 | } |