mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
[CodeFactor] Apply fixes
This commit is contained in:
parent
cf0e9de0ea
commit
ee0d559d94
3 changed files with 40 additions and 35 deletions
|
@ -8,8 +8,6 @@ const settings = useSettingsStore(pinia);
|
||||||
|
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -54,10 +52,6 @@ const state = useStateStore(pinia);
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2 mb-1">
|
<div class="card-body p-2 mb-1">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-secondary btn-sm ms-1 me-1"
|
class="btn btn-secondary btn-sm ms-1 me-1"
|
||||||
id="updater_channel"
|
id="updater_channel"
|
||||||
|
|
|
@ -31,7 +31,6 @@ onMounted(() => {
|
||||||
getModemConfig();
|
getModemConfig();
|
||||||
getModemVersion();
|
getModemVersion();
|
||||||
new Modal("#modemCheck", {}).show();
|
new Modal("#modemCheck", {}).show();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getModemState() {
|
function getModemState() {
|
||||||
|
@ -77,12 +76,16 @@ function getNetworkState() {
|
||||||
data-bs-target="#networkStatusCollapse"
|
data-bs-target="#networkStatusCollapse"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
>
|
>
|
||||||
Network <span class="badge ms-2 bg-success" :class="
|
Network
|
||||||
|
<span
|
||||||
|
class="badge ms-2 bg-success"
|
||||||
|
:class="
|
||||||
state.modem_connection === 'connected'
|
state.modem_connection === 'connected'
|
||||||
? 'bg-success'
|
? 'bg-success'
|
||||||
: 'bg-danger'
|
: 'bg-danger'
|
||||||
"
|
"
|
||||||
>{{ getNetworkState() }}</span>
|
>{{ getNetworkState() }}</span
|
||||||
|
>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div
|
<div
|
||||||
|
@ -91,31 +94,35 @@ function getNetworkState() {
|
||||||
>
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<div class="input-group input-group-sm mb-1">
|
<div class="input-group input-group-sm mb-1">
|
||||||
<span class="input-group-text" style="width: 180px">Modem port</span>
|
<span class="input-group-text" style="width: 180px"
|
||||||
<input
|
>Modem port</span
|
||||||
type="text"
|
>
|
||||||
class="form-control"
|
<input
|
||||||
placeholder="modem port"
|
type="text"
|
||||||
id="modem_port"
|
class="form-control"
|
||||||
maxlength="5"
|
placeholder="modem port"
|
||||||
max="65534"
|
id="modem_port"
|
||||||
min="1025"
|
maxlength="5"
|
||||||
@change="saveModemConfig()"
|
max="65534"
|
||||||
v-model="settings.modem_port"
|
min="1025"
|
||||||
/>
|
@change="saveModemConfig()"
|
||||||
</div>
|
v-model="settings.modem_port"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="input-group input-group-sm mb-1">
|
<div class="input-group input-group-sm mb-1">
|
||||||
<span class="input-group-text" style="width: 180px">Modem host</span>
|
<span class="input-group-text" style="width: 180px"
|
||||||
<input
|
>Modem host</span
|
||||||
type="text"
|
>
|
||||||
class="form-control"
|
<input
|
||||||
placeholder="modem host"
|
type="text"
|
||||||
id="modem_port"
|
class="form-control"
|
||||||
@change="saveModemConfig"
|
placeholder="modem host"
|
||||||
v-model="settings.modem_host"
|
id="modem_port"
|
||||||
/>
|
@change="saveModemConfig"
|
||||||
</div>
|
v-model="settings.modem_host"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
Placeholder content for this accordion, which is intended to
|
Placeholder content for this accordion, which is intended to
|
||||||
demonstrate the <code>.accordion-flush</code> class. This is
|
demonstrate the <code>.accordion-flush</code> class. This is
|
||||||
the first item's accordion body.
|
the first item's accordion body.
|
||||||
|
|
|
@ -14,7 +14,12 @@ export function getModemConfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveModemConfig() {
|
export function saveModemConfig() {
|
||||||
postToServer(settings.modem_host, settings.modem_port, "config", getModemConfigAsJSON());
|
postToServer(
|
||||||
|
settings.modem_host,
|
||||||
|
settings.modem_port,
|
||||||
|
"config",
|
||||||
|
getModemConfigAsJSON(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function startModem() {
|
export function startModem() {
|
||||||
|
@ -27,5 +32,4 @@ export function stopModem() {
|
||||||
|
|
||||||
export function getModemVersion() {
|
export function getModemVersion() {
|
||||||
getFromServer(settings.modem_host, settings.modem_port, "version", null);
|
getFromServer(settings.modem_host, settings.modem_port, "version", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue