small refactoring

This commit is contained in:
Andrea Vos 2025-06-28 12:48:37 +02:00
parent 53dedd40c8
commit aa5bf0fb92

View File

@ -39,8 +39,19 @@ const testerPasswordCookie = useCookie('tester-password', longtimeCookieSetting)
const testerPassword = ref('');
const requiresLogin = computed((): boolean => {
return !config.macrolanguage?.enabled && (runtimeConfig.public.env === 'test' ||
config.locale !== '_' && !locales[config.locale]?.published);
if (config.macrolanguage?.enabled) {
return false;
}
if (runtimeConfig.public.env === 'test') {
return true;
}
if (config.locale !== '_' && !locales[config.locale]?.published) {
return true;
}
return false;
});
const testerPasswordValid = ref<boolean | undefined>();
const checkTesterPassword = async () => {