diff --git a/arches_lingo/src/arches_lingo/App.vue b/arches_lingo/src/arches_lingo/App.vue index 9709049c..5f00afd6 100644 --- a/arches_lingo/src/arches_lingo/App.vue +++ b/arches_lingo/src/arches_lingo/App.vue @@ -12,6 +12,7 @@ import { ENGLISH, ERROR, USER_KEY, + headerKey, selectedLanguageKey, } from "@/arches_lingo/constants.ts"; @@ -38,6 +39,12 @@ const route = useRoute(); const toast = useToast(); const { $gettext } = useGettext(); +const header = ref($gettext("Arches Lingo")); +const setHeader = (headerToSet: string) => { + header.value = headerToSet; +}; +provide(headerKey, { header, setHeader }); + router.beforeEach(async (to, _from, next) => { try { let userData = await fetchUser(); @@ -67,7 +74,10 @@ router.beforeEach(async (to, _from, next) => { diff --git a/arches_lingo/src/arches_lingo/constants.ts b/arches_lingo/src/arches_lingo/constants.ts index 8cf44174..fccfac7e 100644 --- a/arches_lingo/src/arches_lingo/constants.ts +++ b/arches_lingo/src/arches_lingo/constants.ts @@ -1,6 +1,10 @@ import type { InjectionKey, Ref } from "vue"; import type { Language } from "@/arches/types"; -import type { Concept, UserRefAndSetter } from "@/arches_lingo/types.ts"; +import type { + Concept, + HeaderRefAndSetter, + UserRefAndSetter, +} from "@/arches_lingo/types.ts"; export const ANONYMOUS = "anonymous"; export const ERROR = "error"; @@ -11,6 +15,7 @@ export const DEFAULT_ERROR_TOAST_LIFE = 8000; // Injection keys export const USER_KEY = Symbol() as InjectionKey; export const displayedRowKey = Symbol() as InjectionKey>; +export const headerKey = Symbol() as InjectionKey; export const selectedLanguageKey = Symbol() as InjectionKey>; export const ENGLISH = { diff --git a/arches_lingo/src/arches_lingo/pages/ConceptDetail.vue b/arches_lingo/src/arches_lingo/pages/ConceptDetail.vue index 4928e291..13d2ab35 100644 --- a/arches_lingo/src/arches_lingo/pages/ConceptDetail.vue +++ b/arches_lingo/src/arches_lingo/pages/ConceptDetail.vue @@ -1,5 +1,5 @@