Skip to content

Commit

Permalink
Update main_window.js
Browse files Browse the repository at this point in the history
  • Loading branch information
YIFYtorrents authored Jun 15, 2016
1 parent b69a212 commit daa6a0b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/app/lib/views/main_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Settings: '#settings-container',
InitModal: '#initializing',
Disclaimer: '#disclaimer-container',
Register: '#disclaimer-container',
About: '#about-container',
Keyboard: '#keyboard-container',
Help: '#help-container',
Expand Down Expand Up @@ -85,6 +86,10 @@
App.vent.on('disclaimer:show', _.bind(this.showDisclaimer, this));
App.vent.on('disclaimer:close', _.bind(this.Disclaimer.destroy, this.Disclaimer));

// Add event to show register
App.vent.on('register:show', _.bind(this.showRegister, this));
App.vent.on('register:close', _.bind(this.Register.destroy, this.Register));

// Add event to show about
App.vent.on('about:show', _.bind(this.showAbout, this));
App.vent.on('about:close', _.bind(this.About.destroy, this.About));
Expand Down Expand Up @@ -188,6 +193,11 @@
that.showDisclaimer();
}

// we check if the register is accepted
if (AdvSettings.get('rememberRegister')) {// || !AdvSettings.get('registerTorrents')
that.showRegister();
}

that.InitModal.destroy();

var lastOpen = (Settings.startScreen === 'Last Open') ? true : false;
Expand Down Expand Up @@ -330,6 +340,10 @@
this.Disclaimer.show(new App.View.DisclaimerModal());
},

showRegister: function (e) {
this.Register.show(new App.View.RegisterModal());
},

showAbout: function (e) {
this.About.show(new App.View.About());
},
Expand Down

0 comments on commit daa6a0b

Please sign in to comment.