diff --git a/app/javascript/dashboard/routes/dashboard/settings/personal/ChangePassword.vue b/app/javascript/dashboard/routes/dashboard/settings/personal/ChangePassword.vue new file mode 100644 index 000000000000..0c2fa9e7863a --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/personal/ChangePassword.vue @@ -0,0 +1,137 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/personal/HotKeyCard.vue b/app/javascript/dashboard/routes/dashboard/settings/personal/HotKeyCard.vue new file mode 100644 index 000000000000..35cbbeb7bea4 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/personal/HotKeyCard.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/personal/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/personal/Index.vue index 2ba74a90b32e..78f4c61bf051 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/personal/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/personal/Index.vue @@ -33,6 +33,35 @@ @update-signature="updateSignature" /> + +
+ +
+
+ + + @@ -49,6 +78,8 @@ import { clearCookiesOnLogout } from 'dashboard/store/utils/api.js'; import UserProfilePicture from './UserProfilePicture.vue'; import UserBasicDetails from './UserBasicDetails.vue'; import MessageSignature from './MessageSignature.vue'; +import HotKeyCard from './HotKeyCard.vue'; +import ChangePassword from './ChangePassword.vue'; import FormSection from 'dashboard/components/FormSection.vue'; export default { @@ -57,6 +88,8 @@ export default { FormSection, UserProfilePicture, UserBasicDetails, + HotKeyCard, + ChangePassword, }, mixins: [alertMixin, globalConfigMixin, uiSettingsMixin], data() { @@ -67,6 +100,31 @@ export default { displayName: '', email: '', messageSignature: '', + hotKeys: [ + { + key: 'enter', + title: this.$t( + 'PROFILE_SETTINGS.FORM.SEND_MESSAGE.CARD.ENTER_KEY.HEADING' + ), + description: this.$t( + 'PROFILE_SETTINGS.FORM.SEND_MESSAGE.CARD.ENTER_KEY.CONTENT' + ), + lightImage: '/assets/images/dashboard/profile/hot-key-enter.svg', + darkImage: '/assets/images/dashboard/profile/hot-key-enter-dark.svg', + }, + { + key: 'cmd_enter', + title: this.$t( + 'PROFILE_SETTINGS.FORM.SEND_MESSAGE.CARD.CMD_ENTER_KEY.HEADING' + ), + description: this.$t( + 'PROFILE_SETTINGS.FORM.SEND_MESSAGE.CARD.CMD_ENTER_KEY.CONTENT' + ), + lightImage: '/assets/images/dashboard/profile/hot-key-ctrl-enter.svg', + darkImage: + '/assets/images/dashboard/profile/hot-key-ctrl-enter-dark.svg', + }, + ], }; }, computed: { @@ -156,6 +214,15 @@ export default { this.showAlert(this.$t('PROFILE_SETTINGS.AVATAR_DELETE_FAILED')); } }, + toggleHotKey(key) { + this.hotKeys = this.hotKeys.map(hotKey => + hotKey.key === key ? { ...hotKey, active: !hotKey.active } : hotKey + ); + this.updateUISettings({ editor_message_key: key }); + this.showAlert( + this.$t('PROFILE_SETTINGS.FORM.SEND_MESSAGE.UPDATE_SUCCESS') + ); + }, }, }; diff --git a/public/assets/images/dashboard/profile/hot-key-ctrl-enter-dark.svg b/public/assets/images/dashboard/profile/hot-key-ctrl-enter-dark.svg new file mode 100644 index 000000000000..8c0cab866559 --- /dev/null +++ b/public/assets/images/dashboard/profile/hot-key-ctrl-enter-dark.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/dashboard/profile/hot-key-ctrl-enter.svg b/public/assets/images/dashboard/profile/hot-key-ctrl-enter.svg new file mode 100644 index 000000000000..15edc521b7cc --- /dev/null +++ b/public/assets/images/dashboard/profile/hot-key-ctrl-enter.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/dashboard/profile/hot-key-enter-dark.svg b/public/assets/images/dashboard/profile/hot-key-enter-dark.svg new file mode 100644 index 000000000000..9bc38bbba04e --- /dev/null +++ b/public/assets/images/dashboard/profile/hot-key-enter-dark.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/dashboard/profile/hot-key-enter.svg b/public/assets/images/dashboard/profile/hot-key-enter.svg new file mode 100644 index 000000000000..b27f4ee0b03b --- /dev/null +++ b/public/assets/images/dashboard/profile/hot-key-enter.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + +