don't show to anons, make it possible to disable notification instance-wide
This commit is contained in:
parent
59d160a6dd
commit
fcf62a13ed
@ -30,7 +30,9 @@ const UpdateNotification = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
shouldShow () {
|
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
|
!this.$store.state.serverSideStorage.flagStorage.dontShowUpdateNotifs
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<Modal
|
<Modal
|
||||||
:is-open="shouldShow"
|
v-if="shouldShow"
|
||||||
|
:is-open="!!shouldShow"
|
||||||
class="UpdateNotification"
|
class="UpdateNotification"
|
||||||
:no-background="true"
|
:no-background="true"
|
||||||
>
|
>
|
||||||
|
@ -41,6 +41,7 @@ const defaultState = {
|
|||||||
logoMargin: '.2em',
|
logoMargin: '.2em',
|
||||||
logoMask: true,
|
logoMask: true,
|
||||||
logoLeft: false,
|
logoLeft: false,
|
||||||
|
disableUpdateNotification: false,
|
||||||
minimalScopesMode: false,
|
minimalScopesMode: false,
|
||||||
nsfwCensorImage: undefined,
|
nsfwCensorImage: undefined,
|
||||||
postContentType: 'text/plain',
|
postContentType: 'text/plain',
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"logoMask": true,
|
"logoMask": true,
|
||||||
"logoLeft": false,
|
"logoLeft": false,
|
||||||
"minimalScopesMode": false,
|
"minimalScopesMode": false,
|
||||||
|
"disableUpdateNotification": false,
|
||||||
"nsfwCensorImage": "",
|
"nsfwCensorImage": "",
|
||||||
"postContentType": "text/plain",
|
"postContentType": "text/plain",
|
||||||
"redirectRootLogin": "/main/friends",
|
"redirectRootLogin": "/main/friends",
|
||||||
|
Loading…
Reference in New Issue
Block a user