mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-16 04:11:55 -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>
|
||||
<figure class="figure has-shadow">
|
||||
<figure class="figure has-shadow is-clickable">
|
||||
<img v-lazy="source" @click="$emit('click')" />
|
||||
</figure>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<control-image
|
||||
:url="album.artwork_url"
|
||||
:caption="album.name"
|
||||
class="is-clickable is-medium"
|
||||
class="is-medium"
|
||||
@click="openDetails"
|
||||
/>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<control-image
|
||||
:url="album.images?.[0]?.url ?? ''"
|
||||
:caption="album.name"
|
||||
class="is-clickable is-medium"
|
||||
class="is-medium"
|
||||
@click="openDetails"
|
||||
/>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<control-image
|
||||
:url="album.artwork_url"
|
||||
:caption="album.name"
|
||||
class="is-clickable is-medium"
|
||||
class="is-medium"
|
||||
@click="openDetails"
|
||||
/>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<control-image
|
||||
:url="track.artwork_url"
|
||||
:caption="track.album"
|
||||
class="is-clickable is-big"
|
||||
class="is-big"
|
||||
:class="{ 'is-masked': playerStore.showLyrics }"
|
||||
@click="openDetails(track)"
|
||||
/>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<control-image
|
||||
:url="album.artwork_url"
|
||||
:caption="album.name"
|
||||
class="is-clickable is-medium"
|
||||
class="is-medium"
|
||||
@click="openDetails"
|
||||
/>
|
||||
</template>
|
||||
|
@ -118,17 +118,13 @@ export default {
|
||||
this.$router.push({ name: 'search-library' })
|
||||
},
|
||||
searchNext({ loaded }) {
|
||||
const [type] = this.types,
|
||||
items = this.results.get(type)
|
||||
const items = this.results.get(this.types[0])
|
||||
this.parameters.limit = PAGE_SIZE_EXPANDED
|
||||
this.searchItems().then((data) => {
|
||||
const [next] = Object.values(data)
|
||||
items.items.push(...next.items)
|
||||
items.total = next.total
|
||||
if (!this.parameters.offset) {
|
||||
this.parameters.offset = 0
|
||||
}
|
||||
this.parameters.offset += next.limit
|
||||
this.parameters.offset = (this.parameters.offset || 0) + next.limit
|
||||
loaded(next.items.length, PAGE_SIZE_EXPANDED)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user