This commit is contained in:
naskya 2023-05-07 09:46:07 +09:00
parent 020c02476a
commit 324ec9e095
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
3 changed files with 35 additions and 37 deletions

View File

@ -1,3 +1,3 @@
export function sqlLikeEscape(s: string) {
return s.replace(/([%_])/g, '\\$1');
return s.replace(/([%_])/g, "\\$1");
}

View File

@ -65,7 +65,5 @@ export default define(meta, paramDef, async (ps, me) => {
const channels = await query.take(ps.limit).getMany();
return await Promise.all(
channels.map((x) => Channels.pack(x, me)),
);
return await Promise.all(channels.map((x) => Channels.pack(x, me)));
});

View File

@ -22,39 +22,39 @@
>
<swiper-slide>
<div class="_content grwlizim search">
<MkInput
v-model="searchQuery"
:large="true"
:autofocus="true"
type="search"
>
<template #prefix
><i
class="ph-magnifying-glass ph-bold ph-lg"
></i
></template>
</MkInput>
<MkRadios
v-model="searchType"
@update:model-value="search()"
class="_gap"
>
<option value="nameAndDescription">
{{ i18n.ts._channel.nameAndDescription }}
</option>
<option value="nameOnly">
{{ i18n.ts._channel.nameOnly }}
</option>
</MkRadios>
<MkButton
large
primary
gradate
rounded
@click="search"
class="_gap"
>{{ i18n.ts.search }}</MkButton
>
<MkInput
v-model="searchQuery"
:large="true"
:autofocus="true"
type="search"
>
<template #prefix
><i
class="ph-magnifying-glass ph-bold ph-lg"
></i
></template>
</MkInput>
<MkRadios
v-model="searchType"
@update:model-value="search()"
class="_gap"
>
<option value="nameAndDescription">
{{ i18n.ts._channel.nameAndDescription }}
</option>
<option value="nameOnly">
{{ i18n.ts._channel.nameOnly }}
</option>
</MkRadios>
<MkButton
large
primary
gradate
rounded
@click="search"
class="_gap"
>{{ i18n.ts.search }}</MkButton
>
<MkFoldableSection v-if="channelPagination">
<template #header>{{
i18n.ts.searchResult