1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-05 10:18:42 +09:00

Improve usability

This commit is contained in:
syuilo 2018-12-03 09:41:22 +09:00
parent f3479d1b98
commit 0d478046de
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -95,9 +95,13 @@ export default Vue.extend({
methods: { methods: {
search() { search() {
const query = window.prompt(this.$t('search')); this.$root.dialog({
if (query == null || query == '') return; title: this.$t('search'),
this.$router.push(`/search?q=${encodeURIComponent(query)}`); input: true
}).then(({ canceled, result: query }) => {
if (canceled) return;
this.$router.push(`/search?q=${encodeURIComponent(query)}`);
});
}, },
onReversiInvited() { onReversiInvited() {