diff --git a/js/src/assets/oruga-tailwindcss.css b/js/src/assets/oruga-tailwindcss.css index 35634277..4310f357 100644 --- a/js/src/assets/oruga-tailwindcss.css +++ b/js/src/assets/oruga-tailwindcss.css @@ -2,6 +2,10 @@ body { @apply bg-body-background-color dark:bg-zinc-800 dark:text-white; } +.out { + @apply underline hover:decoration-2 hover:decoration-mbz-yellow-alt-600; +} + /* Button */ .btn { @apply font-bold py-2 px-4 bg-mbz-bluegreen hover:bg-mbz-bluegreen-600 text-white rounded h-10 outline-none focus:ring ring-offset-1 ring-offset-slate-50 ring-blue-300; diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 2cf908a3..fe6dfccd 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -185,7 +185,11 @@ >{{ t("Login") }} -
  • +
  • result.value?.config.search); return { searchConfig, error, loading, onResult }; } + +export function useRegistrationConfig() { + const { result, error, loading, onResult } = useQuery<{ + config: Pick; + }>(REGISTRATIONS, undefined, { fetchPolicy: "cache-only" }); + + const registrationsOpen = computed( + () => result.value?.config.registrationsOpen + ); + const registrationsAllowlist = computed( + () => result.value?.config.registrationsAllowlist + ); + return { + registrationsOpen, + registrationsAllowlist, + error, + loading, + onResult, + }; +} diff --git a/js/src/graphql/config.ts b/js/src/graphql/config.ts index c2dcd10c..65dc681b 100644 --- a/js/src/graphql/config.ts +++ b/js/src/graphql/config.ts @@ -444,3 +444,12 @@ export const SEARCH_CONFIG = gql` } } `; + +export const REGISTRATIONS = gql` + query Registrations { + config { + registrationsOpen + registrationsAllowlist + } + } +`; diff --git a/js/src/views/User/RegisterView.vue b/js/src/views/User/RegisterView.vue index 685dce4f..12515ae1 100644 --- a/js/src/views/User/RegisterView.vue +++ b/js/src/views/User/RegisterView.vue @@ -1,5 +1,5 @@