logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: fcf62a13ed49359b6bc2e82e8d05f55bfe914803
parent 59d160a6dd6dd1493494f28daf9c1ad44a3ce8e0
Author: Henry Jameson <me@hjkos.com>
Date:   Mon,  8 Aug 2022 02:01:07 +0300

don't show to anons, make it possible to disable notification instance-wide

Diffstat:

Msrc/components/update_notification/update_notification.js4+++-
Msrc/components/update_notification/update_notification.vue3++-
Msrc/modules/instance.js1+
Mstatic/config.json1+
4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/components/update_notification/update_notification.js b/src/components/update_notification/update_notification.js @@ -30,7 +30,9 @@ const UpdateNotification = { } }, shouldShow () { - return this.$store.state.serverSideStorage.flagStorage.updateCounter < CURRENT_UPDATE_COUNTER && + return !this.$store.state.instance.disableUpdateNotification && + this.$store.state.currentUser && + this.$store.state.serverSideStorage.flagStorage.updateCounter < CURRENT_UPDATE_COUNTER && !this.$store.state.serverSideStorage.flagStorage.dontShowUpdateNotifs } }, diff --git a/src/components/update_notification/update_notification.vue b/src/components/update_notification/update_notification.vue @@ -1,6 +1,7 @@ <template> <Modal - :is-open="shouldShow" + v-if="shouldShow" + :is-open="!!shouldShow" class="UpdateNotification" :no-background="true" > diff --git a/src/modules/instance.js b/src/modules/instance.js @@ -41,6 +41,7 @@ const defaultState = { logoMargin: '.2em', logoMask: true, logoLeft: false, + disableUpdateNotification: false, minimalScopesMode: false, nsfwCensorImage: undefined, postContentType: 'text/plain', diff --git a/static/config.json b/static/config.json @@ -14,6 +14,7 @@ "logoMask": true, "logoLeft": false, "minimalScopesMode": false, + "disableUpdateNotification": false, "nsfwCensorImage": "", "postContentType": "text/plain", "redirectRootLogin": "/main/friends",