通知のフィルタ (#5224)

* ✌️

* Deck
This commit is contained in:
syuilo
2019-07-28 04:44:09 +09:00
committed by GitHub
parent 6516bd2ade
commit 4277e53433
6 changed files with 101 additions and 8 deletions

View File

@@ -153,6 +153,13 @@ export default Vue.extend({
paging({}),
],
props: {
type: {
type: String,
required: false
}
},
data() {
return {
connection: null,
@@ -160,6 +167,9 @@ export default Vue.extend({
pagination: {
endpoint: 'i/notifications',
limit: 10,
params: () => ({
includeTypes: this.type ? [this.type] : undefined
})
}
};
},
@@ -176,6 +186,12 @@ export default Vue.extend({
}
},
watch: {
type() {
this.reload();
}
},
mounted() {
this.connection = this.$root.stream.useSharedConnection('main');
this.connection.on('notification', this.onNotification);