diff options
author | Shah El-Rahman <selrahman@gitlab.com> | 2018-04-06 12:36:22 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-04-06 12:36:22 +0300 |
commit | 43ef375e084884ed4260ac9c9de8f601d5594c90 (patch) | |
tree | b5214f9deb9f389e5428f5c011b9c7cbfc55d506 /app/assets/javascripts/profile/account/index.js | |
parent | ca330f7ea30b368b928f5468a1f53264d74aa8aa (diff) |
Add confirmation modal to "Change username"
Diffstat (limited to 'app/assets/javascripts/profile/account/index.js')
-rw-r--r-- | app/assets/javascripts/profile/account/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/profile/account/index.js b/app/assets/javascripts/profile/account/index.js index 84049a1f0b7..59c13e1a042 100644 --- a/app/assets/javascripts/profile/account/index.js +++ b/app/assets/javascripts/profile/account/index.js @@ -1,10 +1,25 @@ import Vue from 'vue'; import Translate from '~/vue_shared/translate'; +import UpdateUsername from './components/update_username.vue'; import deleteAccountModal from './components/delete_account_modal.vue'; export default () => { Vue.use(Translate); + const updateUsernameElement = document.getElementById('update-username'); + // eslint-disable-next-line no-new + new Vue({ + el: updateUsernameElement, + components: { + UpdateUsername, + }, + render(createElement) { + return createElement('update-username', { + props: { ...updateUsernameElement.dataset }, + }); + }, + }); + const deleteAccountButton = document.getElementById('delete-account-button'); const deleteAccountModalEl = document.getElementById('delete-account-modal'); // eslint-disable-next-line no-new |