Add global search

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-08-26 16:08:58 +02:00
parent bfc936f57c
commit 48935e2168
216 changed files with 3646 additions and 2806 deletions

View File

@@ -13,6 +13,7 @@ import {
MAPS_TILES,
RESOURCE_PROVIDERS,
RESTRICTIONS,
SEARCH_CONFIG,
TIMEZONES,
UPLOAD_LIMITS,
} from "@/graphql/config";
@@ -192,3 +193,12 @@ export function useAnalytics() {
const analytics = computed(() => result.value?.config.analytics);
return { analytics, error, loading };
}
export function useSearchConfig() {
const { result, error, loading, onResult } = useQuery<{
config: Pick<IConfig, "search">;
}>(SEARCH_CONFIG);
const searchConfig = computed(() => result.value?.config.search);
return { searchConfig, error, loading, onResult };
}