diff --git a/apps/ui/src/views/Settings/EmailNotifications.vue b/apps/ui/src/views/Settings/EmailNotifications.vue index 077f3592f..df0ecd8cc 100644 --- a/apps/ui/src/views/Settings/EmailNotifications.vue +++ b/apps/ui/src/views/Settings/EmailNotifications.vue @@ -5,7 +5,7 @@ import { EmailSubscriptionType } from '@/types'; useTitle('Email notifications'); -const CREATE_SUBSCRIBE_FORM_STATE = { +const SUBSCRIBE_FORM_STATE = { email: '', subscriptions: [] }; @@ -15,12 +15,13 @@ const DEFINITION = { type: 'object', title: 'Email subscription', additionalProperties: false, - required: ['email'], + required: [], properties: { email: { type: 'string', format: 'email', title: 'Email', + maxLength: 256, examples: ['e.g. me@snapshot.box'] }, subscriptions: { @@ -39,7 +40,7 @@ const SUBSCRIPTIONS_TYPE = [ key: 'summary', title: 'Weekly summary', description: - 'Get a weekly report detailing the activity in your followed spaces.' + 'Get a weekly report detailing the activities in your followed spaces.' }, { key: 'newProposal', @@ -59,24 +60,25 @@ const SUBSCRIPTIONS_TYPE = [ const usersStore = useUsersStore(); const { web3 } = useWeb3(); -const user = computed(() => usersStore.getUser(web3.value.account)); -const loading = computed( - () => web3.value.authLoading || usersStore.users[web3.value.account]?.loading -); - -const form: Ref<{ +const form = ref<{ email: string; subscriptions: EmailSubscriptionType[]; -}> = ref(clone(CREATE_SUBSCRIBE_FORM_STATE)); +}>(clone(SUBSCRIBE_FORM_STATE)); +const formErrors = ref>({}); +const formValidated = ref(false); const subscriptions = reactive>({ summary: true, newProposal: true, closedProposal: true }); -const formErrors = ref({} as Record); -const formValidated = ref(false); -function handleCreateSubscribeClick() {} +const user = computed(() => usersStore.getUser(web3.value.account)); + +const loading = computed( + () => web3.value.authLoading || usersStore.users[web3.value.account]?.loading +); + +function handleCreateSubscriptionClick() {} function handleResendConfirmationClick() {} @@ -125,12 +127,14 @@ watchEffect(async () => {
- - Subscribe now + + Subscribe now +