Moved edit profile saving into edit profile component file.
parent
72d31bf158
commit
ec39f7ae9b
@ -1,45 +1,45 @@
|
|||||||
/* global i18n, Whisper */
|
// /* global i18n, Whisper */
|
||||||
|
|
||||||
// eslint-disable-next-line func-names
|
// // eslint-disable-next-line func-names
|
||||||
(function() {
|
// (function() {
|
||||||
'use strict';
|
// 'use strict';
|
||||||
|
|
||||||
window.Whisper = window.Whisper || {};
|
// window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
Whisper.EditProfileDialogView = Whisper.View.extend({
|
// Whisper.EditProfileDialogView = Whisper.View.extend({
|
||||||
className: 'loki-dialog modal',
|
// className: 'loki-dialog modal',
|
||||||
initialize({ profileName, avatarPath, pubkey, onOk, theme }) {
|
// initialize({ profileName, avatarPath, pubkey, onOk, theme }) {
|
||||||
this.close = this.close.bind(this);
|
// this.close = this.close.bind(this);
|
||||||
|
|
||||||
this.profileName = profileName;
|
// this.profileName = profileName;
|
||||||
this.pubkey = pubkey;
|
// this.pubkey = pubkey;
|
||||||
this.avatarPath = avatarPath;
|
// this.avatarPath = avatarPath;
|
||||||
this.onOk = onOk;
|
// this.onOk = onOk;
|
||||||
this.theme = theme;
|
// this.theme = theme;
|
||||||
|
|
||||||
this.$el.focus();
|
// this.$el.focus();
|
||||||
this.render();
|
// this.render();
|
||||||
},
|
// },
|
||||||
render() {
|
// render() {
|
||||||
this.dialogView = new Whisper.ReactWrapperView({
|
// this.dialogView = new Whisper.ReactWrapperView({
|
||||||
className: 'edit-profile-dialog',
|
// className: 'edit-profile-dialog',
|
||||||
Component: window.Signal.Components.EditProfileDialog,
|
// Component: window.Signal.Components.EditProfileDialog,
|
||||||
props: {
|
// props: {
|
||||||
onOk: this.onOk,
|
// onOk: this.onOk,
|
||||||
onClose: this.close,
|
// onClose: this.close,
|
||||||
profileName: this.profileName,
|
// profileName: this.profileName,
|
||||||
pubkey: this.pubkey,
|
// pubkey: this.pubkey,
|
||||||
avatarPath: this.avatarPath,
|
// avatarPath: this.avatarPath,
|
||||||
i18n,
|
// i18n,
|
||||||
theme: this.theme,
|
// theme: this.theme,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.$el.append(this.dialogView.el);
|
// this.$el.append(this.dialogView.el);
|
||||||
return this;
|
// return this;
|
||||||
},
|
// },
|
||||||
close() {
|
// close() {
|
||||||
this.remove();
|
// this.remove();
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
})();
|
// })();
|
||||||
|
Loading…
Reference in New Issue