通知のフィルタ (#5224)

* ✌️

* Deck
This commit is contained in:
syuilo 2019-07-28 04:44:09 +09:00 committed by GitHub
parent 6516bd2ade
commit 4277e53433
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 101 additions and 8 deletions

View file

@ -47,12 +47,22 @@ export default Vue.extend({
}),
],
props: {
type: {
type: String,
required: false
}
},
data() {
return {
connection: null,
pagination: {
endpoint: 'i/notifications',
limit: 20,
params: () => ({
includeTypes: this.type ? [this.type] : undefined
})
}
};
},
@ -69,6 +79,12 @@ export default Vue.extend({
}
},
watch: {
type() {
this.reload();
}
},
mounted() {
this.connection = this.$root.stream.useSharedConnection('main');
this.connection.on('notification', this.onNotification);