Update local user layout and styles
Resubmitting after reverted–original commit here
https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/28790
- Add BVConfig plugin to modify boostrap component
defaults
- Add vuelidate
- Add package and basic validations to user form
- Add all user form validations
- Add checks for edit user
- Create VuelidateMixin for shared methods
- Update Login to use Vuelidate
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: Ib50ee4d1fb5f14637c9460e77f0682869a86ac8a
diff --git a/src/store/modules/Authentication/AuthenticanStore.js b/src/store/modules/Authentication/AuthenticanStore.js
index 3a554b6..8d8898e 100644
--- a/src/store/modules/Authentication/AuthenticanStore.js
+++ b/src/store/modules/Authentication/AuthenticanStore.js
@@ -4,35 +4,28 @@
const AuthenticationStore = {
namespaced: true,
state: {
- status: '',
+ authError: false,
cookie: Cookies.get('XSRF-TOKEN')
},
getters: {
- authStatus: state => state.status,
+ authError: state => state.authError,
isLoggedIn: state => !!state.cookie
},
mutations: {
- authRequest(state) {
- state.status = 'processing';
- },
authSuccess(state) {
- state.status = 'authenticated';
+ state.authError = false;
state.cookie = Cookies.get('XSRF-TOKEN');
},
authError(state) {
- state.status = 'error';
- },
- authReset(state) {
- state.status = '';
+ state.authError = true;
},
logout(state) {
- state.status = '';
+ state.authError = false;
Cookies.remove('XSRF-TOKEN');
}
},
actions: {
login({ commit }, auth) {
- commit('authRequest');
return api
.post('/login', { data: auth })
.then(() => commit('authSuccess'))