Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: allow editing email (#3508)

Liu Ji10debed78bda
diff --git a/frontend/src/types/principal.ts b/frontend/src/types/principal.ts
index a1d2367f33..3280e2d0e6 100644
--- a/frontend/src/types/principal.ts
+++ b/frontend/src/types/principal.ts
@@ -34,4 +34,5 @@ export type PrincipalPatch = {
// Domain specific fields
name?: string;
password?: string;
+ email?: string;
};
diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vue
index dc87fdf5d4..f293a4b5f1 100644
--- a/frontend/src/views/ProfileDashboard.vue
+++ b/frontend/src/views/ProfileDashboard.vue
@@ -112,7 +112,22 @@
<dt class="text-sm font-medium text-control-light">
{{ $t("settings.profile.email") }}
</dt>
- <dd class="mt-1 text-sm text-main">{{ principal.email }}</dd>
+ <dd class="mt-1 text-sm text-main">
+ <input
+ v-if="state.editing"
+ id="email"
+ required
+ autocomplete="off"
+ name="email"
+ type="text"
+ class="textfield"
+ :value="state.editingPrincipal?.email"
+ @input="(e: any)=>updatePrincipal('email', e.target.value)"
+ />
+ <template v-else>
+ {{ principal.email }}
+ </template>
+ </dd>
</div>
<template v-if="state.editing">
@@ -271,6 +286,7 @@ export default defineComponent({
const clone = cloneDeep(principal.value);
state.editingPrincipal = {
name: clone.name,
+ email: clone.email,
};
state.editing = true;