Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment for Grid Items #888

Merged
merged 8 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div v-if="isImage">
<img :src="imageUrl" alt="Image Preview" class="img-fluid rounded w-100" />
<img :src="imageUrl" alt="Image Preview" class="img-fluid border rounded-top bg-light w-100" />
</div>
</template>

Expand Down
6 changes: 3 additions & 3 deletions freedata_gui/src/components/chat_messages_received.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="row justify-content-start mb-2">
<div :class="messageWidthClass">
<div class="card bg-light border-0 text-dark">
<div class="card bg-light border rounded-top text-dark">
<div
v-for="attachment in message.attachments"
:key="attachment.id"
Expand All @@ -11,14 +11,14 @@
<chat_messages_image_preview :attachment="attachment" />

<div class="btn-group w-100" role="group">
<button class="btn btn-light text-truncate" disabled>
<button class="btn btn-light border rounded-bottom text-truncate" disabled>
{{ attachment.name }}
</button>
<button
@click="
downloadAttachment(attachment.hash_sha512, attachment.name)
"
class="btn btn-light w-25"
class="btn btn-light border rounded-bottom w-25"
>
<i class="bi bi-download strong"></i>
</button>
Expand Down
8 changes: 4 additions & 4 deletions freedata_gui/src/components/chat_messages_sent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
<!-- message area -->
<div :class="messageWidthClass" class="align-items-end">
<div class="card bg-secondary text-white">
<div class="card">
<div
v-for="attachment in message.attachments"
:key="attachment.id"
Expand All @@ -56,8 +56,8 @@
<p class="card-text text-break" v-html="parsedMessageBody"></p>
</div>

<div class="card-footer p-0 bg-secondary border-top-0">
<p class="text p-0 m-0 me-1 text-end">
<div class="card-footer p-1 border-top-0">
<p class="text p-0 m-0 mb-1 me-1 text-end">
<span class="badge badge-primary mr-2" :class="{
'bg-danger': message.status == 'failed',
'bg-primary': message.status == 'transmitting',
Expand All @@ -66,7 +66,7 @@
>
{{ message.status }}
</span>
| <span class="badge badge-primary mr-2"> attempt: {{ message.attempt + 1 }} </span>|<span class="badge badge-primary mr-2"> {{ getDateTime }} UTC</span>
| <span class="badge text-bg-light mr-2"> attempt: {{ message.attempt + 1 }} </span>|<span class="badge text-bg-light mr-2"> {{ getDateTime }} UTC</span>
</p>
</div>

Expand Down
11 changes: 8 additions & 3 deletions freedata_gui/src/components/chat_new_message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,15 @@ function applyMarkdown(formatType) {

<!-- Emoji Picker Modal -->
<div class="modal fade" id="emojiPickerModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-body p-0">
<VuemojiPicker @emojiClick="handleEmojiClick" />
<div class="modal-header">
<h5 class="modal-title">Insert emoji</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" data-bs-target="#emojiPickerModal" aria-label="Close"></button>
</div>

<div class="modal-body">
<VuemojiPicker @emojiClick="handleEmojiClick"/>
</div>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions freedata_gui/src/components/dynamic_components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ const gridWidgets = [
),
new gridWidget(
active_audio_level,
{ x: 16, y: 0, w: 8, h: 15 },
{ x: 16, y: 0, w: 8, h: 20 },
"Audio main",
false,
true,
"Audio",
2,
false,
{ x: 0, y: 114, w: 6, h: 30 }
{ x: 0, y: 114, w: 6, h: 20 }
),
new gridWidget(
grid_freq,
Expand All @@ -152,14 +152,14 @@ const gridWidgets = [
),
new gridWidget(
active_rig_control,
{ x: 0, y: 108, w: 6, h: 36 },
{ x: 0, y: 108, w: 6, h: 25 },
"Rig control main",
true,
true,
"Rig",
3,
false,
{ x: 0, y: 114, w: 6, h: 30 }
{ x: 0, y: 114, w: 6, h: 25 }
),
new gridWidget(
grid_beacon,
Expand All @@ -174,14 +174,14 @@ const gridWidgets = [
),
new gridWidget(
active_broadcasts,
{ x: 6, y: 70, w: 6, h: 15 },
{ x: 6, y: 70, w: 6, h: 25 },
"Broadcasts main (horizontal)",
false,
true,
"Broadcasts",
4,
false,
{ x: 6, y: 70, w: 6, h: 15 }
{ x: 6, y: 70, w: 6, h: 25 }
),
new gridWidget(
mini_heard_stations,
Expand Down Expand Up @@ -262,7 +262,7 @@ const gridWidgets = [
),
new gridWidget(
grid_mycall_small,
{ x: 8, y: 40, w: 4, h: 8 },
{ x: 8, y: 40, w: 4, h: 10 },
"My callsign widget (small)",
false,
true,
Expand Down
2 changes: 1 addition & 1 deletion freedata_gui/src/components/grid/grid_active_audio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const state = useStateStore(pinia);

<template>
<div class="card w-100 h-100">
<div class="card-header p-0 mb-1">
<div class="card-header mb-1">
<i class="bi bi-volume-up" style="font-size: 1rem"></i>&nbsp;
<strong>Audio</strong>
</div>
Expand Down
12 changes: 6 additions & 6 deletions freedata_gui/src/components/grid/grid_active_broadcasts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ window.addEventListener(

<template>
<div class="card h-100">
<div class="card-header p-0">
<div class="card-header">
<i class="bi bi-broadcast" style="font-size: 1.2rem"></i>&nbsp;
<strong>Broadcasts</strong>
</div>
<div class="card-body overflow-auto p-0">
<div class="input-group input-group-sm mb-0">
<div class="card-body overflow-auto">
<div class="input-group">
<input
type="text"
class="form-control"
Expand All @@ -85,7 +85,7 @@ window.addEventListener(
v-model="dxcallPing"
/>
<button
class="btn btn-sm btn-outline-secondary"
class="btn btn-outline-secondary"
id="sendPing"
type="button"
data-bs-placement="bottom"
Expand All @@ -100,7 +100,7 @@ window.addEventListener(
</button>

<button
class="btn btn-sm btn-outline-secondary ms-1"
class="btn btn-outline-secondary ms-1"
id="sendCQ"
type="button"
title="Send a CQ to the world"
Expand All @@ -113,7 +113,7 @@ window.addEventListener(
<button
type="button"
id="startBeacon"
class="btn btn-sm ms-1"
class="btn ms-1"
@click="startStopBeacon"
:class="{
'btn-success': state.beacon_state,
Expand Down
16 changes: 11 additions & 5 deletions freedata_gui/src/components/grid/grid_active_stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ const scatterChartOptions = {
position: "bottom",
grid: {
display: true,
lineWidth: 1, // Set the line width for x-axis grid lines
lineWidth: (context) => {
// Make the zero line thick (3) and other grid lines thin (1)
return context.tick.value === 0 ? 3 : 1;
},
},
ticks: {
display: false,
Expand All @@ -130,7 +133,9 @@ const scatterChartOptions = {
position: "left",
grid: {
display: true,
lineWidth: 1, // Set the line width for y-axis grid lines
lineWidth: (context) => {
return context.tick.value === 0 ? 3 : 1;
},
},
ticks: {
display: false,
Expand All @@ -147,6 +152,7 @@ const scatterChartOptions = {
},
};


const scatterChartData = computed(() => ({
datasets: [
{
Expand Down Expand Up @@ -179,7 +185,7 @@ onMounted(() => {
role="tablist"
>
<a
class="py-0 list-group-item list-group-item-dark list-group-item-action"
class="py-0 list-group-item list-group-item-light list-group-item-action"
data-bs-toggle="list"
role="tab"
aria-controls="list-waterfall"
Expand All @@ -189,7 +195,7 @@ onMounted(() => {
<strong><i class="bi bi-water"></i></strong>
</a>
<a
class="py-0 list-group-item list-group-item-dark list-group-item-action"
class="py-0 list-group-item list-group-item-light list-group-item-action"
data-bs-toggle="list"
role="tab"
aria-controls="list-scatter"
Expand All @@ -199,7 +205,7 @@ onMounted(() => {
<strong><i class="bi bi-border-outer"></i></strong>
</a>
<a
class="py-0 list-group-item list-group-item-dark list-group-item-action"
class="py-0 list-group-item list-group-item-light list-group-item-action"
data-bs-toggle="list"
role="tab"
aria-controls="list-chart"
Expand Down
2 changes: 1 addition & 1 deletion freedata_gui/src/components/grid/grid_activities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getDateTime(timestampRaw) {
<i class="bi bi-card-list" style="font-size: 1.2rem"></i>&nbsp;
<strong>Activity</strong>
</div>
<div class="card-body overflow-auto m-0 p-0" style="align-items: start">
<div class="card-body overflow-auto m-0" style="align-items: start">
<div v-for="item in state.activities" :key="item[0]">
<h6 style="text-align: start" class="mb-0">
<span class="badge text-bg-primary">{{ item[1].origin }}</span>
Expand Down
32 changes: 25 additions & 7 deletions freedata_gui/src/components/grid/grid_scatter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,26 @@ const scatterChartOptions = {
position: "bottom",
grid: {
display: true,
lineWidth: 1, // Set the line width for x-axis grid lines
lineWidth: (context) => {
// Make the zero line thick (3) and other grid lines thin (1)
return context.tick.value === 0 ? 3 : 1;
},
},
ticks: {
display: true,
display: false,
},
},
y: {
type: "linear",
position: "left",
grid: {
display: true,
lineWidth: 1, // Set the line width for y-axis grid lines
lineWidth: (context) => {
return context.tick.value === 0 ? 3 : 1;
},
},
ticks: {
display: true,
display: false,
},
},
},
Expand All @@ -68,6 +73,8 @@ const scatterChartOptions = {
},
};



const scatterChartData = computed(() => ({
datasets: [
{
Expand All @@ -83,8 +90,19 @@ const scatterChartData = computed(() => ({
</script>

<template>
<div class="w-100 h-100">
<Scatter :data="scatterChartData" :options="scatterChartOptions" />
</div>

<div class="card h-100">
<!--325px-->
<div class="card-header">
<i class="bi bi-border-outer" style="font-size: 1.2rem"></i>&nbsp;
<strong>Scatter diagram</strong>
</div>
<div class="card-body overflow-auto p-0">
<Scatter :data="scatterChartData" :options="scatterChartOptions" />
</div>
</div>



<!--278px-->
</template>
9 changes: 9 additions & 0 deletions freedata_gui/src/components/grid/grid_stats_chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,17 @@ const transmissionSpeedChartData = computed(() => ({
</script>

<template>
<div class="card h-100">
<!--325px-->
<div class="card-header">
<i class="bi bi-graph-up-arrow" style="font-size: 1.2rem"></i>&nbsp;
<strong>Transmission Charts</strong>
</div>
<div class="card-body overflow-auto p-0">
<Line
:data="transmissionSpeedChartData"
:options="transmissionSpeedChartOptions"
/>
</div>
</div>
</template>
2 changes: 1 addition & 1 deletion freedata_gui/src/components/main_footer_navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const state = useStateStore(pinia);
aria-valuemax="100"
></div>
<p class="justify-content-center m-0 d-flex position-absolute w-100 mt-1 text-light">
Message Progress {{state.arq_transmission_percent}}% [ {{ state.arq_bytes_per_minute || '---' }}
{{state.arq_transmission_percent}}% [ {{ state.arq_bytes_per_minute || '---' }}
bpm / {{ state.arq_bits_per_second || '--' }}
bps ]
</p>
Expand Down
7 changes: 7 additions & 0 deletions freedata_gui/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ th {
border-radius: 10px;
}

emoji-picker {
width: 100%;
}




/* force gpu usage
https://stackoverflow.com/questions/13176746/css-keyframe-animation-cpu-usage-is-high-should-it-be-this-way/13293044#13293044
*/
Expand Down
5 changes: 3 additions & 2 deletions freedata_server/command_transmit_sine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

class TransmitSine(TxCommand):
def transmit(self, modem):
#modem.transmit_sine()
modem.transmit_morse(0,0,[b''])
modem.transmit_sine()
# Code for debugging morse stuff...
#modem.transmit_morse(0,0,[b''])
Loading