From 7791216be61e78a8930dfcf7d680b155a26a3517 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 7 Oct 2022 13:43:49 +0200 Subject: [PATCH] login: add card-form with admin username input to login --- app/src/i18n/locales/en.json | 2 +- app/src/store/info.js | 4 +- app/src/views/Login.vue | 85 +++++++++++++++++++++++------------- 3 files changed, 58 insertions(+), 33 deletions(-) diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 12acc54f..79b636f6 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -551,7 +551,7 @@ "none": "None", "separator": ", " }, - "wrong_password": "Wrong password", + "wrong_password_or_username": "Wrong password or username", "yes": "Yes", "yunohost_admin": "YunoHost Admin", "certificate_manage": "Manage SSL certificate", diff --git a/app/src/store/info.js b/app/src/store/info.js index 1304c1ed..a34db1a2 100644 --- a/app/src/store/info.js +++ b/app/src/store/info.js @@ -142,8 +142,8 @@ export default { }) }, - 'LOGIN' ({ dispatch }, password) { - return api.post('login', { credentials: password }, null, { websocket: false }).then(() => { + 'LOGIN' ({ dispatch }, credentials) { + return api.post('login', { credentials }, null, { websocket: false }).then(() => { dispatch('CONNECT') }) }, diff --git a/app/src/views/Login.vue b/app/src/views/Login.vue index db50f4e6..79955243 100644 --- a/app/src/views/Login.vue +++ b/app/src/views/Login.vue @@ -1,37 +1,35 @@