Merge branch 'master' into develop
This commit is contained in:
commit
98f4edeeb3
|
@ -56,6 +56,10 @@ def serve_spa(request):
|
||||||
|
|
||||||
|
|
||||||
def get_spa_html(spa_url):
|
def get_spa_html(spa_url):
|
||||||
|
if spa_url.startswith("/"):
|
||||||
|
# we try to open a local file
|
||||||
|
with open(spa_url) as f:
|
||||||
|
return f.read()
|
||||||
cache_key = "spa-html:{}".format(spa_url)
|
cache_key = "spa-html:{}".format(spa_url)
|
||||||
cached = caches["local"].get(cache_key)
|
cached = caches["local"].get(cache_key)
|
||||||
if cached:
|
if cached:
|
||||||
|
|
|
@ -126,6 +126,12 @@ def test_get_spa_html_from_http(local_cache, r_mock, mocker, settings):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_spa_html_from_disk(tmpfile):
|
||||||
|
with open(tmpfile.name, "wb") as f:
|
||||||
|
f.write(b"hello world")
|
||||||
|
assert middleware.get_spa_html(tmpfile.name) == "hello world"
|
||||||
|
|
||||||
|
|
||||||
def test_get_route_head_tags(mocker, settings):
|
def test_get_route_head_tags(mocker, settings):
|
||||||
match = mocker.Mock(args=[], kwargs={"pk": 42}, func=mocker.Mock())
|
match = mocker.Mock(args=[], kwargs={"pk": 42}, func=mocker.Mock())
|
||||||
resolve = mocker.patch("django.urls.resolve", return_value=match)
|
resolve = mocker.patch("django.urls.resolve", return_value=match)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixed resizing issues for album cards on artist pages (#694)
|
|
@ -0,0 +1 @@
|
||||||
|
Can now use a local file with FUNKWHALE_SPA_HTML_ROOT to avoid sending an HTTP request (#705)
|
|
@ -22,7 +22,8 @@
|
||||||
<td class="play-cell">
|
<td class="play-cell">
|
||||||
<play-button class="basic icon" :track="track" :discrete="true"></play-button>
|
<play-button class="basic icon" :track="track" :discrete="true"></play-button>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="6">
|
<td class="content-cell" colspan="5">
|
||||||
|
<track-favorite-icon :track="track"></track-favorite-icon>
|
||||||
<router-link class="track discrete link" :to="{name: 'library.tracks.detail', params: {id: track.id }}">
|
<router-link class="track discrete link" :to="{name: 'library.tracks.detail', params: {id: track.id }}">
|
||||||
<template v-if="track.position">
|
<template v-if="track.position">
|
||||||
{{ track.position }}.
|
{{ track.position }}.
|
||||||
|
@ -30,9 +31,6 @@
|
||||||
{{ track.title }}
|
{{ track.title }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<track-favorite-icon :track="track"></track-favorite-icon>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -92,16 +90,28 @@ export default {
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.content-cell {
|
||||||
table.fixed td.play-cell {
|
.link,
|
||||||
overflow: auto;
|
.button {
|
||||||
|
padding: 0.5em 0;
|
||||||
|
}
|
||||||
|
.link {
|
||||||
|
margin-left: 0.5em;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tr {
|
tr {
|
||||||
.favorite-icon:not(.favorited) {
|
.favorite-icon:not(.favorited) {
|
||||||
display: none;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
&:hover .favorite-icon {
|
&:hover .favorite-icon {
|
||||||
display: inherit;
|
visibility: visible;
|
||||||
|
}
|
||||||
|
.favorite-icon {
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.expand {
|
.expand {
|
||||||
|
|
|
@ -44,10 +44,8 @@
|
||||||
<h2>
|
<h2>
|
||||||
<translate>Albums by this artist</translate>
|
<translate>Albums by this artist</translate>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="ui stackable doubling three column grid">
|
<div class="ui cards" >
|
||||||
<div class="column" :key="album.id" v-for="album in albums">
|
<album-card :mode="'rich'" :album="album" :key="album.id" v-for="album in albums"></album-card>
|
||||||
<album-card :mode="'rich'" class="fluid" :album="album"></album-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section v-if="tracks.length > 0" class="ui vertical stripe segment">
|
<section v-if="tracks.length > 0" class="ui vertical stripe segment">
|
||||||
|
|
Loading…
Reference in New Issue