diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-16 08:45:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-16 08:45:10 +0900 |
| commit | b7c5c71c6fdd139406166cff697a4e94bb11384a (patch) | |
| tree | 16a70a2655782dc5f26f858651c494b10ef7771b /src/client/app/desktop | |
| parent | Format uptimes (#3629) (diff) | |
| download | misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.tar.gz misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.tar.bz2 misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.zip | |
[Client] Resolve #2951
あと検索フォームでサジェストを有効に
Diffstat (limited to 'src/client/app/desktop')
| -rw-r--r-- | src/client/app/desktop/views/components/post-form.vue | 4 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/ui.header.search.vue | 15 | ||||
| -rw-r--r-- | src/client/app/desktop/views/widgets/post-form.vue | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index c2f6a94f7f..0e86bbf9f8 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -17,12 +17,12 @@ <a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)" :title="$t('click-to-tagging')">#{{ tag }}</a> </div> <div class="local-only" v-if="localOnly == true">{{ $t('local-only-message') }}</div> - <input v-show="useCw" ref="cw" v-model="cw" :placeholder="$t('annotations')" v-autocomplete="'cw'"> + <input v-show="useCw" ref="cw" v-model="cw" :placeholder="$t('annotations')" v-autocomplete="{ model: 'cw' }"> <div class="textarea"> <textarea :class="{ with: (files.length != 0 || poll) }" ref="text" v-model="text" :disabled="posting" @keydown="onKeydown" @paste="onPaste" :placeholder="placeholder" - v-autocomplete="'text'" + v-autocomplete="{ model: 'text' }" ></textarea> <button class="emoji" @click="emoji" ref="emoji"> <fa :icon="['far', 'laugh']"/> diff --git a/src/client/app/desktop/views/components/ui.header.search.vue b/src/client/app/desktop/views/components/ui.header.search.vue index ede9f9da0f..c2f9eab0ac 100644 --- a/src/client/app/desktop/views/components/ui.header.search.vue +++ b/src/client/app/desktop/views/components/ui.header.search.vue @@ -1,7 +1,7 @@ <template> -<form class="search" @submit.prevent="onSubmit"> +<form class="wlvfdpkp" @submit.prevent="onSubmit"> <i><fa icon="search"/></i> - <input v-model="q" type="search" :placeholder="$t('placeholder')"/> + <input v-model="q" type="search" :placeholder="$t('placeholder')" v-autocomplete="{ model: 'q' }"/> <div class="result"></div> </form> </template> @@ -19,10 +19,13 @@ export default Vue.extend({ }, methods: { onSubmit() { - if (this.q.startsWith('#')) { - this.$router.push(`/tags/${encodeURIComponent(this.q.substr(1))}`); + const q = this.q.trim(); + if (q.startsWith('@')) { + this.$router.push(`/${q}`); + } else if (q.startsWith('#')) { + this.$router.push(`/tags/${encodeURIComponent(q.substr(1))}`); } else { - this.$router.push(`/search?q=${encodeURIComponent(this.q)}`); + this.$router.push(`/search?q=${encodeURIComponent(q)}`); } } } @@ -30,7 +33,7 @@ export default Vue.extend({ </script> <style lang="stylus" scoped> -.search +.wlvfdpkp @media (max-width 800px) display none !important diff --git a/src/client/app/desktop/views/widgets/post-form.vue b/src/client/app/desktop/views/widgets/post-form.vue index 622e5c3345..e409760aaf 100644 --- a/src/client/app/desktop/views/widgets/post-form.vue +++ b/src/client/app/desktop/views/widgets/post-form.vue @@ -15,7 +15,7 @@ @paste="onPaste" :placeholder="placeholder" ref="text" - v-autocomplete="'text'" + v-autocomplete="{ model: 'text' }" ></textarea> <button class="emoji" @click="emoji" ref="emoji"> <fa :icon="['far', 'laugh']"/> |