From 03e9425fc8006cc91b380168d33eae4f11f6777c Mon Sep 17 00:00:00 2001 From: Bai Date: Thu, 28 May 2020 10:59:13 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/NavHeader/AccountDropdown.vue | 2 +- src/router/index.js | 4 +- .../users/UserProfile/PasswordUpdate.vue | 13 ++++++ .../ProfileInfo.vue} | 46 +++++++++---------- .../users/UserProfile/ProfileUpdate.vue | 14 ++++++ src/userviews/users/UserProfile/SSHUpdate.vue | 14 ++++++ .../users/{ => UserProfile}/index.vue | 26 +++++++++-- 7 files changed, 90 insertions(+), 29 deletions(-) create mode 100644 src/userviews/users/UserProfile/PasswordUpdate.vue rename src/userviews/users/{UserProfile.vue => UserProfile/ProfileInfo.vue} (86%) create mode 100644 src/userviews/users/UserProfile/ProfileUpdate.vue create mode 100644 src/userviews/users/UserProfile/SSHUpdate.vue rename src/userviews/users/{ => UserProfile}/index.vue (53%) diff --git a/src/layout/components/NavHeader/AccountDropdown.vue b/src/layout/components/NavHeader/AccountDropdown.vue index d8ceeeb7d..2c2f0ca04 100644 --- a/src/layout/components/NavHeader/AccountDropdown.vue +++ b/src/layout/components/NavHeader/AccountDropdown.vue @@ -54,7 +54,7 @@ export default { handleClick(val) { switch (val) { case 'profile': - this.$router.push({ name: 'userProfile' }) + this.$router.push({ name: 'UserProfile' }) break case 'AdminPage': setPermission('Admin') diff --git a/src/router/index.js b/src/router/index.js index 40356ef63..684971d69 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -65,8 +65,8 @@ export const commonRoutes = { children: [ { path: '', - name: 'userProfile', - component: () => import('@/userviews/users/index'), + name: 'UserProfile', + component: () => import('@/userviews/users/UserProfile/index'), meta: { title: i18n.t('route.UserProfile'), icon: 'user', activeMenu: '/users/profile' } } ] diff --git a/src/userviews/users/UserProfile/PasswordUpdate.vue b/src/userviews/users/UserProfile/PasswordUpdate.vue new file mode 100644 index 000000000..190400876 --- /dev/null +++ b/src/userviews/users/UserProfile/PasswordUpdate.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/userviews/users/UserProfile.vue b/src/userviews/users/UserProfile/ProfileInfo.vue similarity index 86% rename from src/userviews/users/UserProfile.vue rename to src/userviews/users/UserProfile/ProfileInfo.vue index 762fd358a..ba2db7169 100644 --- a/src/userviews/users/UserProfile.vue +++ b/src/userviews/users/UserProfile/ProfileInfo.vue @@ -14,7 +14,7 @@ import DetailCard from '@/components/DetailCard' import QuickActions from '@/components/QuickActions' import { toSafeLocalDateStr } from '@/utils/common' export default { - name: 'UserProfile', + name: 'ProfileInfo', components: { DetailCard, QuickActions @@ -59,28 +59,28 @@ export default { }.bind(this) } }, - { - title: this.$t('assets.UpdatePassword'), - attrs: { - type: 'primary', - label: this.$t('common.Update') - }, - callbacks: { - click: function() { - - } - } - }, - { - title: this.$t('assets.UpdateSSHPublicKey'), - attrs: { - type: 'primary', - label: this.$t('common.Update') - }, - callbacks: { - click: function() {} - } - }, + // { + // title: this.$t('assets.UpdatePassword'), + // attrs: { + // type: 'primary', + // label: this.$t('common.Update') + // }, + // callbacks: { + // click: function() { + // + // } + // } + // }, + // { + // title: this.$t('assets.UpdateSSHPublicKey'), + // attrs: { + // type: 'primary', + // label: this.$t('common.Update') + // }, + // callbacks: { + // click: function() {} + // } + // }, { title: this.$t('assets.ResetPublicKeyAndDownload'), attrs: { diff --git a/src/userviews/users/UserProfile/ProfileUpdate.vue b/src/userviews/users/UserProfile/ProfileUpdate.vue new file mode 100644 index 000000000..f80a78bc4 --- /dev/null +++ b/src/userviews/users/UserProfile/ProfileUpdate.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/userviews/users/UserProfile/SSHUpdate.vue b/src/userviews/users/UserProfile/SSHUpdate.vue new file mode 100644 index 000000000..925650693 --- /dev/null +++ b/src/userviews/users/UserProfile/SSHUpdate.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/userviews/users/index.vue b/src/userviews/users/UserProfile/index.vue similarity index 53% rename from src/userviews/users/index.vue rename to src/userviews/users/UserProfile/index.vue index 0c71c3b2d..59d506613 100644 --- a/src/userviews/users/index.vue +++ b/src/userviews/users/UserProfile/index.vue @@ -8,22 +8,42 @@