import * as Vue from "vue"; const root_url = "https://www.last.fm/user/username/library/music/artist/album"; export let PlayCountCard: Vue.Component = { props: ['count', 'track', 'username'], computed: { TrackLink(): string { return `https://www.last.fm/user/${this.username}/library/music/${this.track.artist}/_/${this.track.name}`; }, AlbumLink(): string { return `https://www.last.fm/user/${this.username}/library/music/${this.track.album_artist}/${this.track.album}`; }, ArtistLink(): string { return `https://www.last.fm/user/${this.username}/library/music/${this.track.artist}`; }, UserLink(): string { return `https://www.last.fm/user/${this.username}`; }, TrackPercent(): number { return ((this.count.track * 100) / this.count.user); }, AlbumPercent(): number { return ((this.count.album * 100) / this.count.user); }, ArtistPercent(): number { return ((this.count.artist * 100) / this.count.user); }, TrackPercentStr(): string { return this.TrackPercent.toFixed(2); }, AlbumPercentStr(): string { return this.AlbumPercent.toFixed(2); }, ArtistPercentStr(): string { return this.ArtistPercent.toFixed(1); } }, template: `
` } export let LastFmLogoLink: Vue.Component = { props: ['link'], template: ` ` }