mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-16 20:31:59 -04:00
[web] Simplify image control
This commit is contained in:
parent
708370aab9
commit
af632f4304
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<figure class="figure has-shadow">
|
<figure class="figure has-shadow is-clickable">
|
||||||
<img v-lazy="source" @click="$emit('click')" />
|
<img v-lazy="source" @click="$emit('click')" />
|
||||||
</figure>
|
</figure>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<control-image
|
<control-image
|
||||||
:url="album.artwork_url"
|
:url="album.artwork_url"
|
||||||
:caption="album.name"
|
:caption="album.name"
|
||||||
class="is-clickable is-medium"
|
class="is-medium"
|
||||||
@click="openDetails"
|
@click="openDetails"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<control-image
|
<control-image
|
||||||
:url="album.images?.[0]?.url ?? ''"
|
:url="album.images?.[0]?.url ?? ''"
|
||||||
:caption="album.name"
|
:caption="album.name"
|
||||||
class="is-clickable is-medium"
|
class="is-medium"
|
||||||
@click="openDetails"
|
@click="openDetails"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<control-image
|
<control-image
|
||||||
:url="album.artwork_url"
|
:url="album.artwork_url"
|
||||||
:caption="album.name"
|
:caption="album.name"
|
||||||
class="is-clickable is-medium"
|
class="is-medium"
|
||||||
@click="openDetails"
|
@click="openDetails"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<control-image
|
<control-image
|
||||||
:url="track.artwork_url"
|
:url="track.artwork_url"
|
||||||
:caption="track.album"
|
:caption="track.album"
|
||||||
class="is-clickable is-big"
|
class="is-big"
|
||||||
:class="{ 'is-masked': playerStore.showLyrics }"
|
:class="{ 'is-masked': playerStore.showLyrics }"
|
||||||
@click="openDetails(track)"
|
@click="openDetails(track)"
|
||||||
/>
|
/>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<control-image
|
<control-image
|
||||||
:url="album.artwork_url"
|
:url="album.artwork_url"
|
||||||
:caption="album.name"
|
:caption="album.name"
|
||||||
class="is-clickable is-medium"
|
class="is-medium"
|
||||||
@click="openDetails"
|
@click="openDetails"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -118,17 +118,13 @@ export default {
|
|||||||
this.$router.push({ name: 'search-library' })
|
this.$router.push({ name: 'search-library' })
|
||||||
},
|
},
|
||||||
searchNext({ loaded }) {
|
searchNext({ loaded }) {
|
||||||
const [type] = this.types,
|
const items = this.results.get(this.types[0])
|
||||||
items = this.results.get(type)
|
|
||||||
this.parameters.limit = PAGE_SIZE_EXPANDED
|
this.parameters.limit = PAGE_SIZE_EXPANDED
|
||||||
this.searchItems().then((data) => {
|
this.searchItems().then((data) => {
|
||||||
const [next] = Object.values(data)
|
const [next] = Object.values(data)
|
||||||
items.items.push(...next.items)
|
items.items.push(...next.items)
|
||||||
items.total = next.total
|
items.total = next.total
|
||||||
if (!this.parameters.offset) {
|
this.parameters.offset = (this.parameters.offset || 0) + next.limit
|
||||||
this.parameters.offset = 0
|
|
||||||
}
|
|
||||||
this.parameters.offset += next.limit
|
|
||||||
loaded(next.items.length, PAGE_SIZE_EXPANDED)
|
loaded(next.items.length, PAGE_SIZE_EXPANDED)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user