Skip to content

Build your personal knowledge base with Trilium Notes

remove checkForUpdates from login screen

zadamd825a1a45a28
diff --git a/src/public/app/widgets/buttons/global_menu.js b/src/public/app/widgets/buttons/global_menu.js
index 658b24d005..efc0c03966 100644
--- a/src/public/app/widgets/buttons/global_menu.js
+++ b/src/public/app/widgets/buttons/global_menu.js
@@ -157,14 +157,14 @@ export default class GlobalMenuWidget extends BasicWidget {
}
async updateVersionStatus() {
- if (options.get("checkForUpdates") == 'true') {
- const latestVersion = await this.fetchLatestVersion();
-
- this.updateAvailableWidget.updateVersionStatus(latestVersion);
-
- this.$updateToLatestVersionButton.toggle(latestVersion > glob.triliumVersion);
- this.$updateToLatestVersionButton.find(".version-text").text(`Version ${latestVersion} is available, click to download.`);
+ if (options.get("checkForUpdates") !== 'true') {
+ return;
}
+
+ const latestVersion = await this.fetchLatestVersion();
+ this.updateAvailableWidget.updateVersionStatus(latestVersion);
+ this.$updateToLatestVersionButton.toggle(latestVersion > glob.triliumVersion);
+ this.$updateToLatestVersionButton.find(".version-text").text(`Version ${latestVersion} is available, click to download.`);
}
async fetchLatestVersion() {
diff --git a/src/routes/login.js b/src/routes/login.js
index bd29e07651..3431f34311 100644
--- a/src/routes/login.js
+++ b/src/routes/login.js
@@ -5,7 +5,6 @@ const optionService = require('../services/options');
const myScryptService = require('../services/my_scrypt');
const log = require('../services/log');
const passwordService = require("../services/password");
-const options = require('../services/options');
function loginPage(req, res) {
res.render('login', { failedAuth: false });
@@ -37,7 +36,6 @@ function setPassword(req, res) {
return;
}
- options.setOption("checkForUpdates", req.body['check-for-updates'] == 'on');
passwordService.setPassword(password1);
res.redirect('login');
diff --git a/src/views/set_password.ejs b/src/views/set_password.ejs
index 0768f4825c..65a967de77 100644
--- a/src/views/set_password.ejs
+++ b/src/views/set_password.ejs
@@ -33,10 +33,6 @@
<input id="password" name="password2" placeholder="" class="form-control" type="password">
</div>
</div>
- <div class="form-group">
- <input checked id="check-for-updates" type="checkbox" name="check-for-updates">
- <label for="check-for-updates">Check for updates automatically</label>
- </div>
<div class="form-group">
<button class="btn btn-success">Set password</button>