From 6a680be49ccdae3ae2da50c674976664c6d8b8f9 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Fri, 20 Nov 2020 12:37:09 +0500 Subject: [PATCH] feat(fe): add password form component Added animation for running task status. --- web2/src/components/ChangePasswordForm.vue | 49 +++++++++ web2/src/components/ItemFormBase.js | 5 + web2/src/components/TaskLIst.vue | 0 web2/src/components/TaskStatus.vue | 0 web2/src/lib/delay.js | 2 +- web2/src/router/index.js | 5 - web2/src/views/ChangePassword.vue | 112 --------------------- 7 files changed, 55 insertions(+), 118 deletions(-) create mode 100644 web2/src/components/ChangePasswordForm.vue create mode 100644 web2/src/components/TaskLIst.vue create mode 100644 web2/src/components/TaskStatus.vue delete mode 100644 web2/src/views/ChangePassword.vue diff --git a/web2/src/components/ChangePasswordForm.vue b/web2/src/components/ChangePasswordForm.vue new file mode 100644 index 00000000..9c482313 --- /dev/null +++ b/web2/src/components/ChangePasswordForm.vue @@ -0,0 +1,49 @@ + + diff --git a/web2/src/components/ItemFormBase.js b/web2/src/components/ItemFormBase.js index 33048cde..8ad76682 100644 --- a/web2/src/components/ItemFormBase.js +++ b/web2/src/components/ItemFormBase.js @@ -70,6 +70,10 @@ export default { } }, + getRequestOptions() { + return {}; + }, + /** * Saves or creates item via API. * @returns {Promise} null if validation didn't pass or user data if user saved. @@ -92,6 +96,7 @@ export default { : this.getSingleItemUrl(), responseType: 'json', data: this.item, + ...(this.getRequestOptions()), })).data; this.$emit('save', { diff --git a/web2/src/components/TaskLIst.vue b/web2/src/components/TaskLIst.vue new file mode 100644 index 00000000..e69de29b diff --git a/web2/src/components/TaskStatus.vue b/web2/src/components/TaskStatus.vue new file mode 100644 index 00000000..e69de29b diff --git a/web2/src/lib/delay.js b/web2/src/lib/delay.js index 90a4781f..8bd583a0 100644 --- a/web2/src/lib/delay.js +++ b/web2/src/lib/delay.js @@ -1,3 +1,3 @@ export default function delay(milliseconds = 100) { - return new Promise(resolve => setTimeout(resolve, milliseconds)); + return new Promise((resolve) => setTimeout(resolve, milliseconds)); } diff --git a/web2/src/router/index.js b/web2/src/router/index.js index 00a336f5..08144ab0 100644 --- a/web2/src/router/index.js +++ b/web2/src/router/index.js @@ -13,7 +13,6 @@ import Team from '../views/project/Team.vue'; import Users from '../views/Users.vue'; import Auth from '../views/Auth.vue'; import New from '../views/project/New.vue'; -import ChangePassword from '../views/ChangePassword.vue'; Vue.use(VueRouter); @@ -74,10 +73,6 @@ const routes = [ path: '/users', component: Users, }, - { - path: '/change-password', - component: ChangePassword, - }, ]; const router = new VueRouter({ diff --git a/web2/src/views/ChangePassword.vue b/web2/src/views/ChangePassword.vue deleted file mode 100644 index 07b7070f..00000000 --- a/web2/src/views/ChangePassword.vue +++ /dev/null @@ -1,112 +0,0 @@ - - -