feat: added versionning & About window

This commit is contained in:
2026-06-16 19:36:56 +02:00
parent 33af122964
commit 69d0780bac
16 changed files with 1398 additions and 56 deletions
+73
View File
@@ -104,6 +104,30 @@ export namespace award {
this.confirmed = source["confirmed"];
}
}
export class OrRule {
field: string;
match_by?: string;
exact_match?: boolean;
pattern?: string;
leading_str?: string;
trailing_str?: string;
prefix?: string;
static createFrom(source: any = {}) {
return new OrRule(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.match_by = source["match_by"];
this.exact_match = source["exact_match"];
this.pattern = source["pattern"];
this.leading_str = source["leading_str"];
this.trailing_str = source["trailing_str"];
this.prefix = source["prefix"];
}
}
export class Def {
code: string;
name: string;
@@ -126,6 +150,7 @@ export namespace award {
multi?: boolean;
dynamic?: boolean;
add_prefixes?: string[];
or_rules?: OrRule[];
dxcc_filter: number[];
valid_bands?: string[];
valid_modes?: string[];
@@ -164,6 +189,7 @@ export namespace award {
this.multi = source["multi"];
this.dynamic = source["dynamic"];
this.add_prefixes = source["add_prefixes"];
this.or_rules = this.convertValues(source["or_rules"], OrRule);
this.dxcc_filter = source["dxcc_filter"];
this.valid_bands = source["valid_bands"];
this.valid_modes = source["valid_modes"];
@@ -175,7 +201,26 @@ export namespace award {
this.total = source["total"];
this.builtin = source["builtin"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Ref {
ref: string;
name?: string;
@@ -340,6 +385,28 @@ export namespace awardref {
export namespace cat {
export class FlexRadio {
ip: string;
port: number;
model: string;
nickname: string;
serial: string;
callsign: string;
static createFrom(source: any = {}) {
return new FlexRadio(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.ip = source["ip"];
this.port = source["port"];
this.model = source["model"];
this.nickname = source["nickname"];
this.serial = source["serial"];
this.callsign = source["callsign"];
}
}
export class RigState {
enabled: boolean;
connected: boolean;
@@ -830,6 +897,9 @@ export namespace main {
enabled: boolean;
backend: string;
omnirig_rig: number;
flex_host: string;
flex_port: number;
flex_spots: boolean;
poll_ms: number;
delay_ms: number;
digital_default: string;
@@ -843,6 +913,9 @@ export namespace main {
this.enabled = source["enabled"];
this.backend = source["backend"];
this.omnirig_rig = source["omnirig_rig"];
this.flex_host = source["flex_host"];
this.flex_port = source["flex_port"];
this.flex_spots = source["flex_spots"];
this.poll_ms = source["poll_ms"];
this.delay_ms = source["delay_ms"];
this.digital_default = source["digital_default"];