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