[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io 2023-11-13 19:12:09 +00:00
parent cf0e9de0ea
commit ee0d559d94
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
3 changed files with 40 additions and 35 deletions

View file

@ -8,8 +8,6 @@ const settings = useSettingsStore(pinia);
import { useStateStore } from "../store/stateStore.js";
const state = useStateStore(pinia);
</script>
<template>
@ -54,10 +52,6 @@ const state = useStateStore(pinia);
</div>
</div>
<div class="card-body p-2 mb-1">
<button
class="btn btn-secondary btn-sm ms-1 me-1"
id="updater_channel"

View file

@ -31,7 +31,6 @@ onMounted(() => {
getModemConfig();
getModemVersion();
new Modal("#modemCheck", {}).show();
});
function getModemState() {
@ -77,12 +76,16 @@ function getNetworkState() {
data-bs-target="#networkStatusCollapse"
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'
? 'bg-success'
: 'bg-danger'
"
>{{ getNetworkState() }}</span>
>{{ getNetworkState() }}</span
>
</button>
</h2>
<div
@ -91,31 +94,35 @@ function getNetworkState() {
>
<div class="accordion-body">
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px">Modem port</span>
<input
type="text"
class="form-control"
placeholder="modem port"
id="modem_port"
maxlength="5"
max="65534"
min="1025"
@change="saveModemConfig()"
v-model="settings.modem_port"
/>
</div>
<span class="input-group-text" style="width: 180px"
>Modem port</span
>
<input
type="text"
class="form-control"
placeholder="modem port"
id="modem_port"
maxlength="5"
max="65534"
min="1025"
@change="saveModemConfig()"
v-model="settings.modem_port"
/>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px">Modem host</span>
<input
type="text"
class="form-control"
placeholder="modem host"
id="modem_port"
@change="saveModemConfig"
v-model="settings.modem_host"
/>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px"
>Modem host</span
>
<input
type="text"
class="form-control"
placeholder="modem host"
id="modem_port"
@change="saveModemConfig"
v-model="settings.modem_host"
/>
</div>
Placeholder content for this accordion, which is intended to
demonstrate the <code>.accordion-flush</code> class. This is
the first item's accordion body.

View file

@ -14,7 +14,12 @@ export function getModemConfig() {
}
export function saveModemConfig() {
postToServer(settings.modem_host, settings.modem_port, "config", getModemConfigAsJSON());
postToServer(
settings.modem_host,
settings.modem_port,
"config",
getModemConfigAsJSON(),
);
}
export function startModem() {
@ -27,5 +32,4 @@ export function stopModem() {
export function getModemVersion() {
getFromServer(settings.modem_host, settings.modem_port, "version", null);
}