refs #2088 Add notification preference for status notification
This commit is contained in:
parent
a2a58a3ead
commit
136e9db4b6
|
@ -14,7 +14,8 @@ const state = (): NotificationState => {
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +63,8 @@ describe('Preferences/Notification', () => {
|
|||
favourite: false,
|
||||
follow: false,
|
||||
follow_request: false,
|
||||
reaction: false
|
||||
reaction: false,
|
||||
status: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +81,8 @@ describe('Preferences/Notification', () => {
|
|||
favourite: false,
|
||||
follow: false,
|
||||
follow_request: false,
|
||||
reaction: false
|
||||
reaction: false,
|
||||
status: false
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -107,7 +110,8 @@ describe('Preferences/Notification', () => {
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
}
|
||||
})
|
||||
expect(App.actions.loadPreferences).toBeCalled()
|
||||
|
|
|
@ -11,7 +11,8 @@ describe('Preferences/Notification', () => {
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +24,20 @@ describe('Preferences/Notification', () => {
|
|||
reply: false,
|
||||
reblog: false,
|
||||
favourite: false,
|
||||
follow: false
|
||||
follow: false,
|
||||
follow_request: false,
|
||||
reaction: false,
|
||||
status: false
|
||||
}
|
||||
})
|
||||
expect(state.notification.notify).toEqual({
|
||||
reply: false,
|
||||
reblog: false,
|
||||
favourite: false,
|
||||
follow: false
|
||||
follow: false,
|
||||
follow_request: false,
|
||||
reaction: false,
|
||||
status: false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -194,7 +194,9 @@
|
|||
"reblog": "Notify me when I receive a reblog",
|
||||
"favourite": "Notify me when I receive a favourite",
|
||||
"follow": "Notify me when I receive a follow",
|
||||
"reaction": "Notify me when I receive a emoji reaction"
|
||||
"reaction": "Notify me when I receive a emoji reaction",
|
||||
"follow_request": "Notify me when I receive a follow request",
|
||||
"status": "Notify me when I receive a status notification"
|
||||
}
|
||||
},
|
||||
"account": {
|
||||
|
|
|
@ -48,7 +48,8 @@ const notify: Notify = {
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
}
|
||||
|
||||
const language: LanguageSet = {
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<el-form-item for="notifyFollowRequest" :label="$t('preferences.notification.enable.follow_request')">
|
||||
<el-switch v-model="notifyFollowRequest" active-color="#13ce66"> </el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item for="notifyStatus" :label="$t('preferences.notification.enable.status')">
|
||||
<el-switch v-model="notifyStatus" active-color="#13ce66"> </el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -88,6 +91,16 @@ export default {
|
|||
reaction: value
|
||||
})
|
||||
}
|
||||
},
|
||||
notifyStatus: {
|
||||
get() {
|
||||
return this.$store.state.Preferences.Notification.notification.notify.status
|
||||
},
|
||||
set(value) {
|
||||
this.$store.dispatch('Preferences/Notification/updateNotify', {
|
||||
status: value
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -39,7 +39,8 @@ const state = (): AppState => ({
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
},
|
||||
tootPadding: 8,
|
||||
timeFormat: TimeFormat.Absolute.value,
|
||||
|
|
|
@ -18,7 +18,8 @@ const state: NotificationState = {
|
|||
favourite: true,
|
||||
follow: true,
|
||||
follow_request: true,
|
||||
reaction: true
|
||||
reaction: true,
|
||||
status: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ export type Notify = {
|
|||
follow: boolean
|
||||
follow_request: boolean
|
||||
reaction: boolean
|
||||
status: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue