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 testerPassword = ref('');
const requiresLogin = computed((): boolean => { const requiresLogin = computed((): boolean => {
return !config.macrolanguage?.enabled && (runtimeConfig.public.env === 'test' || if (config.macrolanguage?.enabled) {
config.locale !== '_' && !locales[config.locale]?.published); 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 testerPasswordValid = ref<boolean | undefined>();
const checkTesterPassword = async () => { const checkTesterPassword = async () => {