From 2a3d26146534e7670bf8233314e666802a867dbe Mon Sep 17 00:00:00 2001 From: cTn Date: Sun, 17 Aug 2014 13:29:07 +0200 Subject: [PATCH] added time based update reminder (informing people on dev branch and ones with broken chrome auto-update mechanism) --- js/data_storage.js | 1 + main.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/js/data_storage.js b/js/data_storage.js index aec6aafd44..a2fd0089d1 100644 --- a/js/data_storage.js +++ b/js/data_storage.js @@ -1,6 +1,7 @@ 'use strict'; var CONFIGURATOR = { + 'releaseDate': 1408273765004, // 08.17.2014 'firmwareVersionAccepted': 2.3, 'connectionValid': false, 'mspPassThrough': false, diff --git a/main.js b/main.js index a6fde8b86c..3634a870d8 100644 --- a/main.js +++ b/main.js @@ -42,6 +42,12 @@ $(document).ready(function () { break; } + // check release time to inform people in case they are running old release + if (CONFIGURATOR.releaseDate < (new Date().getTime() - (86400000 * 60))) { // 1 day = 86400000 miliseconds, * 60 = 2 month window + GUI.log('You\'re using an old version of Baseflight - Configurator. Please update so you can benefit from recently added features and bugfixes.'); + } + + // Tabs var ui_tabs = $('#tabs > ul'); $('a', ui_tabs).click(function () {