diff --git a/frontend/src/components/domains/DomainDNSForm.vue b/frontend/src/components/domains/DomainDNSForm.vue
index 545e73af3..03b56a26d 100644
--- a/frontend/src/components/domains/DomainDNSForm.vue
+++ b/frontend/src/components/domains/DomainDNSForm.vue
@@ -34,7 +34,7 @@ export default {
components: {
ChoiceField
},
- props: ['domain'],
+ props: ['value'],
data () {
return {
dkimKeyLengths: [
@@ -59,8 +59,13 @@ export default {
this.$emit('input', this.form)
}
},
- mounted () {
- this.form = { ...this.value }
+ watch: {
+ value: {
+ handler: function (newValue) {
+ this.form = { ...newValue }
+ },
+ immediate: true
+ }
}
}
diff --git a/frontend/src/components/domains/DomainLimitationsForm.vue b/frontend/src/components/domains/DomainLimitationsForm.vue
index b15004c47..aa7b6764a 100644
--- a/frontend/src/components/domains/DomainLimitationsForm.vue
+++ b/frontend/src/components/domains/DomainLimitationsForm.vue
@@ -62,8 +62,13 @@ export default {
this.$emit('input', this.form)
}
},
- mounted () {
- this.form = { ...this.value }
+ watch: {
+ value: {
+ handler: function (newValue) {
+ this.form = { ...this.value }
+ },
+ immediate: true
+ }
}
}
diff --git a/frontend/src/components/domains/DomainOptionsForm.vue b/frontend/src/components/domains/DomainOptionsForm.vue
index 734249eb1..83b44a09d 100644
--- a/frontend/src/components/domains/DomainOptionsForm.vue
+++ b/frontend/src/components/domains/DomainOptionsForm.vue
@@ -75,8 +75,13 @@ export default {
this.$emit('input', this.form)
}
},
- mounted () {
- this.form = { ...this.value }
+ watch: {
+ value: {
+ handler: function (newValue) {
+ this.form = { ...this.value }
+ },
+ immediate: true
+ }
}
}
diff --git a/frontend/src/components/layout/Navbar.vue b/frontend/src/components/layout/Navbar.vue
index 9f5acf8f6..5a82f5353 100644
--- a/frontend/src/components/layout/Navbar.vue
+++ b/frontend/src/components/layout/Navbar.vue
@@ -234,7 +234,8 @@ export default {
{
text: this.$gettext('Profile'),
icon: 'mdi-account-circle-outline',
- to: { name: 'UserProfile' }
+ to: { name: 'UserProfile' },
+ click: () => null
},
{
text: this.$gettext('Logout'),
diff --git a/frontend/src/views/identities/Account.vue b/frontend/src/views/identities/Account.vue
index db5a7b5cf..6556876ce 100644
--- a/frontend/src/views/identities/Account.vue
+++ b/frontend/src/views/identities/Account.vue
@@ -9,10 +9,16 @@
+
+
@@ -23,11 +29,6 @@
/>
-
-
-
-
-
diff --git a/modoboa/core/api/v2/views.py b/modoboa/core/api/v2/views.py
index c6ca853ff..e78d71d22 100644
--- a/modoboa/core/api/v2/views.py
+++ b/modoboa/core/api/v2/views.py
@@ -5,6 +5,8 @@ import logging
from django.utils.html import escape
from django.utils.translation import ugettext as _
+from django.contrib.auth import login
+
from rest_framework import response, status
from rest_framework_simplejwt import views as jwt_views
from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
@@ -31,6 +33,7 @@ class TokenObtainPairView(jwt_views.TokenObtainPairView):
raise InvalidToken(e.args[0])
user = serializer.user
+ login(request, user)
logger.info(
_("User '%s' successfully logged in"), user.username
)