mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
change server port to localhost 1970
+ change img server to localhost 1971 + add loading = lazy to images
This commit is contained in:
@@ -7,9 +7,15 @@
|
|||||||
class="rect rounded"
|
class="rect rounded"
|
||||||
:src="paths.images.thumb + images.album"
|
:src="paths.images.thumb + images.album"
|
||||||
alt=""
|
alt=""
|
||||||
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
<div class="circle"></div>
|
<div class="circle"></div>
|
||||||
<img class="circle" :src="paths.images.artist + images.artist" alt="" />
|
<img
|
||||||
|
class="circle"
|
||||||
|
:src="paths.images.artist + images.artist"
|
||||||
|
alt=""
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="bio rounded bg-black" v-html="bio" v-if="bio"></div>
|
<div class="bio rounded bg-black" v-html="bio" v-if="bio"></div>
|
||||||
<div class="bio rounded bg-black" v-else>No bio found</div>
|
<div class="bio rounded bg-black" v-else>No bio found</div>
|
||||||
|
|||||||
@@ -9,7 +9,12 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="art rounded">
|
<div class="art rounded">
|
||||||
<img :src="imguri + album.image" alt="" class="rounded shadow-lg" />
|
<img
|
||||||
|
:src="imguri + album.image"
|
||||||
|
alt=""
|
||||||
|
class="rounded shadow-lg"
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="info" :class="{ nocontrast: isLight(album.colors[0]) }">
|
<div class="info" :class="{ nocontrast: isLight(album.colors[0]) }">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
:src="imguri + track.image"
|
:src="imguri + track.image"
|
||||||
alt=""
|
alt=""
|
||||||
class="l-image rounded force-lm"
|
class="l-image rounded force-lm"
|
||||||
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="heading">Similar tracks</div>
|
<div class="heading">Similar tracks</div>
|
||||||
<div class="tracks">
|
<div class="tracks">
|
||||||
<div class="song-item" v-for="song in songs" :key="song.artist">
|
<div class="song-item" v-for="song in songs" :key="song.artist">
|
||||||
<img src="" class="rounded" />
|
<img src="" class="rounded" loading="lazy"/>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<div class="title">{{ song.title }}</div>
|
<div class="title">{{ song.title }}</div>
|
||||||
<div class="artist">{{ song.artist }}</div>
|
<div class="artist">{{ song.artist }}</div>
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-search">
|
<div class="right-search">
|
||||||
<TabsWrapper>
|
<TabsWrapper>
|
||||||
<Tab name="Top Results">
|
|
||||||
<ArtistGrid />
|
|
||||||
</Tab>
|
|
||||||
<Tab name="tracks">
|
<Tab name="tracks">
|
||||||
<TracksGrid />
|
<TracksGrid />
|
||||||
</Tab>
|
</Tab>
|
||||||
@@ -13,9 +10,6 @@
|
|||||||
<Tab name="artists">
|
<Tab name="artists">
|
||||||
<ArtistGrid />
|
<ArtistGrid />
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab name="Playlists">
|
|
||||||
<ArtistGrid />
|
|
||||||
</Tab>
|
|
||||||
</TabsWrapper>
|
</TabsWrapper>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xartist" :class="{ _is_on_sidebar: alt }">
|
<div class="xartist" :class="{ _is_on_sidebar: alt }">
|
||||||
<img class="artist-image shadow-sm" :src="imguri + artist.image" alt="" />
|
<img
|
||||||
|
class="artist-image shadow-sm"
|
||||||
|
:src="imguri + artist.image"
|
||||||
|
alt=""
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
<div>
|
<div>
|
||||||
<p class="artist-name t-center ellipsis">{{ artist.name }}</p>
|
<p class="artist-name t-center ellipsis">{{ artist.name }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div @click="emitUpdate(track)" class="thumbnail">
|
<div @click="emitUpdate(track)" class="thumbnail">
|
||||||
<img
|
<img
|
||||||
|
loading="lazy"
|
||||||
:src="imguri + track.image"
|
:src="imguri + track.image"
|
||||||
alt=""
|
alt=""
|
||||||
class="album-art image rounded"
|
class="album-art image rounded"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { reactive } from "vue";
|
|||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const settings = reactive({
|
const settings = reactive({
|
||||||
uri: "http://127.0.0.1:9876",
|
uri: "http://127.0.0.1:1970",
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
const paths = {
|
const paths = {
|
||||||
api: "",
|
api: "",
|
||||||
images: {
|
images: {
|
||||||
thumb: "http://0.0.0.0:9877/t/",
|
thumb: "http://0.0.0.0:1971/t/",
|
||||||
artist: "http://0.0.0.0:9877/a/",
|
artist: "http://0.0.0.0:1971/a/",
|
||||||
playlist: "http://0.0.0.0:9877/p/"
|
playlist: "http://0.0.0.0:1971/p/"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+21
-9
@@ -18,7 +18,7 @@ const routes = [
|
|||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
component: Home,
|
component: Home,
|
||||||
redirect: '/folder/$home'
|
redirect: "/folder/$home",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/folder/:path",
|
path: "/folder/:path",
|
||||||
@@ -26,8 +26,11 @@ const routes = [
|
|||||||
component: FolderView,
|
component: FolderView,
|
||||||
beforeEnter: async (to) => {
|
beforeEnter: async (to) => {
|
||||||
state.loading.value = true;
|
state.loading.value = true;
|
||||||
await useFStore().fetchAll(to.params.path);
|
await useFStore()
|
||||||
state.loading.value = false;
|
.fetchAll(to.params.path)
|
||||||
|
.then(() => {
|
||||||
|
state.loading.value = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -40,8 +43,11 @@ const routes = [
|
|||||||
component: Playlists,
|
component: Playlists,
|
||||||
beforeEnter: async () => {
|
beforeEnter: async () => {
|
||||||
state.loading.value = true;
|
state.loading.value = true;
|
||||||
await usePStore().fetchAll();
|
await usePStore()
|
||||||
state.loading.value = false;
|
.fetchAll()
|
||||||
|
.then(() => {
|
||||||
|
state.loading.value = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,8 +56,11 @@ const routes = [
|
|||||||
component: PlaylistView,
|
component: PlaylistView,
|
||||||
beforeEnter: async (to) => {
|
beforeEnter: async (to) => {
|
||||||
state.loading.value = true;
|
state.loading.value = true;
|
||||||
await usePTrackStore().fetchAll(to.params.pid);
|
await usePTrackStore()
|
||||||
state.loading.value = false;
|
.fetchAll(to.params.pid)
|
||||||
|
.then(() => {
|
||||||
|
state.loading.value = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -65,8 +74,11 @@ const routes = [
|
|||||||
component: AlbumView,
|
component: AlbumView,
|
||||||
beforeEnter: async (to) => {
|
beforeEnter: async (to) => {
|
||||||
state.loading.value = true;
|
state.loading.value = true;
|
||||||
await useAStore().fetchTracksAndArtists(to.params.hash);
|
await useAStore()
|
||||||
state.loading.value = false;
|
.fetchTracksAndArtists(to.params.hash)
|
||||||
|
.then(() => {
|
||||||
|
state.loading.value = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
src="../assets/images/folder.webp"
|
src="../assets/images/folder.webp"
|
||||||
alt="folder page banner"
|
alt=""
|
||||||
class="rounded"
|
class="rounded"
|
||||||
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<FolderList :folders="FStore.dirs" v-if="FStore.dirs.length" />
|
<FolderList :folders="FStore.dirs" v-if="FStore.dirs.length" />
|
||||||
|
|||||||
Reference in New Issue
Block a user