diff --git a/src/public/javascripts/setup.js b/src/public/javascripts/setup.js index 09d102b72..3239d8a13 100644 --- a/src/public/javascripts/setup.js +++ b/src/public/javascripts/setup.js @@ -25,26 +25,20 @@ function SetupModel() { this.instanceType = utils.isElectron() ? "desktop" : "server"; - this.setupTypeSelected = this.getSetupType = () => - this.setupNewDocument() - || this.setupSyncFromDesktop() - || this.setupSyncFromServer(); + this.setupTypeSelected = () => !!this.setupType(); this.selectSetupType = () => { - this.step(this.getSetupType()); - this.setupType(this.getSetupType()); + this.step(this.setupType()); }; this.back = () => { this.step("setup-type"); - this.setupNewDocument(false); - this.setupSyncFromServer(false); - this.setupSyncFromDesktop(false); + this.setupType(""); }; this.finish = async () => { - if (this.setupNewDocument()) { + if (this.setupType() === 'new-document') { const username = this.username(); const password1 = this.password1(); const password2 = this.password2(); @@ -72,7 +66,7 @@ function SetupModel() { window.location.replace("/"); }); } - else if (this.setupSyncFromServer()) { + else if (this.setupType() === 'sync-from-server') { const syncServerHost = this.syncServerHost(); const syncProxy = this.syncProxy(); const username = this.username(); diff --git a/src/views/setup.ejs b/src/views/setup.ejs index af35f0417..b64c869fb 100644 --- a/src/views/setup.ejs +++ b/src/views/setup.ejs @@ -13,15 +13,15 @@
-
-
-