signal-desktop/js/options.js
lilia 44a4ff3b52 Refactor install view
Let install view manage the connection to the provisioning socket as
well as cleaning up the window on completion, simplifying options.js.
Call `remove` so that the view stops listening when the window closes.
Move view script and template to background page.
Adds ability to hide nav if this isn't our first run.

// FREEBIE
2017-04-13 13:15:42 -07:00

25 lines
744 B
JavaScript

/*
* vim: ts=4:sw=4:expandtab
*/
;(function() {
'use strict';
extension.windows.getBackground(function(bg) {
bg.storage.onready(function() {
$(function() {
var Whisper = bg.Whisper;
var installView = new Whisper.InstallView({
el: $('#install')
});
if (Whisper.Registration.everDone()) {
installView.selectStep(3);
installView.hideDots();
}
installView.$el.show();
Whisper.events.on('contactsync', function() {
bg.openInbox();
window.close();
});
});
});
});
})();