diff --git a/frontend/composables/use-setup/common-settings-form.ts b/frontend/composables/use-setup/common-settings-form.ts index 15c344e09..5b9ada0fb 100644 --- a/frontend/composables/use-setup/common-settings-form.ts +++ b/frontend/composables/use-setup/common-settings-form.ts @@ -4,7 +4,7 @@ import type { AutoFormItems } from "~/types/auto-forms"; export const useCommonSettingsForm = () => { const i18n = useI18n(); - const commonSettingsForm: AutoFormItems = [ + const commonSettingsForm = computed(() => [ { section: i18n.t("profile.group-settings"), label: i18n.t("group.enable-public-access"), @@ -21,7 +21,7 @@ export const useCommonSettingsForm = () => { type: fieldTypes.BOOLEAN, rules: ["required"], }, - ]; + ]); return { commonSettingsForm, diff --git a/frontend/composables/use-users/user-registration-form.ts b/frontend/composables/use-users/user-registration-form.ts index f61b26d56..be24ffd84 100644 --- a/frontend/composables/use-users/user-registration-form.ts +++ b/frontend/composables/use-users/user-registration-form.ts @@ -1,5 +1,5 @@ import { useAsyncValidator } from "~/composables/use-validators"; -import type { VForm } from "~/types/vuetify"; +import type { VForm } from "~/types/auto-forms"; import { usePublicApi } from "~/composables/api/api-client"; const domAccountForm = ref(null); @@ -13,11 +13,13 @@ const advancedOptions = ref(false); export const useUserRegistrationForm = () => { const i18n = useI18n(); - function safeValidate(form: Ref) { - if (form.value && form.value.validate) { - return form.value.validate(); + async function safeValidate(form: Ref) { + if (!form.value) { + return false; } - return false; + + const result = await form.value.validate(); + return result.valid; } // ================================================================ // Provide Group Details @@ -45,11 +47,15 @@ export const useUserRegistrationForm = () => { email, advancedOptions, validate: async () => { - if (!(validUsername.value && validEmail.value)) { + if (!validUsername.value || !validEmail.value) { await Promise.all([validateUsername(), validateEmail()]); } - return (safeValidate(domAccountForm as Ref) && validUsername.value && validEmail.value); + if (!validUsername.value || !validEmail.value) { + return false; + } + + return await safeValidate(domAccountForm as Ref); }, reset: () => { accountDetails.username.value = ""; diff --git a/frontend/lang/messages/en-US.json b/frontend/lang/messages/en-US.json index 85588bddd..00ff99279 100644 --- a/frontend/lang/messages/en-US.json +++ b/frontend/lang/messages/en-US.json @@ -1168,7 +1168,7 @@ "group-details": "Group Details", "group-details-description": "Before you create an account you'll need to create a group. Your group will only contain you, but you'll be able to invite others later. Members in your group can share meal plans, shopping lists, recipes, and more!", "use-seed-data": "Use Seed Data", - "use-seed-data-description": "Mealie ships with a collection of Foods, Units, and Labels that can be used to populate your group with helpful data for organizing your recipes.", + "use-seed-data-description": "Mealie ships with a collection of Foods, Units, and Labels that can be used to populate your group with helpful data for organizing your recipes. These are translated into the language you currently have selected. You can always add to or modify this data later.", "account-details": "Account Details" }, "validation": { diff --git a/frontend/pages/admin/setup.vue b/frontend/pages/admin/setup.vue index d692cb6a8..31c5c3879 100644 --- a/frontend/pages/admin/setup.vue +++ b/frontend/pages/admin/setup.vue @@ -1,70 +1,81 @@