From a2793f63092547c7f4a8da7c944a36659cb4202f Mon Sep 17 00:00:00 2001 From: Robin Kaggl <48437174+kaggl@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:02:28 +0100 Subject: [PATCH] small optimizations, added titles (#85) resolves #84 --------- Co-authored-by: Robin Kaggl --- components/autocomplete.vue | 3 +++ components/search-table.vue | 6 ------ pages/detail/courts/[id].vue | 12 ++++++++++- pages/detail/events/[id].vue | 12 +++++++++++ pages/detail/institutions/[id].vue | 11 +++++++++- pages/detail/persons/[id].vue | 11 +++++++++- pages/detail/places/[id].vue | 10 ++++++++++ pages/documentation/[...slug].vue | 32 ++++++++++++++++++------------ pages/hierarchy.vue | 3 +++ pages/index.vue | 4 +++- pages/search.vue | 4 ++++ pages/search/courts.vue | 6 ++++++ pages/search/events.vue | 6 ++++++ pages/search/institutions.vue | 10 ++++++++++ pages/search/persons.vue | 6 ++++++ pages/search/places.vue | 6 ++++++ pages/search/references.vue | 6 ++++++ pages/search/relations.vue | 6 ++++++ 18 files changed, 131 insertions(+), 23 deletions(-) diff --git a/components/autocomplete.vue b/components/autocomplete.vue index dc42857..e6600b1 100644 --- a/components/autocomplete.vue +++ b/components/autocomplete.vue @@ -12,6 +12,8 @@ import type { ModelRef } from "vue"; import type { HierarchyNode } from "@/lib/types"; +const t = useTranslations(); + const query = ref( useQuery({ queryKey: ["autocomplete"], @@ -63,6 +65,7 @@ defineEmits(["change", "input"]); /> + {{ t("ui.search-placeholder") }} diff --git a/components/search-table.vue b/components/search-table.vue index f5226fe..020c253 100644 --- a/components/search-table.vue +++ b/components/search-table.vue @@ -144,12 +144,6 @@ const getDetailLink = (id: string, entity?: string) => { -
{ + if (data.value.entity.data?.name) + return `${data.value.entity.data.name} - ${t("pages.searchviews.courts.sing")}`; + return t("pages.searchviews.courts.sing"); +}); + +useHead({ + title, +});