mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
[CodeFactor] Apply fixes to commit 4cf915c
This commit is contained in:
parent
4cf915c399
commit
7ba7a435ef
|
@ -17,44 +17,42 @@ export const useAudioStore = defineStore("audioStore", () => {
|
|||
|
||||
function getInputDevices() {
|
||||
var html = "";
|
||||
if (inputDevices.value.length > 0){
|
||||
if (inputDevices.value.length > 0) {
|
||||
for (var key in inputDevices.value) {
|
||||
let selected = "";
|
||||
|
||||
for (var key in inputDevices.value) {
|
||||
let selected = "";
|
||||
console.log(
|
||||
"AUDIO DEVICES: " +
|
||||
inputDevices.value[key]["id"] +
|
||||
" | " +
|
||||
settings.rx_audio,
|
||||
);
|
||||
if (inputDevices.value[key]["id"] == settings.rx_audio) {
|
||||
selected = "selected";
|
||||
} else {
|
||||
selected = "";
|
||||
}
|
||||
|
||||
console.log(
|
||||
"AUDIO DEVICES: " +
|
||||
inputDevices.value[key]["id"] +
|
||||
" | " +
|
||||
settings.rx_audio,
|
||||
);
|
||||
if (inputDevices.value[key]["id"] == settings.rx_audio) {
|
||||
selected = "selected";
|
||||
} else {
|
||||
selected = "";
|
||||
html += `<option value=${inputDevices.value[key]["id"]} ${selected}>${inputDevices.value[key]["name"]} | ${inputDevices.value[key]["api"]}</option>`;
|
||||
}
|
||||
|
||||
html += `<option value=${inputDevices.value[key]["id"]} ${selected}>${inputDevices.value[key]["name"]} | ${inputDevices.value[key]["api"]}</option>`;
|
||||
}
|
||||
return html;
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
function getOutputDevices() {
|
||||
var html = "";
|
||||
|
||||
if (outputDevices.value.length > 0){
|
||||
for (var key in outputDevices.value) {
|
||||
|
||||
let selected = "";
|
||||
if (outputDevices.value[key]["id"] == settings.tx_audio) {
|
||||
selected = "selected";
|
||||
} else {
|
||||
selected = "";
|
||||
}
|
||||
html += `<option value=${outputDevices.value[key]["id"]} ${selected}>${outputDevices.value[key]["name"]} | ${outputDevices.value[key]["api"]}</option>`;
|
||||
if (outputDevices.value.length > 0) {
|
||||
for (var key in outputDevices.value) {
|
||||
let selected = "";
|
||||
if (outputDevices.value[key]["id"] == settings.tx_audio) {
|
||||
selected = "selected";
|
||||
} else {
|
||||
selected = "";
|
||||
}
|
||||
return html;
|
||||
html += `<option value=${outputDevices.value[key]["id"]} ${selected}>${outputDevices.value[key]["name"]} | ${outputDevices.value[key]["api"]}</option>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue