Added info page

This commit is contained in:
Shiny Nematoda 2022-06-30 14:31:11 +00:00
parent 2b55ff908f
commit 466068ae12
No known key found for this signature in database
GPG key ID: 6506D50F5613A42D
5 changed files with 73 additions and 34 deletions

View file

@ -11,6 +11,7 @@ import Search from './components/Search.vue';
import NewPlaylist from './components/NewPlaylist.vue';
import Playlists from './components/Playlists.vue';
import Lyrics from './components/Lyrics.vue';
import Info from './components/Info.vue';
import Artist from './components/Artist.vue';
import Prefs from './components/Prefs.vue';
@ -29,6 +30,7 @@ const data = reactive({
songItems: null,
items: {},
title: '',
description: '',
artist: '',
artistUrl: '',
state: 'play',
@ -36,6 +38,7 @@ const data = reactive({
time: 0,
showplaylist: false,
showlyrics: false,
showinfo: false,
loop: false,
lyrics: '',
});
@ -172,6 +175,7 @@ async function getSong(e) {
console.log(json);
data.artUrl = json.thumbnailUrl;
data.description = json.description;
data.cover = `--art: url(${json.thumbnailUrl});`;
data.nowtitle = json.title;
data.nowartist = json.uploader.split(' - ')[0];
@ -489,6 +493,8 @@ onMounted(() => {
:curl="data.url"
:iniurl="data.urls[0]?.url" />
<Info v-if="data.showinfo" :text="data.description" />
<StatusBar
@play="playPause"
@vol="setVolume"