mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 06:17:41 +00:00
Split out event type SIGs, and do other enum conversions. Closes #138
This commit is contained in:
@@ -19,8 +19,9 @@ info:
|
||||
|
||||
* Added DTMBA, FEA, BIWOTA, COTA & PGA SIGs
|
||||
* Removed the distinction between LSB & USB (both will now show as SSB) and between the various digital voice modes, which will now show as DV.
|
||||
* Added `icon`, `region_flag` and `refs_globally_unique` to SIG information
|
||||
* Unknown mode types now return "UNKNOWN" not null
|
||||
* Added `sig_type`, `icon`, `region_flag` and `refs_globally_unique` to SIG information
|
||||
* Unknown modes and mode types now return "UNKNOWN" not null
|
||||
* SIG reference types (e.g. "Park") are now capitalised to match other enums
|
||||
|
||||
### 2.0
|
||||
|
||||
@@ -867,6 +868,14 @@ components:
|
||||
- Toilets
|
||||
example: POTA
|
||||
|
||||
SIGType:
|
||||
type: string
|
||||
enum:
|
||||
- WORLDWIDE
|
||||
- REGIONAL
|
||||
- EVENT
|
||||
example: WORLDWIDE
|
||||
|
||||
SIGNameIncludingNoSIG:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/SIGName"
|
||||
@@ -874,6 +883,29 @@ components:
|
||||
enum: [ NO_SIG ]
|
||||
example: POTA
|
||||
|
||||
SIGRefType:
|
||||
type: string
|
||||
enum:
|
||||
- PARK
|
||||
- SUMMIT
|
||||
- CASTLE
|
||||
- LIGHTHOUSE
|
||||
- ISLAND
|
||||
- BUNKER
|
||||
- MILL
|
||||
- SILO
|
||||
- BEACH
|
||||
- LAKE
|
||||
- TOWER
|
||||
- WATERWAY
|
||||
- TOWN
|
||||
- BUILDING
|
||||
- REGION
|
||||
- GRID
|
||||
- TOILET
|
||||
- UNKNOWN
|
||||
example: PARK
|
||||
|
||||
Continent:
|
||||
type: string
|
||||
enum:
|
||||
@@ -938,6 +970,7 @@ components:
|
||||
- FSK
|
||||
- PKT
|
||||
- MSK144
|
||||
- UNKNOWN
|
||||
example: SSB
|
||||
|
||||
ModeType:
|
||||
@@ -1006,9 +1039,8 @@ components:
|
||||
description: SIG reference name
|
||||
example: Null Country Park
|
||||
ref_type:
|
||||
type: string
|
||||
description: SIG reference type
|
||||
example: Park
|
||||
$ref: "#/components/schemas/SIGRefType"
|
||||
url:
|
||||
type: string
|
||||
description: SIG reference URL, which the user can look up for more information
|
||||
@@ -1493,6 +1525,12 @@ components:
|
||||
type: string
|
||||
description: The full name of the SIG
|
||||
example: Parks on the Air
|
||||
sig_type:
|
||||
type: boolean
|
||||
description: >
|
||||
Whether the SIG is worldwide, regional, or for a specific event. Generally for Spothole's own internal use,
|
||||
clients probably won't need this. Used to group them in the web UI.
|
||||
$ref: "#/components/schemas/SIGType"
|
||||
comment_names:
|
||||
type: array
|
||||
description: >
|
||||
|
||||
@@ -42,18 +42,25 @@ function setHamHFBandToggles() {
|
||||
function generateSIGsMultiToggleFilterCard(sig_options) {
|
||||
const $grid1 = $('<div class="row row-cols-2 g-1 mb-1">');
|
||||
$("#sig-options").append('<strong>Worldwide</strong>');
|
||||
sig_options.filter(o => o["region_flag"] == null).forEach(o => {
|
||||
sig_options.filter(o => o["sig_type"] === "WORLDWIDE").forEach(o => {
|
||||
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
|
||||
$grid1.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']}</label></div></div>`);
|
||||
$grid1.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
|
||||
});
|
||||
$("#sig-options").append($grid1);
|
||||
const $grid2 = $('<div class="row row-cols-2 g-1 mb-1">');
|
||||
$("#sig-options").append('<strong>Regional</strong>');
|
||||
sig_options.filter(o => o["region_flag"] != null).forEach(o => {
|
||||
sig_options.filter(o => o["sig_type"] === "REGIONAL").forEach(o => {
|
||||
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
|
||||
$grid2.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${o['region_flag']}</label></div></div>`);
|
||||
$grid2.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
|
||||
});
|
||||
$("#sig-options").append($grid2);
|
||||
const $grid3 = $('<div class="row row-cols-2 g-1 mb-1">');
|
||||
$("#sig-options").append('<strong>Event</strong>');
|
||||
sig_options.filter(o => o["sig_type"] === "EVENT").forEach(o => {
|
||||
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
|
||||
$grid3.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
|
||||
});
|
||||
$("#sig-options").append($grid3);
|
||||
$("#sig-options").append('<strong>Other</strong>');
|
||||
// Bonus "NO_SIG" / "General DX" option
|
||||
$("#sig-options").append(`<div class="w-100"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label></div></div>`);
|
||||
|
||||
Reference in New Issue
Block a user