client: search button is a no-op
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed

Don't be evil.
reference: #2 (comment)
This commit is contained in:
Johann150 2022-07-28 15:39:03 +02:00
parent 40d9aa6219
commit 9abbe94108
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 5 additions and 9 deletions

View file

@ -1,7 +1,7 @@
<template>
<div class="mk-google">
<div class="mk-search">
<input v-model="query" type="search" :placeholder="q">
<button @click="search"><i class="fas fa-search"></i> {{ $ts.search }}</button>
<button><i class="fas fa-search"></i> {{ $ts.search }}</button>
</div>
</template>
@ -13,14 +13,10 @@ const props = defineProps<{
}>();
const query = ref(props.q);
const search = () => {
window.open(`https://www.google.com/search?q=${query.value}`, '_blank');
};
</script>
<style lang="scss" scoped>
.mk-google {
.mk-search {
display: flex;
margin: 8px 0;

View file

@ -7,7 +7,7 @@ import MkEmoji from '@/components/global/emoji.vue';
import { concat } from '@/scripts/array';
import MkFormula from '@/components/formula.vue';
import MkCode from '@/components/code.vue';
import MkGoogle from '@/components/google.vue';
import MkSearch from '@/components/mfm-search.vue';
import MkSparkle from '@/components/sparkle.vue';
import MkA from '@/components/global/a.vue';
import { host } from '@/config';
@ -306,7 +306,7 @@ export default defineComponent({
}
case 'search': {
return [h(MkGoogle, {
return [h(MkSearch, {
key: Math.random(),
q: token.props.query,
})];