1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 12:55:13 +03:00
inav-configurator/tabs/landing.js
Dominic Clifton d269d60391 Improve user experience by adding tabs for the welcome and firmware
flasher.

The welcome (aka 'landing') and firmware flasher were already modelled
as tabs but were never displayed as tabs.

The UI didn't make sense when the whether the welcome message or
firmware flasher was displayed since there was no active tab or other
indication.
2015-01-25 17:37:47 +01:00

31 lines
No EOL
882 B
JavaScript

'use strict';
TABS.landing = {};
TABS.landing.initialize = function (callback) {
var self = this;
if (GUI.active_tab != 'landing') {
GUI.active_tab = 'landing';
googleAnalytics.sendAppView('Landing');
}
$('#content').load("./tabs/landing.html", function () {
//check_usb_permissions(); // temporary enabled in dev branch, should be commented out untill DFU support goes live
// translate to user-selected language
localize();
// load changelog content
$('div.changelog.configurator .wrapper').load('./changelog.html');
$('div.welcome a, div.sponsors a').click(function () {
googleAnalytics.sendEvent('ExternalUrls', 'Click', $(this).prop('href'));
});
if (callback) callback();
});
};
TABS.landing.cleanup = function (callback) {
if (callback) callback();
};