From 4277e5343349c6000e626c490578d4e9bef71404 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 28 Jul 2019 04:44:09 +0900 Subject: 通知のフィルタ (#5224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :v: * Deck --- .../app/desktop/views/components/notifications.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/client/app/desktop/views/components') diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue index b25f122e0e..0238587034 100644 --- a/src/client/app/desktop/views/components/notifications.vue +++ b/src/client/app/desktop/views/components/notifications.vue @@ -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); -- cgit v1.2.3-freya