1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

feat: open options-tab on first visit (#4426)

* feat: open options-tab on first visit

* Use appropiate storage function

* Needed a delay

* Remove space on EOL
This commit is contained in:
Mark Haslinghuis 2025-04-18 00:02:44 +02:00 committed by GitHub
parent c17690f0f7
commit 33cb5e255d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,6 +110,19 @@ function startProcess() {
// log library versions in console to make version tracking easier
console.log(`Libraries: jQuery - ${$.fn.jquery}, three.js - ${THREE.REVISION}`);
// Check if this is the first visit
if (getConfig('firstRun').firstRun === undefined) {
setConfig({ firstRun: true });
import('./tabs/static_tab.js').then(({ staticTab }) => {
staticTab.initialize('options', () => {
setTimeout(() => {
// Open the options tab after a delay
$("#tabs .tab_options a").click();
}, 100);
});
});
}
// Tabs
$("#tabs ul.mode-connected li").click(function () {
// store the first class of the current tab (omit things like ".active")