format
This commit is contained in:
parent
020c02476a
commit
324ec9e095
3 changed files with 35 additions and 37 deletions
|
@ -1,3 +1,3 @@
|
||||||
export function sqlLikeEscape(s: string) {
|
export function sqlLikeEscape(s: string) {
|
||||||
return s.replace(/([%_])/g, '\\$1');
|
return s.replace(/([%_])/g, "\\$1");
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,5 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
|
|
||||||
const channels = await query.take(ps.limit).getMany();
|
const channels = await query.take(ps.limit).getMany();
|
||||||
|
|
||||||
return await Promise.all(
|
return await Promise.all(channels.map((x) => Channels.pack(x, me)));
|
||||||
channels.map((x) => Channels.pack(x, me)),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,39 +22,39 @@
|
||||||
>
|
>
|
||||||
<swiper-slide>
|
<swiper-slide>
|
||||||
<div class="_content grwlizim search">
|
<div class="_content grwlizim search">
|
||||||
<MkInput
|
<MkInput
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
:large="true"
|
:large="true"
|
||||||
:autofocus="true"
|
:autofocus="true"
|
||||||
type="search"
|
type="search"
|
||||||
>
|
>
|
||||||
<template #prefix
|
<template #prefix
|
||||||
><i
|
><i
|
||||||
class="ph-magnifying-glass ph-bold ph-lg"
|
class="ph-magnifying-glass ph-bold ph-lg"
|
||||||
></i
|
></i
|
||||||
></template>
|
></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkRadios
|
<MkRadios
|
||||||
v-model="searchType"
|
v-model="searchType"
|
||||||
@update:model-value="search()"
|
@update:model-value="search()"
|
||||||
class="_gap"
|
class="_gap"
|
||||||
>
|
>
|
||||||
<option value="nameAndDescription">
|
<option value="nameAndDescription">
|
||||||
{{ i18n.ts._channel.nameAndDescription }}
|
{{ i18n.ts._channel.nameAndDescription }}
|
||||||
</option>
|
</option>
|
||||||
<option value="nameOnly">
|
<option value="nameOnly">
|
||||||
{{ i18n.ts._channel.nameOnly }}
|
{{ i18n.ts._channel.nameOnly }}
|
||||||
</option>
|
</option>
|
||||||
</MkRadios>
|
</MkRadios>
|
||||||
<MkButton
|
<MkButton
|
||||||
large
|
large
|
||||||
primary
|
primary
|
||||||
gradate
|
gradate
|
||||||
rounded
|
rounded
|
||||||
@click="search"
|
@click="search"
|
||||||
class="_gap"
|
class="_gap"
|
||||||
>{{ i18n.ts.search }}</MkButton
|
>{{ i18n.ts.search }}</MkButton
|
||||||
>
|
>
|
||||||
<MkFoldableSection v-if="channelPagination">
|
<MkFoldableSection v-if="channelPagination">
|
||||||
<template #header>{{
|
<template #header>{{
|
||||||
i18n.ts.searchResult
|
i18n.ts.searchResult
|
||||||
|
|
Loading…
Reference in a new issue