mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 13:08:01 +02:00
fix subsribers/subs on artist page
This commit is contained in:
parent
54e8f2b245
commit
c1f8da9782
4 changed files with 22 additions and 10 deletions
|
@ -1,13 +1,15 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onMounted, onUpdated, ref } from 'vue';
|
||||
import Btn from './Btn.vue';
|
||||
|
||||
import { useStore } from '@/scripts/util.js';
|
||||
import { useResults, useArtist } from '@/stores/results.js';
|
||||
import { useI18n } from '@/stores/misc.js';
|
||||
|
||||
const artist = useArtist(),
|
||||
results = useResults(),
|
||||
store = useStore();
|
||||
store = useStore(),
|
||||
{ t } = useI18n();
|
||||
|
||||
const subs = JSON.parse(store.subs ? store.subs : '[]'),
|
||||
hash = artist.state.hash,
|
||||
|
@ -41,9 +43,9 @@ function Sub() {
|
|||
@click="
|
||||
results.getAlbum('/playlist?list=' + artist.state.playlistId)
|
||||
" />
|
||||
<span class="us-box subs" :data-active="isSub" @click="Sub">{{
|
||||
artist.state.subscriberCount || 0
|
||||
}}</span>
|
||||
<span class="us-box subs" :data-active="isSub" :data-subs-l="t('artist.subscribers')" :data-subs="t('artist.subs')" @click="Sub">
|
||||
{{ artist.state.subscriberCount || 0 }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -105,7 +107,7 @@ p.more {
|
|||
transition: background-color 0.4s ease, color 0.4s ease;
|
||||
}
|
||||
.subs::after {
|
||||
content: ' Subscribers';
|
||||
content: ' ' attr(data-subs-l);
|
||||
font-weight: bold;
|
||||
}
|
||||
.subs:hover,
|
||||
|
@ -116,7 +118,7 @@ p.more {
|
|||
}
|
||||
@media (max-width: 400px) {
|
||||
.subs::after {
|
||||
content: ' Subs';
|
||||
content: ' ' attr(data-subs);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue