mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Updated mycall & freq widget
This commit is contained in:
parent
6b7df9d0a6
commit
de4eb9355b
3 changed files with 17 additions and 54 deletions
|
@ -64,7 +64,7 @@ const gridWidgets = [
|
|||
),
|
||||
new gridWidget(
|
||||
active_stats,
|
||||
{ x: 16, y: 17, w: 8, h: 80 },
|
||||
{ x: 16, y: 16, w: 8, h: 80 },
|
||||
"Stats (waterfall, etc)",
|
||||
true,
|
||||
true,
|
||||
|
@ -144,7 +144,7 @@ const gridWidgets = [
|
|||
),
|
||||
new gridWidget(
|
||||
grid_mycall,
|
||||
{ x: 0, y: 95, w: 4, h: 9 },
|
||||
{ x: 8, y: 40, w: 5, h: 8 },
|
||||
"My callsign widget",
|
||||
true,
|
||||
true,
|
||||
|
@ -168,7 +168,7 @@ const gridWidgets = [
|
|||
),
|
||||
new gridWidget(
|
||||
grid_freq,
|
||||
{ x: 20, y: 8, w: 4, h: 9 },
|
||||
{ x: 20, y: 8, w: 4, h: 8 },
|
||||
"Frequency widget",
|
||||
true,
|
||||
true,
|
||||
|
|
|
@ -7,27 +7,12 @@ import { useStateStore } from "../../store/stateStore.js";
|
|||
const state = useStateStore(pinia);
|
||||
</script>
|
||||
<template>
|
||||
<div class="w-100">
|
||||
<div class="input-group input-group-sm" style="width: calc(100% - 24px)">
|
||||
<span class="input-group-text">Hz</span>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
style="min-width: 3em"
|
||||
placeholder="mycall"
|
||||
v-model="state.frequency"
|
||||
readonly
|
||||
/>
|
||||
<a
|
||||
class="btn btn-secondary dropdown-toggle"
|
||||
v-bind:class="{
|
||||
disabled: state.hamlib_status === 'disconnected',
|
||||
}"
|
||||
type="button"
|
||||
data-bs-toggle="offcanvas"
|
||||
<a
|
||||
class="d-flex justify-content-center align-items-center object-fill border rounded w-100 h-100 link-underline link-underline-opacity-0 link-underline-opacity-75-hover"
|
||||
:class="state.ptt_state === true ? 'text-bg-warning' : 'text-bg-light'"
|
||||
data-bs-toggle="offcanvas"
|
||||
data-bs-target="#offcanvasFrequency"
|
||||
></a>
|
||||
</div>
|
||||
</div>
|
||||
>
|
||||
{{ state.frequency / 1000}} kHz
|
||||
</a>
|
||||
</template>
|
||||
|
|
|
@ -5,40 +5,18 @@ import { setConfig } from "../../js/api";
|
|||
import pinia from "../../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { settingsStore as setting } from "../../store/settingsStore.js";
|
||||
const settings = reactive(setting);
|
||||
import { useStateStore } from "../../store/stateStore.js";
|
||||
|
||||
const state = useStateStore(pinia);
|
||||
import { settingsStore } from "../../store/settingsStore.js";
|
||||
|
||||
function updateMyCall() {
|
||||
setConfig();
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="w-100">
|
||||
<div class="input-group input-group-sm" style="width: calc(100% - 24px)">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
style="min-width: 3em"
|
||||
placeholder="mycall"
|
||||
v-model="settings.remote.STATION.mycall"
|
||||
/>
|
||||
<span class="input-group-text">-</span>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
style="min-width: 2em; max-width: 2.5em"
|
||||
placeholder="id"
|
||||
v-model="settings.remote.STATION.myssid"
|
||||
/>
|
||||
<a
|
||||
class="btn btn-sm btn-secondary"
|
||||
title="Apply changes to callsign/ssid"
|
||||
@click="updateMyCall"
|
||||
><i class="bi bi-check"></i
|
||||
></a>
|
||||
</div>
|
||||
<div
|
||||
class="d-flex justify-content-center align-items-center object-fill border rounded text-bg-light w-100 h-100"
|
||||
><strong>
|
||||
{{ settingsStore.remote.STATION.mycall}}-{{ settingsStore.remote.STATION.myssid}}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue