Added user license and user country under username in settings

This commit is contained in:
RemixDev 2021-09-23 14:48:07 +02:00
parent 454d3707fa
commit 2e9b8900aa
2 changed files with 8 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,7 @@
<strong id="settings_username" ref="username">{{ user.name || 'not logged' }}</strong>
</template>
</i18n>
<p>{{userLicense}} | {{user.country}}</p>
<button class="btn btn-primary" @click="logout">
{{ $t('settings.login.logout') }}
@ -810,6 +811,11 @@ export default {
pictureHref() {
// Default image: https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg
return `https://e-cdns-images.dzcdn.net/images/user/${this.user.picture}/125x125-000000-80-0-0.jpg`
},
userLicense() {
if (this.user.can_stream_lossless) return "Hi-Fi"
else if (this.user.can_stream_hq) return "Premium"
else return "Free"
}
},
async mounted() {