From 0d478046dee008b8e6bb154efc898bc74993cade Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 3 Dec 2018 09:41:22 +0900 Subject: [PATCH] Improve usability --- src/client/app/mobile/views/components/ui.nav.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index 0573ad2c26..df4a161e1e 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -95,9 +95,13 @@ export default Vue.extend({ methods: { search() { - const query = window.prompt(this.$t('search')); - if (query == null || query == '') return; - this.$router.push(`/search?q=${encodeURIComponent(query)}`); + this.$root.dialog({ + title: this.$t('search'), + input: true + }).then(({ canceled, result: query }) => { + if (canceled) return; + this.$router.push(`/search?q=${encodeURIComponent(query)}`); + }); }, onReversiInvited() {