Merge branch 'master' into fix/missing-functionalities fix: header fix: showing error on add ssh modal fix: login by enter key Co-authored-by: jonathan <jonathan@noreply.git.bubblev.org> Co-authored-by: Tyler <everdev0923@gmail.com> Reviewed-on: https://git.bubblev.org/bubblev/bubble-web/pulls/56pull/57/head
@@ -12,7 +12,7 @@ | |||||
v-if="status.loggedIn !== true" | v-if="status.loggedIn !== true" | ||||
class="d-flex justify-content-center align-items-center" | class="d-flex justify-content-center align-items-center" | ||||
> | > | ||||
<router-link to="/help" class="d-flex align-items-center"> | |||||
<router-link to="/support" class="d-flex align-items-center"> | |||||
<Button headerLink> | <Button headerLink> | ||||
{{ messages.button_label_help }} | {{ messages.button_label_help }} | ||||
</Button> | </Button> | ||||
@@ -70,7 +70,7 @@ | |||||
{{ messages.label_menu_account }} | {{ messages.label_menu_account }} | ||||
</Button> | </Button> | ||||
</router-link> | </router-link> | ||||
<router-link to="/help" class="d-flex align-items-center"> | |||||
<router-link to="/support" class="d-flex align-items-center"> | |||||
<Button headerLink> | <Button headerLink> | ||||
{{ messages.button_label_help }} | {{ messages.button_label_help }} | ||||
</Button> | </Button> | ||||
@@ -131,7 +131,7 @@ | |||||
<router-link to="/me" class="dropdown-item"> | <router-link to="/me" class="dropdown-item"> | ||||
{{ messages.label_menu_account }} | {{ messages.label_menu_account }} | ||||
</router-link> | </router-link> | ||||
<router-link class="dropdown-item" to="/help"> | |||||
<router-link class="dropdown-item" to="/support"> | |||||
{{ messages.button_label_help }} | {{ messages.button_label_help }} | ||||
</router-link> | </router-link> | ||||
<router-link class="dropdown-item" to="/logout"> | <router-link class="dropdown-item" to="/logout"> | ||||
@@ -134,6 +134,13 @@ export default { | |||||
show() { | show() { | ||||
this.$modal.show('add-ssh-key'); | this.$modal.show('add-ssh-key'); | ||||
this.name = ''; | |||||
this.sshPublicKey = ''; | |||||
this.minExpiration = new Date().toISOString(); | |||||
this.expiration = null; | |||||
this.timezone = this.detectedTimezone.timeZoneId; | |||||
this.submitted = false; | |||||
}, | }, | ||||
hide() { | hide() { | ||||
this.$modal.hide('add-ssh-key'); | this.$modal.hide('add-ssh-key'); | ||||
@@ -2,6 +2,7 @@ | |||||
<template> | <template> | ||||
<input | <input | ||||
v-bind="$attrs" | v-bind="$attrs" | ||||
v-on="nativeEvents" | |||||
v-model="content" | v-model="content" | ||||
@input="handleInput()" | @input="handleInput()" | ||||
class="form-input" | class="form-input" | ||||
@@ -18,6 +19,7 @@ export default { | |||||
default: '', | default: '', | ||||
}, | }, | ||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
content: this.value, | content: this.value, | ||||
@@ -28,6 +30,13 @@ export default { | |||||
this.content = v; | this.content = v; | ||||
}, | }, | ||||
}, | }, | ||||
computed: { | |||||
nativeEvents() { | |||||
return Object.keys(this.$listeners) | |||||
.filter((e) => e !== 'input') | |||||
.reduce((obj, v) => ({ ...obj, [v]: this.$listeners[v] }), {}); | |||||
}, | |||||
}, | |||||
methods: { | methods: { | ||||
handleInput(e) { | handleInput(e) { | ||||
this.$emit('input', this.content); | this.$emit('input', this.content); | ||||
@@ -48,6 +48,7 @@ | |||||
'is-invalid': submitted && errors.has('password'), | 'is-invalid': submitted && errors.has('password'), | ||||
}" | }" | ||||
v-model="password" | v-model="password" | ||||
@keyup.enter="submit" | |||||
:placeholder="messages.field_label_enter_password" | :placeholder="messages.field_label_enter_password" | ||||
/> | /> | ||||
<div | <div | ||||
@@ -65,6 +66,7 @@ | |||||
'is-invalid': submitted && errors.has('totpToken'), | 'is-invalid': submitted && errors.has('totpToken'), | ||||
}" | }" | ||||
v-model="totpToken" | v-model="totpToken" | ||||
@keyup.enter="submit" | |||||
:placeholder="messages.field_label_totp_code" | :placeholder="messages.field_label_totp_code" | ||||
/> | /> | ||||
<div | <div | ||||
@@ -177,6 +179,7 @@ export default { | |||||
...mapActions('account', ['login', 'logout']), | ...mapActions('account', ['login', 'logout']), | ||||
submit() { | submit() { | ||||
console.log('submit'); | |||||
this.errors.clear(); | this.errors.clear(); | ||||
this.$v.$touch(); | this.$v.$touch(); | ||||
this.submitted = true; | this.submitted = true; | ||||
@@ -2,7 +2,7 @@ | |||||
<template> | <template> | ||||
<div class="bubble-form"> | <div class="bubble-form"> | ||||
<h4 class="text-center form-title"> | <h4 class="text-center form-title"> | ||||
{{ messages.manage_account_delete_title }} | |||||
{{ messages.manage_account_delete_backup_title }} | |||||
</h4> | </h4> | ||||
<span v-if="me && currentUser.name != 'root'"> | <span v-if="me && currentUser.name != 'root'"> | ||||
@@ -69,7 +69,7 @@ export const router = new Router({ | |||||
// { path: '/legal', component: LegalPage }, | // { path: '/legal', component: LegalPage }, | ||||
// { path: '/support', component: SupportPage }, | // { path: '/support', component: SupportPage }, | ||||
// { path: '/me', component: ProfilePage }, | |||||
// { path: '/me/old', component: ProfilePage }, | |||||
// { path: '/me/policy', component: PolicyPage }, | // { path: '/me/policy', component: PolicyPage }, | ||||
{ | { | ||||
path: '/me/download/:uuid', | path: '/me/download/:uuid', | ||||
@@ -79,7 +79,7 @@ export const router = new Router({ | |||||
}), | }), | ||||
}, | }, | ||||
{ path: '/me/action', component: ActionPage }, | { path: '/me/action', component: ActionPage }, | ||||
// { path: '/me/changePassword', component: ChangePasswordPage }, | |||||
// { path: '/me/changePassword/old', component: ChangePasswordPage }, | |||||
// { path: '/me/setPassword/:code', component: SetPasswordPage }, | // { path: '/me/setPassword/:code', component: SetPasswordPage }, | ||||
// { path: '/me/keys', component: SshKeysPage }, | // { path: '/me/keys', component: SshKeysPage }, | ||||
// { path: '/me/bills', component: BillsPage }, | // { path: '/me/bills', component: BillsPage }, | ||||
@@ -144,8 +144,14 @@ const actions = { | |||||
commit('addSshKeyByUserIdRequest'); | commit('addSshKeyByUserIdRequest'); | ||||
return userService.addSshKeyByUserId(userId, sshKey, messages, errors) | return userService.addSshKeyByUserId(userId, sshKey, messages, errors) | ||||
.then( | .then( | ||||
key => commit('addSshKeyByUserIdSuccess', key), | |||||
error => commit('addSshKeyByUserIdFailure', error) | |||||
key => { | |||||
commit('addSshKeyByUserIdSuccess', key); | |||||
return Promise.resolve(); | |||||
}, | |||||
error => { | |||||
commit('addSshKeyByUserIdFailure', error); | |||||
return Promise.reject(); | |||||
} | |||||
); | ); | ||||
}, | }, | ||||