From daa6a0b2bc7e99203c6c9564e3632afb74180c59 Mon Sep 17 00:00:00 2001 From: smiley Date: Wed, 15 Jun 2016 11:25:08 +0000 Subject: [PATCH] Update main_window.js --- src/app/lib/views/main_window.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 3c1c8772..d702c5d6 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -17,6 +17,7 @@ Settings: '#settings-container', InitModal: '#initializing', Disclaimer: '#disclaimer-container', + Register: '#disclaimer-container', About: '#about-container', Keyboard: '#keyboard-container', Help: '#help-container', @@ -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)); @@ -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; @@ -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()); },