feat: searchFilters meta property

This commit is contained in:
ThatOneCalculator 2023-06-06 16:19:13 -07:00
parent 8bd8c7532b
commit eda82780de
No known key found for this signature in database
GPG key ID: 8703CACD01000000
3 changed files with 8 additions and 2 deletions

View file

@ -323,7 +323,7 @@ export const meta = {
optional: false,
nullable: false,
},
elasticsearch: {
searchFilters: {
type: "boolean",
optional: false,
nullable: false,
@ -521,7 +521,7 @@ export default define(meta, paramDef, async (ps, me) => {
recommendedTimeline: !instance.disableRecommendedTimeline,
globalTimeLine: !instance.disableGlobalTimeline,
emailRequiredForSignup: instance.emailRequiredForSignup,
elasticsearch: config.elasticsearch ? true : false,
searchFilters: config.meilisearch ? true : false,
hcaptcha: instance.enableHcaptcha,
recaptcha: instance.enableRecaptcha,
objectStorage: instance.useObjectStorage,

View file

@ -82,6 +82,9 @@ const nodeinfo2 = async () => {
disableRecommendedTimeline: meta.disableRecommendedTimeline,
disableGlobalTimeline: meta.disableGlobalTimeline,
emailRequiredForSignup: meta.emailRequiredForSignup,
searchFilters: config.meilisearch ? true : false,
postEditing: meta.experimentalFeatures?.postEditing || false,
postImports: meta.experimentalFeatures?.postImports || false,
enableHcaptcha: meta.enableHcaptcha,
enableRecaptcha: meta.enableRecaptcha,
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,

View file

@ -1,6 +1,7 @@
import * as os from "@/os";
import { i18n } from "@/i18n";
import { mainRouter } from "@/router";
// import { instance } from "@/instance";
export async function search() {
// const searchOptions =
@ -14,6 +15,8 @@ export async function search() {
// "filter:following => show results only from users you follow\n" +
// "filter:followers => show results only from followers\n";
// const searchFiltersAvailable = instance.searchFilters;
const { canceled, result: query } = await os.inputText({
title: i18n.ts.search,
placeholder: i18n.ts.searchPlaceholder,