onion-paths-WIP
parent
e435b6c932
commit
de3536081a
@ -1,45 +0,0 @@
|
||||
// /* global i18n, Whisper */
|
||||
|
||||
// // eslint-disable-next-line func-names
|
||||
// (function() {
|
||||
// 'use strict';
|
||||
|
||||
// window.Whisper = window.Whisper || {};
|
||||
|
||||
// Whisper.EditProfileDialogView = Whisper.View.extend({
|
||||
// className: 'loki-dialog modal',
|
||||
// initialize({ profileName, avatarPath, pubkey, onOk, theme }) {
|
||||
// this.close = this.close.bind(this);
|
||||
|
||||
// this.profileName = profileName;
|
||||
// this.pubkey = pubkey;
|
||||
// this.avatarPath = avatarPath;
|
||||
// this.onOk = onOk;
|
||||
// this.theme = theme;
|
||||
|
||||
// this.$el.focus();
|
||||
// this.render();
|
||||
// },
|
||||
// render() {
|
||||
// this.dialogView = new Whisper.ReactWrapperView({
|
||||
// className: 'edit-profile-dialog',
|
||||
// Component: window.Signal.Components.EditProfileDialog,
|
||||
// props: {
|
||||
// onOk: this.onOk,
|
||||
// onClose: this.close,
|
||||
// profileName: this.profileName,
|
||||
// pubkey: this.pubkey,
|
||||
// avatarPath: this.avatarPath,
|
||||
// i18n,
|
||||
// theme: this.theme,
|
||||
// },
|
||||
// });
|
||||
|
||||
// this.$el.append(this.dialogView.el);
|
||||
// return this;
|
||||
// },
|
||||
// close() {
|
||||
// this.remove();
|
||||
// },
|
||||
// });
|
||||
// })();
|
@ -1,37 +0,0 @@
|
||||
// /* global i18n, Whisper */
|
||||
|
||||
// // eslint-disable-next-line func-names
|
||||
// (function() {
|
||||
// 'use strict';
|
||||
|
||||
// window.Whisper = window.Whisper || {};
|
||||
|
||||
// Whisper.OnionStatusDialogView = Whisper.View.extend({
|
||||
// className: 'loki-dialog modal',
|
||||
// initialize({ theme }) {
|
||||
// this.close = this.close.bind(this);
|
||||
|
||||
// this.theme = theme;
|
||||
|
||||
// this.$el.focus();
|
||||
// this.render();
|
||||
// },
|
||||
// render() {
|
||||
// this.dialogView = new Whisper.ReactWrapperView({
|
||||
// className: 'onion-status-dialog',
|
||||
// Component: window.Signal.Components.OnionStatusDialog,
|
||||
// props: {
|
||||
// onClose: this.close,
|
||||
// i18n,
|
||||
// theme: this.theme,
|
||||
// },
|
||||
// });
|
||||
|
||||
// this.$el.append(this.dialogView.el);
|
||||
// return this;
|
||||
// },
|
||||
// close() {
|
||||
// this.remove();
|
||||
// },
|
||||
// });
|
||||
// })();
|
@ -1,54 +0,0 @@
|
||||
/* global Whisper */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.SessionNicknameDialog = Whisper.View.extend({
|
||||
className: 'loki-dialog session-nickname-wrapper modal',
|
||||
initialize(options) {
|
||||
this.props = {
|
||||
title: options.title,
|
||||
message: options.message,
|
||||
onClickOk: this.ok.bind(this),
|
||||
onClickClose: this.cancel.bind(this),
|
||||
convoId: options.convoId,
|
||||
placeholder: options.placeholder,
|
||||
};
|
||||
this.render();
|
||||
},
|
||||
registerEvents() {
|
||||
this.unregisterEvents();
|
||||
document.addEventListener('keyup', this.props.onClickClose, false);
|
||||
},
|
||||
|
||||
unregisterEvents() {
|
||||
document.removeEventListener('keyup', this.props.onClickClose, false);
|
||||
this.$('session-nickname-wrapper').remove();
|
||||
},
|
||||
render() {
|
||||
this.dialogView = new Whisper.ReactWrapperView({
|
||||
className: 'session-nickname-wrapper',
|
||||
Component: window.Signal.Components.SessionNicknameDialog,
|
||||
props: this.props,
|
||||
});
|
||||
|
||||
this.$el.append(this.dialogView.el);
|
||||
return this;
|
||||
},
|
||||
|
||||
close() {
|
||||
this.remove();
|
||||
},
|
||||
cancel() {
|
||||
this.remove();
|
||||
this.unregisterEvents();
|
||||
},
|
||||
ok() {
|
||||
this.remove();
|
||||
this.unregisterEvents();
|
||||
},
|
||||
});
|
||||
})();
|
Loading…
Reference in New Issue