mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Fix some issues with check modal and modem refresh btn
This commit is contained in:
parent
22e2f2f08a
commit
01ae2748c8
2 changed files with 25 additions and 5 deletions
|
@ -28,11 +28,15 @@ var updateAvailable = process.env.FDUpdateAvail;
|
|||
|
||||
// start modemCheck modal once on startup
|
||||
onMounted(() => {
|
||||
getModemState();
|
||||
getVersion();
|
||||
getModemState().then();
|
||||
getVersion().then(res => {state.modem_version=res});
|
||||
new Modal("#modemCheck", {}).show();
|
||||
});
|
||||
|
||||
function refreshModem() {
|
||||
getModemState();
|
||||
}
|
||||
|
||||
function getModemStateLocal() {
|
||||
// Returns active/inactive if modem is running for modem status label
|
||||
if (state.is_modem_running == true) return "Active";
|
||||
|
@ -197,6 +201,20 @@ function testHamlib() {
|
|||
<i class="bi bi-stop-fill"></i>
|
||||
</button>
|
||||
</label>
|
||||
<label class="input-group-text">
|
||||
<button
|
||||
type="button"
|
||||
id="refreshModem"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-trigger="hover"
|
||||
data-bs-html="false"
|
||||
title="Refresh modem status."
|
||||
@click="refreshModem"
|
||||
>
|
||||
<i class="bi bi-bullseye"></i>
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
<!-- Audio Input Device -->
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
|
|
|
@ -35,11 +35,13 @@ export async function apiPost(endpoint, payload = {}) {
|
|||
}
|
||||
}
|
||||
|
||||
export function getVersion() {
|
||||
return apiGet("/version");
|
||||
export async function getVersion() {
|
||||
let data = await apiGet("/version").then(res => {return res});
|
||||
return data.version;
|
||||
//return data["version"];
|
||||
}
|
||||
|
||||
export function getConfig() {
|
||||
export async function getConfig() {
|
||||
return apiGet("/config");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue