Change button with onclick to link with href
This commit is contained in:
parent
85c1df6ae8
commit
405ec98b91
|
@ -46,7 +46,7 @@
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
<h6 class="dropdown-header" i18n>Using a syndication feed</h6>
|
<h6 class="dropdown-header" i18n>Using a syndication feed</h6>
|
||||||
<button (click)="rssOpen()" class="dropdown-item" i18n>Subscribe via RSS</button>
|
<a [href]="rssUri" target="_blank" class="dropdown-item" i18n>Subscribe via RSS</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,6 +36,14 @@ export class SubscribeButtonComponent implements OnInit {
|
||||||
return this.videoChannel.url
|
return this.videoChannel.url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get rssUri () {
|
||||||
|
const rssFeed = this.videoService
|
||||||
|
.getVideoChannelFeedUrls(this.videoChannel.id)
|
||||||
|
.find(i => i.format === FeedFormat.RSS)
|
||||||
|
|
||||||
|
return rssFeed.url
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
if (this.isUserLoggedIn()) {
|
if (this.isUserLoggedIn()) {
|
||||||
this.userSubscriptionService.doesSubscriptionExist(this.channelHandle)
|
this.userSubscriptionService.doesSubscriptionExist(this.channelHandle)
|
||||||
|
@ -100,12 +108,4 @@ export class SubscribeButtonComponent implements OnInit {
|
||||||
gotoLogin () {
|
gotoLogin () {
|
||||||
this.router.navigate([ '/login' ])
|
this.router.navigate([ '/login' ])
|
||||||
}
|
}
|
||||||
|
|
||||||
rssOpen () {
|
|
||||||
const rssFeed = this.videoService
|
|
||||||
.getVideoChannelFeedUrls(this.videoChannel.id)
|
|
||||||
.find(i => i.format === FeedFormat.RSS)
|
|
||||||
|
|
||||||
window.open(rssFeed.url)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue