feat(appearance): colour log rows by QSL status, and fix UDP QSO numbering
New Settings → Appearance section: whole-row colouring in the log grid driven by QSL / LoTW state, each rule with its own colour from a palette or a free picker. What Logger32 does, with one difference that matters — the colour is applied as a 24% tint, not a fill. Logger32's grid is white; this one is dark, and a saturated user-picked colour behind white text is unreadable at exactly the moment the operator is scanning for what still needs sending. Rules are ORDERED and the first match wins, because a contact is usually several of these at once: one confirmed on LoTW and by card is confirmed, not "sent, awaiting reply". The order lives in the data so the panel can show the rules in the order they actually apply, numbered. The colour is interpolated into a CSS color-mix(), so anything that is not plainly #rrggbb is refused on the way in and falls back to the default. Also fixes the QSO number column, which was empty for contacts logged from WSJT-X: that path inserts through the repo directly and never reached AddQSO. Rather than chase each of the remaining bulk-insert paths — the POTA hunter import and the LoTW/QRZ "add what I was missing" passes, which insert OLD dates and so shift every number after them — the index now checks its length against a COUNT and rebuilds when they disagree. One indexed count beats remembering to invalidate in a place that does not exist yet.
This commit is contained in:
Vendored
+4
@@ -492,6 +492,8 @@ export function GetRotatorHeading():Promise<main.RotatorHeading>;
|
||||
|
||||
export function GetRotators():Promise<Array<main.RotatorDevice>>;
|
||||
|
||||
export function GetRowColors():Promise<main.RowColorSettings>;
|
||||
|
||||
export function GetSPEStatus():Promise<spe.Status>;
|
||||
|
||||
export function GetScpStatus():Promise<main.ScpStatus>;
|
||||
@@ -928,6 +930,8 @@ export function SaveRelayAuto(arg1:main.RelayAutoConfig):Promise<void>;
|
||||
|
||||
export function SaveRotators(arg1:Array<main.RotatorDevice>):Promise<void>;
|
||||
|
||||
export function SaveRowColors(arg1:main.RowColorSettings):Promise<void>;
|
||||
|
||||
export function SaveSelfSpotSettings(arg1:main.SelfSpotSettings):Promise<void>;
|
||||
|
||||
export function SaveStationDevices(arg1:Array<main.StationDevice>):Promise<void>;
|
||||
|
||||
@@ -926,6 +926,10 @@ export function GetRotators() {
|
||||
return window['go']['main']['App']['GetRotators']();
|
||||
}
|
||||
|
||||
export function GetRowColors() {
|
||||
return window['go']['main']['App']['GetRowColors']();
|
||||
}
|
||||
|
||||
export function GetSPEStatus() {
|
||||
return window['go']['main']['App']['GetSPEStatus']();
|
||||
}
|
||||
@@ -1798,6 +1802,10 @@ export function SaveRotators(arg1) {
|
||||
return window['go']['main']['App']['SaveRotators'](arg1);
|
||||
}
|
||||
|
||||
export function SaveRowColors(arg1) {
|
||||
return window['go']['main']['App']['SaveRowColors'](arg1);
|
||||
}
|
||||
|
||||
export function SaveSelfSpotSettings(arg1) {
|
||||
return window['go']['main']['App']['SaveSelfSpotSettings'](arg1);
|
||||
}
|
||||
|
||||
@@ -2992,6 +2992,54 @@ export namespace main {
|
||||
this.motorized = source["motorized"];
|
||||
}
|
||||
}
|
||||
export class RowColorRule {
|
||||
id: string;
|
||||
color: string;
|
||||
enabled: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new RowColorRule(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.color = source["color"];
|
||||
this.enabled = source["enabled"];
|
||||
}
|
||||
}
|
||||
export class RowColorSettings {
|
||||
enabled: boolean;
|
||||
rules: RowColorRule[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new RowColorSettings(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.enabled = source["enabled"];
|
||||
this.rules = this.convertValues(source["rules"], RowColorRule);
|
||||
}
|
||||
|
||||
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 ScpStatus {
|
||||
enabled: boolean;
|
||||
count: number;
|
||||
|
||||
Reference in New Issue
Block a user