mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 21:18:01 +02:00
fix subsribers/subs on artist page
This commit is contained in:
parent
75f8019b97
commit
abc35e736d
3 changed files with 13 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { onMounted, onUpdated, ref } from 'vue';
|
||||||
import Btn from './Btn.vue';
|
import Btn from './Btn.vue';
|
||||||
|
|
||||||
import { useStore } from '@/scripts/util.js';
|
import { useStore } from '@/scripts/util.js';
|
||||||
|
@ -10,7 +10,8 @@ import { useI18n } from '@/stores/misc.js';
|
||||||
const artist = useArtist(),
|
const artist = useArtist(),
|
||||||
results = useResults(),
|
results = useResults(),
|
||||||
store = useStore(),
|
store = useStore(),
|
||||||
{ t } = useI18n();
|
{ t } = useI18n(),
|
||||||
|
windowWidth = window.innerWidth;
|
||||||
|
|
||||||
const subs = JSON.parse(store.subs ? store.subs : '[]'),
|
const subs = JSON.parse(store.subs ? store.subs : '[]'),
|
||||||
hash = artist.state.hash,
|
hash = artist.state.hash,
|
||||||
|
@ -45,7 +46,12 @@ function Sub() {
|
||||||
results.getAlbum('/playlist?list=' + artist.state.playlistId)
|
results.getAlbum('/playlist?list=' + artist.state.playlistId)
|
||||||
" />
|
" />
|
||||||
<span class="us-box subs" :data-active="isSub" @click="Sub">
|
<span class="us-box subs" :data-active="isSub" @click="Sub">
|
||||||
{{ artist.state.subscriberCount || 0 }} {{ t('artist.subscribers') }}
|
<template v-if="windowWidth > 400">
|
||||||
|
{{ artist.state.subscriberCount || 0 }} {{ t('artist.subscribers') }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ artist.state.subscriberCount || 0 }} {{ t('artist.subs') }}
|
||||||
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -113,9 +119,4 @@ p.more {
|
||||||
color: var(--color-background);
|
color: var(--color-background);
|
||||||
background-clip: border-box;
|
background-clip: border-box;
|
||||||
}
|
}
|
||||||
@media (max-width: 400px) {
|
|
||||||
.subs::after {
|
|
||||||
content: ' Subs';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
"select": "Hinzufügende Wiedergabeliste auswählen"
|
"select": "Hinzufügende Wiedergabeliste auswählen"
|
||||||
},
|
},
|
||||||
"artist": {
|
"artist": {
|
||||||
"subscribers": "Abonnenten"
|
"subscribers": "Abonnenten",
|
||||||
|
"subs": "Abos"
|
||||||
},
|
},
|
||||||
"pref": {
|
"pref": {
|
||||||
"worst": "schlechteste",
|
"worst": "schlechteste",
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
"select": "Select Playlist to Add"
|
"select": "Select Playlist to Add"
|
||||||
},
|
},
|
||||||
"artist": {
|
"artist": {
|
||||||
"subscribers": "Subscribers"
|
"subscribers": "Subscribers",
|
||||||
|
"subs": "Subs"
|
||||||
},
|
},
|
||||||
"pref": {
|
"pref": {
|
||||||
"theme": "Theme",
|
"theme": "Theme",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue