diff --git a/web/src/views/UserPresence.vue b/web/src/views/UserPresence.vue index 0cd3748..bdce10f 100644 --- a/web/src/views/UserPresence.vue +++ b/web/src/views/UserPresence.vue @@ -96,11 +96,12 @@ On-line - + + mdi-map-marker-account {{ userPresence.local }} - Próximo ao AP + mdi-access-point {{ userPresence.apName }} @@ -291,13 +292,15 @@ export default { watch: { search(newValue) { - if (!newValue) this.$router.push({ query: {} }) - else if (this.$route.query.search != newValue) - this.$router.push({ query: { search: newValue } }) + if (this.$route.query.search != newValue) this.updateQuery() + }, + onlyServants(newValue) { + if (this.$route.query.onlyServants != newValue) this.updateQuery() } }, mounted() { this.search = this.$route.query.search || '' + this.onlyServants = this.$route.query.onlyServants === 'true' }, apollo: { userPresence: { @@ -357,6 +360,14 @@ export default { RECENT: 'warning lighten-1', OFFLINE: 'offline' }[status] + }, + updateQuery() { + this.$router.replace({ + query: { + search: this.search, + onlyServants: this.onlyServants + } + }) } } }