[Update] 更新用户首次登录页面

This commit is contained in:
Bai 2020-06-04 18:32:23 +08:00
parent 2604d933dd
commit a38f179acb
2 changed files with 27 additions and 14 deletions

View File

@ -59,6 +59,9 @@ export default {
type: 'textarea',
placeholder: 'ssh-rsa AAAA...'
},
hidden: (formValue) => {
return formValue.source !== 'local'
},
helpText: this.$t('users.HelpText.SSHKeyOfProfileSSHUpdatePage')
},
terms: {

View File

@ -27,15 +27,28 @@ export default {
config: {
title: this.$t('users.Profile'),
activeMenu: 'ProfileInfo',
submenu: [
{
title: this.$t('common.BasicInfo'),
name: 'ProfileInfo'
},
{
title: this.$t('users.ProfileSetting'),
name: 'ProfileUpdate'
},
submenu: this.getSubmenu(),
hasRightSide: false,
actions: {
detailApiUrl: '/api/v1/users/profile/'
}
}
}
},
methods: {
getSubmenu() {
let submenu = [
{
title: this.$t('common.BasicInfo'),
name: 'ProfileInfo'
},
{
title: this.$t('users.ProfileSetting'),
name: 'ProfileUpdate'
}
]
if (this.$store.state.users.profile.source === 'local') {
submenu = submenu.concat([
{
title: this.$t('users.LoginPasswordSetting'),
name: 'PasswordUpdate'
@ -44,12 +57,9 @@ export default {
title: this.$t('users.SSHKeySetting'),
name: 'SSHUpdate'
}
],
hasRightSide: false,
actions: {
detailApiUrl: '/api/v1/users/profile/'
}
])
}
return submenu
}
}
}