parent
6516bd2ade
commit
4277e53433
6 changed files with 101 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue