mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 16:55:24 +03:00
FIX: Commit selection should not be available unless prerelease (#3144)
FIX: Commit selection should not be available unless the release is an "Unstable" / "zulu" release.
This commit is contained in:
parent
f861ffa7dd
commit
1c94746cb4
2 changed files with 24 additions and 18 deletions
|
@ -277,18 +277,24 @@ firmware_flasher.initialize = function (callback) {
|
|||
$('div.build_configuration').slideDown();
|
||||
|
||||
const expertMode = $('.tab-firmware_flasher input.expert_mode').is(':checked');
|
||||
if (!expertMode) {
|
||||
$('div.commitSelection').hide();
|
||||
} else {
|
||||
$('div.commitSelection').show();
|
||||
if (expertMode) {
|
||||
$('div.expertOptions').show();
|
||||
|
||||
self.releaseLoader.loadCommits(summary.release, (commits) => {
|
||||
const select_e = $('select[name="commits"]');
|
||||
select_e.empty();
|
||||
commits.forEach((commit) => {
|
||||
select_e.append($(`<option value='${commit.sha}'>${commit.message}</option>`));
|
||||
if (summary.releaseType === 'Unstable') {
|
||||
self.releaseLoader.loadCommits(summary.release, (commits) => {
|
||||
const select_e = $('select[name="commits"]');
|
||||
select_e.empty();
|
||||
commits.forEach((commit) => {
|
||||
select_e.append($(`<option value='${commit.sha}'>${commit.message}</option>`));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('div.commitSelection').show();
|
||||
} else {
|
||||
$('div.commitSelection').hide();
|
||||
}
|
||||
} else {
|
||||
$('div.expertOptions').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue