Require display name to not be empty when changed from the profile view
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
<script setup>
|
||||
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
|
||||
import { ref, onMounted, useTemplateRef, inject } from 'vue';
|
||||
import { Button, SingleSelect, Dialog, InputDialog, TextInput, InputGroup, FormGroup } from '@cloudron/pankow';
|
||||
import { Button, SingleSelect, Dialog, TextInput, InputGroup, FormGroup } from '@cloudron/pankow';
|
||||
import { setLanguage } from '../i18n.js';
|
||||
import { TOKEN_TYPES } from '../constants.js';
|
||||
import NotificationSettings from '../components/NotificationSettings.vue';
|
||||
@@ -35,7 +32,6 @@ const refreshProfile = inject('refreshProfile');
|
||||
const savingDisplayName = ref(false);
|
||||
|
||||
const config = ref({});
|
||||
const inputDialog = useTemplateRef('inputDialog');
|
||||
const primaryEmailDialog = useTemplateRef('primaryEmailDialog');
|
||||
const fallbackEmailDialog = useTemplateRef('fallbackEmailDialog');
|
||||
const passwordChangeDialog = useTemplateRef('passwordChangeDialog');
|
||||
@@ -182,7 +178,6 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<div class="content" style="max-width: 700px;">
|
||||
<InputDialog ref="inputDialog" />
|
||||
<PrimaryEmailDialog ref="primaryEmailDialog" @success="refreshProfile"/>
|
||||
<FallbackEmailDialog ref="fallbackEmailDialog" @success="refreshProfile"/>
|
||||
<PasswordChangeDialog ref="passwordChangeDialog" @success="refreshProfile"/>
|
||||
@@ -230,7 +225,7 @@ onMounted(async () => {
|
||||
</SettingsItem>
|
||||
|
||||
<SettingsItem>
|
||||
<EditableField :label="$t('main.displayName')" :saving="savingDisplayName" :value="profile.displayName" :disabled="config.profileLocked || profile.source || !profile.username" @save="onDisplayNameSave"/>
|
||||
<EditableField :label="$t('main.displayName')" :saving="savingDisplayName" :value="profile.displayName" :disabled="config.profileLocked || profile.source || !profile.username" @save="onDisplayNameSave" :required="true"/>
|
||||
</SettingsItem>
|
||||
|
||||
<SettingsItem>
|
||||
|
||||
Reference in New Issue
Block a user