diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-02-19 21:40:09 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-02-19 21:40:09 +0900 |
| commit | eefbe097c0e810bbda4108b4235b32bf0456b06f (patch) | |
| tree | 001c5fc97cbd38caa4c9eaee17c2c043b491a792 /src/client | |
| parent | unisonReload (diff) | |
| download | sharkey-eefbe097c0e810bbda4108b4235b32bf0456b06f.tar.gz sharkey-eefbe097c0e810bbda4108b4235b32bf0456b06f.tar.bz2 sharkey-eefbe097c0e810bbda4108b4235b32bf0456b06f.zip | |
Resolve #7222
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/pages/search.vue | 1 | ||||
| -rw-r--r-- | src/client/ui/chat/index.vue | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/client/pages/search.vue b/src/client/pages/search.vue index ed92243cd2..5e79531b20 100644 --- a/src/client/pages/search.vue +++ b/src/client/pages/search.vue @@ -28,6 +28,7 @@ export default defineComponent({ limit: 10, params: () => ({ query: this.$route.query.q, + channelId: this.$route.query.channel, }) }, }; diff --git a/src/client/ui/chat/index.vue b/src/client/ui/chat/index.vue index 79c0d53074..44f47447a7 100644 --- a/src/client/ui/chat/index.vue +++ b/src/client/ui/chat/index.vue @@ -99,7 +99,10 @@ <div class="right"> <div class="instance">{{ instanceName }}</div> <XHeaderClock class="clock"/> - <button class="_button button search" @click="search" v-tooltip="$ts.search"> + <button class="_button button search" v-if="tl.startsWith('channel:') && currentChannel" @click="inChannelSearch" v-tooltip="$ts.inChannelSearch"> + <Fa :icon="faSearch"/> + </button> + <button class="_button button search" v-else @click="search" v-tooltip="$ts.search"> <Fa :icon="faSearch"/> </button> <button class="_button button follow" v-if="tl.startsWith('channel:') && currentChannel" :class="{ followed: currentChannel.isFollowing }" @click="toggleChannelFollow" v-tooltip="currentChannel.isFollowing ? $ts.unfollow : $ts.follow"> @@ -249,6 +252,15 @@ export default defineComponent({ search(); }, + async inChannelSearch() { + const { canceled, result: query } = await os.dialog({ + title: this.$ts.inChannelSearch, + input: true + }); + if (canceled || query == null || query === '') return; + router.push(`/search?q=${encodeURIComponent(query)}&channel=${this.currentChannel.id}`); + }, + top() { window.scroll({ top: 0, behavior: 'smooth' }); }, |