Disabling account e-mail fields if e-mail service is disabled (verification e-mail couldn't be sent).
This commit is contained in:
@@ -11,6 +11,8 @@ import { patch, post } from '#/src/api.js';
|
||||
const pageContext = inject('pageContext');
|
||||
const { user } = pageContext;
|
||||
|
||||
const allowEmailUpdate = pageContext.env.emailEnabled;
|
||||
|
||||
const credentials = reactive({
|
||||
email: null,
|
||||
password: null,
|
||||
@@ -95,7 +97,7 @@ async function verifyEmail() {
|
||||
|
||||
<template #popper>
|
||||
<div class="unverified-tooltip">
|
||||
Your e-mail address is unverified
|
||||
Your e-mail address is unverified.
|
||||
|
||||
<Ellipsis v-if="verifying" />
|
||||
|
||||
@@ -105,11 +107,13 @@ async function verifyEmail() {
|
||||
>Verification e-mail sent</strong>
|
||||
|
||||
<button
|
||||
v-else
|
||||
v-else-if="allowEmailUpdate"
|
||||
type="button"
|
||||
class="button button-primary"
|
||||
@click="verifyEmail"
|
||||
>Verify now</button>
|
||||
|
||||
<span v-else>Verification is currently unavailable.</span>
|
||||
</div>
|
||||
</template>
|
||||
</VDropdown>
|
||||
@@ -123,6 +127,7 @@ async function verifyEmail() {
|
||||
</span>
|
||||
|
||||
<input
|
||||
v-if="allowEmailUpdate"
|
||||
v-model="credentials.email"
|
||||
type="email"
|
||||
placeholder="New e-mail"
|
||||
|
||||
Reference in New Issue
Block a user