From 78d9b2decd4f05072dab1b26901a3747901229f1 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 5 Oct 2021 12:14:59 +0200 Subject: [PATCH] Added more info to link analyzer --- src/app.js | 7 +++++++ src/components/pages/LinkAnalyzer.vue | 27 ++++++++++++++++++++++++--- src/lang/en.js | 12 +++++++++--- src/lang/it.js | 12 +++++++++--- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/src/app.js b/src/app.js index 1618448..d8f60b1 100644 --- a/src/app.js +++ b/src/app.js @@ -27,6 +27,13 @@ import { isValidURL } from '@/utils/utils' import { sendAddToQueue } from '@/utils/downloads' import { SPOTIFY_STATUS } from '@/constants' +/* ===== Random utils ===== */ + +/* eslint-disable no-extend-native */ +String.prototype.capitalize = function () { + return this.charAt(0).toUpperCase() + this.slice(1) +} + /* ===== App initialization ===== */ async function startApp() { new Vue({ diff --git a/src/components/pages/LinkAnalyzer.vue b/src/components/pages/LinkAnalyzer.vue index 2bc2522..b707c90 100644 --- a/src/components/pages/LinkAnalyzer.vue +++ b/src/components/pages/LinkAnalyzer.vue @@ -118,12 +118,24 @@ {{ $t('linkAnalyzer.table.genres') }} {{ data.genres.data.map(x => x.name).join('; ') }} + + {{ $t('linkAnalyzer.table.readable') }} + {{ $t( data.readable ? 'globals.yes' : 'globals.no').capitalize() }} + - {{ $t('linkAnalyzer.table.countries') }} - {{ country[0] }} - {{ country[1] }} + {{ $t('linkAnalyzer.table.available') }} + {{ $t( available_countries.includes(user.country.toLowerCase()) ? 'globals.yes' : 'globals.no').capitalize() }} + + +
{{ $t('linkAnalyzer.table.tracklist') }} @@ -135,6 +147,7 @@