Fix relay UI password display

This commit is contained in:
Girish Ramakrishnan
2025-06-27 12:59:44 +02:00
parent 565859b2aa
commit 4e54e4c22a
2 changed files with 15 additions and 8 deletions
@@ -39,7 +39,7 @@ const adminDomain = ref('');
const provider = ref('cloudron-smtp');
const host = ref('');
const port = ref(1);
const acceptSelfSignedCerts = ref(true);
const acceptSelfSignedCerts = ref(false);
const serverApiToken = ref('');
const username = ref('');
const password = ref('');
@@ -64,6 +64,15 @@ function usesPasswordAuth(provider) {
}
function onProviderChange() {
// reset the form
host.value = '';
port.value = 587;
acceptSelfSignedCerts.value = false;
serverApiToken.value = '';
username.value = '';
password.value = '';
// prefill from preset
const tmp = providers.find(p => p.provider === provider.value);
if (!tmp) return;
@@ -182,7 +191,7 @@ async function onSubmit() {
<FormGroup v-if="usesPasswordAuth(provider)">
<label for="passwordInput">{{ $t('email.outbound.mailRelay.password') }}</label>
<PasswordInput id="passwordInput" v-model="password" required />
<TextInput id="passwordInput" v-model="password" required />
</FormGroup>
</fieldset>
</form>