aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorFrank Sträter <fstrater@beeldengeluid.nl>2019-09-24 14:43:11 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-10-18 10:30:28 +0200
commit405ec98b916df9afb114ad20e847221d4eb94eea (patch)
treecb41af1595e29e5d7a03b3ea4525d492f5e0fb39 /client/src/app/shared
parent85c1df6ae899be2b1bdd9691b38a2a2b94bffdcf (diff)
downloadPeerTube-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')
-rw-r--r--client/src/app/shared/user-subscription/subscribe-button.component.html2
-rw-r--r--client/src/app/shared/user-subscription/subscribe-button.component.ts16
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}