Improve usability

This commit is contained in:
syuilo 2018-12-03 09:41:22 +09:00
parent 2f4416ef1c
commit bbf5305196

View File

@ -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() {