diff --git a/api/funkwhale_api/federation/api_views.py b/api/funkwhale_api/federation/api_views.py index 2c7e2658223fe80db5fc3b65b38966e74b4bbbf8..549bac917f843fda93ac4b6056845c64ef6cda5b 100644 --- a/api/funkwhale_api/federation/api_views.py +++ b/api/funkwhale_api/federation/api_views.py @@ -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( diff --git a/api/tests/federation/test_api_views.py b/api/tests/federation/test_api_views.py index feb2ea24685b8e6d56087ecd41489bbef28f7a19..75579d39a2d11d4ac2a1c4207ab30efdb477d470 100644 --- a/api/tests/federation/test_api_views.py +++ b/api/tests/federation/test_api_views.py @@ -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): diff --git a/changes/changelog.d/713.doc b/changes/changelog.d/713.doc new file mode 100644 index 0000000000000000000000000000000000000000..ad3db61a2d261847ede69a0a3e571b823ce3403f --- /dev/null +++ b/changes/changelog.d/713.doc @@ -0,0 +1 @@ +Added documentation on mono-container docker upgrade (#713) diff --git a/changes/changelog.d/716.bugfix b/changes/changelog.d/716.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..1b9b182c93b8dc7984088624fa7ebbc8d1b6c49d --- /dev/null +++ b/changes/changelog.d/716.bugfix @@ -0,0 +1 @@ +Fixed constant and unpredictable reordering during file upload (#716) diff --git a/changes/changelog.d/729.bugfix b/changes/changelog.d/729.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..a0209cb959485cc512968088803b846247c2b63a --- /dev/null +++ b/changes/changelog.d/729.bugfix @@ -0,0 +1 @@ +Display new notifications immediatly on notifications page (#729) diff --git a/changes/changelog.d/743.bugfig b/changes/changelog.d/743.bugfig new file mode 100644 index 0000000000000000000000000000000000000000..5a3ebea0cdb7e16f89ae762bfb6dc33e9b64cb9d --- /dev/null +++ b/changes/changelog.d/743.bugfig @@ -0,0 +1 @@ +Do not send notification when rejecting a follow on a local library (#743) diff --git a/docs/upgrading/index.rst b/docs/upgrading/index.rst index 945319ad31b35263a290d991009cd48338eddbc4..c0a3653f332191a94298d93cc0d9243e69eb0bc7 100644 --- a/docs/upgrading/index.rst +++ b/docs/upgrading/index.rst @@ -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 diff --git a/docs/users/apps.rst b/docs/users/apps.rst index 000ce6ac8621bc65b13a9e0ab7867f9188066fc1..36f47f09a27f735819c770835665e586aa0511a8 100644 --- a/docs/users/apps.rst +++ b/docs/users/apps.rst @@ -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. diff --git a/front/src/components/library/FileUpload.vue b/front/src/components/library/FileUpload.vue index 09297caec33e9756062d48fdbfe7bf3652e5b706..8a867dadf926414e9adac04a0f089a6226fc54ba 100644 --- a/front/src/components/library/FileUpload.vue +++ b/front/src/components/library/FileUpload.vue @@ -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: { diff --git a/front/src/views/Notifications.vue b/front/src/views/Notifications.vue index bee7e5e35dd0b06b6ce12a69b1dc447bce182b87..3f262740c48445fd91c422e04358ac7ad64fdc31 100644 --- a/front/src/views/Notifications.vue +++ b/front/src/views/Notifications.vue @@ -1,10 +1,7 @@ <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) {