Verified Commit 491c79ef authored by Eliot Berriot's avatar Eliot Berriot 💬

Merge branch 'master' into develop

parents b75e3076 15eac69d
......@@ -25,7 +25,8 @@ from . import utils
def update_follow(follow, approved):
follow.approved = approved
follow.save(update_fields=["approved"])
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
if approved:
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
class LibraryFollowViewSet(
......
......@@ -123,9 +123,12 @@ def test_user_can_accept_or_reject_own_follows(
assert follow.approved is expected
mocked_dispatch.assert_called_once_with(
{"type": "Accept"}, context={"follow": follow}
)
if action == "accept":
mocked_dispatch.assert_called_once_with(
{"type": "Accept"}, context={"follow": follow}
)
if action == "reject":
mocked_dispatch.assert_not_called()
def test_user_can_list_inbox_items(factories, logged_in_api_client):
......
Added documentation on mono-container docker upgrade (#713)
Fixed constant and unpredictable reordering during file upload (#716)
Display new notifications immediatly on notifications page (#729)
Do not send notification when rejecting a follow on a local library (#743)
......@@ -36,6 +36,39 @@ Docker setup
If you've followed the setup instructions in :doc:`Docker`, upgrade path is
easy:
Mono-container installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Basically, you need to pull the new container image, stop and delete your existing container,
and relaunch a new one:
.. parsed-literal::
export FUNKWHALE_VERSION="|version|"
.. code-block:: shell
docker pull funkwhale/all-in-one:$FUNKWHALE_VERSION
docker stop funkwhale
docker rm funkwhale
docker run \
--name=funkwhale \
--restart=unless-stopped \
--env-file=/srv/funkwhale/.env \
-v /srv/funkwhale/data:/data \
-v /path/to/your/music/dir:/music:ro \
-e PUID=$UID \
-e PGID=$GID \
-p 5000:80 \
-d \
funkwhale/all-in-one:$FUNKWHALE_VERSION
If you are not managing the container directly by hand, but use a third party tool such as Portainer,
instructions will vary, but, as a rule of thumb, pulling the new version of the image, and relaunch
a new container with the same arguments as the previous one (except for the image version) is enough.
Multi-container installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. parsed-literal::
cd /srv/funkwhale
......
......@@ -171,4 +171,13 @@ Then in your .config/ncmpcpp/config, change the startup_screen value so that it
This will show your artists, albums, and playlists when you start ncmpcpp.
[Optional]: enable and start mopidy as a service to start the server at boot.
\ No newline at end of file
[Optional]: enable and start mopidy as a service to start the server at boot.
Mobydick (Desktop)
^^^^^^^^^^^^^^^^^^
- Price: free
- Website: https://github.com/BaptisteGelez/mobydick
Mobydick is a free and open-source desktop application for linux (based on GTK+) to easily download
tracks, albums and discography from a Funkwhale instance.
......@@ -282,15 +282,18 @@ export default {
},
sortedFiles() {
// return errored files on top
return this.files.sort(f => {
return _.sortBy(this.files.map(f => {
let statusIndex = 0
if (f.errored) {
return -5;
statusIndex = -1
}
if (f.success) {
return 5;
statusIndex = 1
}
return 0;
});
f.statusIndex = statusIndex
return f
}), ['statusIndex', 'name'])
}
},
watch: {
......
<template>
<main class="main pusher" v-title="labels.title">
<section class="ui vertical aligned stripe segment">
<div v-if="isLoading" :class="['ui', {'active': isLoading}, 'inverted', 'dimmer']">
<div class="ui text loader"><translate :translate-context="'Content/Notifications/Paragraph'">Loading notifications…</translate></div>
</div>
<div v-else class="ui container">
<div class="ui container">
<h1 class="ui header"><translate :translate-context="'Content/Notifications/Title'">Your notifications</translate></h1>
<div class="ui toggle checkbox">
<input v-model="filters.is_read" type="checkbox">
......@@ -18,7 +15,12 @@
<translate :translate-context="'Content/Notifications/Button.Label/Verb'">Mark all as read</translate>
</div>
<div class="ui hidden divider" />
<table v-if="notifications.count > 0" class="ui table">
<div v-if="isLoading" :class="['ui', {'active': isLoading}, 'inverted', 'dimmer']">
<div class="ui text loader"><translate :translate-context="'Content/Notifications/Paragraph'">Loading notifications…</translate></div>
</div>
<table v-else-if="notifications.count > 0" class="ui table">
<tbody>
<notification-row :item="item" v-for="item in notifications.results" :key="item.id" />
</tbody>
......@@ -42,7 +44,7 @@ export default {
data() {
return {
isLoading: false,
notifications: null,
notifications: {count: 0, results: []},
filters: {
is_read: false
}
......@@ -76,7 +78,8 @@ export default {
}
},
methods: {
handleNewNotification(event) {
handleNewNotification (event) {
this.notifications.count += 1
this.notifications.results.unshift(event.item)
},
fetch(params) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment