diff --git a/app/src/components/reusableForms/DomainForm.vue b/app/src/components/reusableForms/DomainForm.vue
new file mode 100644
index 00000000..ff67cdc5
--- /dev/null
+++ b/app/src/components/reusableForms/DomainForm.vue
@@ -0,0 +1,191 @@
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+ {{ $t('domain_add_panel_with_domain') }}
+
+
+
+
+
+
+
+
+
+ {{ this.error.domain }}
+
+
+
+
+
+
+ {{ $t('domain_add_panel_without_domain') }}
+
+
+
+ {{ $t('domain_add_dyndns_doc') }}
+
+
+
+
+
+ {{ this.error.dynDomain }}
+
+
+
+
+
+
+
+ {{ submitText ? submitText : $t('add') }}
+
+
+
+
+
+
diff --git a/app/src/components/reusableForms/PasswordForm.vue b/app/src/components/reusableForms/PasswordForm.vue
new file mode 100644
index 00000000..10a3493d
--- /dev/null
+++ b/app/src/components/reusableForms/PasswordForm.vue
@@ -0,0 +1,119 @@
+
+
+
+ {{ title }}
+
+
+
+
+ {{ $t('good_practices_about_admin_password') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ submitText ? submitText : $t('save') }}
+
+
+
+
+
+
diff --git a/app/src/components/reusableForms/index.js b/app/src/components/reusableForms/index.js
new file mode 100644
index 00000000..dcd04c0c
--- /dev/null
+++ b/app/src/components/reusableForms/index.js
@@ -0,0 +1,2 @@
+export { default as PasswordForm } from './PasswordForm'
+export { default as DomainForm } from './DomainForm'
diff --git a/app/src/store/info.js b/app/src/store/info.js
index ad834ce8..49a3a22e 100644
--- a/app/src/store/info.js
+++ b/app/src/store/info.js
@@ -37,8 +37,8 @@ export default {
'DISCONNECT' ({ commit }, route) {
commit('SET_CONNECTED', false)
commit('SET_YUNOHOST_INFOS', null)
- // Do not redirect if the current route is `login` so the view can display an error.
- if (router.currentRoute.name === 'login') return
+ // Do not redirect if the current route needs to display an error.
+ if (['login', 'tool-adminpw'].includes(router.currentRoute.name)) return
router.push({
name: 'login',
// Add a redirect query if next route is not unknown (like `logout`) or `login`
@@ -63,6 +63,7 @@ export default {
'CHECK_INSTALL' ({ dispatch }, retry = 2) {
// this action will try to query the `/installed` route 3 times every 5 s with
// a timeout of the same delay.
+ // FIXME need testing with api not responding
return timeout(api.get('installed'), 5000).then(({ installed }) => {
return installed
}).catch(err => {
diff --git a/app/src/views/domain/DomainAdd.vue b/app/src/views/domain/DomainAdd.vue
index 6291129a..9ab0ada5 100644
--- a/app/src/views/domain/DomainAdd.vue
+++ b/app/src/views/domain/DomainAdd.vue
@@ -1,90 +1,22 @@
-
-
-
- {{ $t('domain_add_panel_with_domain') }}
-
-
-
-
-
-
-
-
-
- {{ this.error.domain }}
-
-
-
-
-
-
- {{ $t('domain_add_panel_without_domain') }}
-
-
-
- {{ $t('domain_add_dyndns_doc') }}
-
-
-
-
-
- {{ this.error.dynDomain }}
-
-
-
-
+
-
-
diff --git a/app/src/views/tool/ToolAdminpw.vue b/app/src/views/tool/ToolAdminpw.vue
index 6aa6b031..891597ea 100644
--- a/app/src/views/tool/ToolAdminpw.vue
+++ b/app/src/views/tool/ToolAdminpw.vue
@@ -1,39 +1,25 @@
-
-
- {{ $t('good_practices_about_admin_password') }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+