Added deezer unreachable differentiation to the vpn warning

This commit is contained in:
RemixDev 2022-02-12 14:35:44 +01:00
parent fa7cde2f8f
commit d7e05adb24
4 changed files with 22 additions and 6 deletions

View file

@ -15,7 +15,6 @@ import '@/styles/css/icons.css'
import '@/styles/css/tables.css'
import '@/styles/css/typography.css'
import App from '@/App.vue'
import i18n from '@/plugins/i18n'
import router from '@/router'
@ -48,7 +47,10 @@ async function startApp() {
const connectResponse = await (await fetch('connect')).json()
const spotifyStatus = connectResponse.spotifyEnabled ? SPOTIFY_STATUS.ENABLED : SPOTIFY_STATUS.DISABLED
if (!connectResponse.deezerAvailable) {
if (connectResponse.deezerAvailable === 'no-network') {
document.getElementById('deezer_not_reachable').classList.remove('hide')
}
if (connectResponse.deezerAvailable === 'no') {
document.getElementById('deezer_not_available').classList.remove('hide')
}

View file

@ -1,6 +1,11 @@
<template>
<div id="deezer_not_available" class="hide">
<i class="material-icons">warning</i> {{ $t('toasts.deezerNotAvailable') }}
<div>
<div id="deezer_not_available" class="warning hide">
<i class="material-icons">warning</i> {{ $t('toasts.deezerNotAvailable') }}
</div>
<div id="deezer_not_reachable" class="warning hide">
<i class="material-icons">warning</i> {{ $t('toasts.deezerNotReachable') }}
</div>
</div>
</template>
@ -8,16 +13,22 @@
#deezer_not_available {
background-color: hsl(53, 98%, 47%);
color: rgba(0, 0, 0, 0.75);
}
#deezer_not_reachable {
background-color: hsl(12, 98%, 46%);
color: rgba(255, 255, 255, 0.75);
}
.warning {
padding: 8px 12px;
margin: -10px 10px 0px;
display: flex;
border-radius: 8px;
align-items: center;
}
#deezer_not_available i {
.warning i {
margin-right: 8px;
}
#deezer_not_available.hide {
.hide {
display: none !important;
}
</style>

View file

@ -215,6 +215,7 @@ const en = {
finishConvertingSpotifyPlaylist: 'Spotify playlist converted',
loginNeededToDownload: 'You need to log in to download tracks!',
deezerNotAvailable: 'Deezer is not available in your country. You should use a VPN.',
deezerNotReachable: "The app can't reach Deezer. Check your internet connection, your firewall or your antivirus.",
startGeneratingItems: 'Processing {n} items...',
finishGeneratingItems: 'Generated {n} items.',
noLovedPlaylist: 'No loved tracks playlist!',

View file

@ -215,6 +215,8 @@ const it = {
finishConvertingSpotifyPlaylist: 'Playlist di spotify convertita',
loginNeededToDownload: 'Devi accedere prima di poter scaricare brani!',
deezerNotAvailable: 'Deezer non è disponibile nel tuo paese. Dovresti usare una VPN.',
deezerNotReachable:
"L'applicazione non riesce a contattare Deezer. Controlla la tua connessione internet, il tuo firewall o il tuo antivirus.",
startGeneratingItems: 'Elaborando {n} oggetti...',
finishGeneratingItems: '{n} oggetti generati.',
noLovedPlaylist: 'Nessuna playlist "Canzoni del cuore"!',