mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Adding custom define input box (#3074)
This commit is contained in:
parent
b0a2c40c22
commit
2a01685373
4 changed files with 25 additions and 1 deletions
|
@ -6740,5 +6740,11 @@
|
||||||
},
|
},
|
||||||
"firmwareFlasherBranchDescription": {
|
"firmwareFlasherBranchDescription": {
|
||||||
"message": "Especially useful for developers, you can select a merged PR, specify a commit sha, or specify a 'yet to be merged' PR by typing in: pull/{PR number}/head ."
|
"message": "Especially useful for developers, you can select a merged PR, specify a commit sha, or specify a 'yet to be merged' PR by typing in: pull/{PR number}/head ."
|
||||||
|
},
|
||||||
|
"firmwareFlasherCustomDefinesDescription": {
|
||||||
|
"message": "For developers, you can add any defines you need, separated by a `space`, but without the `USE_` prefix, it will be added automatically for you."
|
||||||
|
},
|
||||||
|
"firmwareFlasherBuildCustomDefines": {
|
||||||
|
"message": "Custom Defines"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,9 +324,17 @@ button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
select {
|
input {
|
||||||
background-color: #3a3a3a;
|
background-color: #3a3a3a;
|
||||||
color: white;
|
color: white;
|
||||||
|
border: solid 1px var(--subtleAccent);
|
||||||
|
border-radius: 3px;
|
||||||
|
min-height: 20px;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
background-color: #424242;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.options {
|
.options {
|
||||||
|
|
|
@ -807,6 +807,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
|
|
||||||
if (summary.releaseType === "Unstable") {
|
if (summary.releaseType === "Unstable") {
|
||||||
request.commit = $('select[name="commits"] option:selected').val();
|
request.commit = $('select[name="commits"] option:selected').val();
|
||||||
|
$('input[name="customDefines"]').val().split(' ').map(element => element.trim()).forEach(v => {
|
||||||
|
request.options.push(v);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.releaseLoader.requestBuild(request, (info) => {
|
self.releaseLoader.requestBuild(request, (info) => {
|
||||||
|
|
|
@ -200,6 +200,13 @@
|
||||||
<div class="helpicon cf_tip_wide" i18n_title="firmwareFlasherBranchDescription"></div>
|
<div class="helpicon cf_tip_wide" i18n_title="firmwareFlasherBranchDescription"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 49%; float: right;">
|
||||||
|
<strong i18n="firmwareFlasherBuildCustomDefines"></strong>
|
||||||
|
<div id="customDefinesInfo">
|
||||||
|
<input id="customDefines" name="customDefines" style="width: 95%"></input>
|
||||||
|
<div class="helpicon cf_tip_wide" i18n_title="firmwareFlasherCustomDefinesDescription"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue