feat: New tool to remove duplicates in the log
This commit is contained in:
Vendored
+2
@@ -144,6 +144,8 @@ export function ExportCabrilloSelected(arg1:string,arg2:Array<number>):Promise<m
|
||||
|
||||
export function FilterFields():Promise<Array<string>>;
|
||||
|
||||
export function FindDuplicates(arg1:number):Promise<Array<main.DuplicateGroup>>;
|
||||
|
||||
export function FindQSOsForUpload(arg1:string,arg2:string):Promise<Array<qso.QSO>>;
|
||||
|
||||
export function FlexATUBypass():Promise<void>;
|
||||
|
||||
@@ -250,6 +250,10 @@ export function FilterFields() {
|
||||
return window['go']['main']['App']['FilterFields']();
|
||||
}
|
||||
|
||||
export function FindDuplicates(arg1) {
|
||||
return window['go']['main']['App']['FindDuplicates'](arg1);
|
||||
}
|
||||
|
||||
export function FindQSOsForUpload(arg1, arg2) {
|
||||
return window['go']['main']['App']['FindQSOsForUpload'](arg1, arg2);
|
||||
}
|
||||
|
||||
@@ -1528,6 +1528,38 @@ export namespace main {
|
||||
this.is_custom = source["is_custom"];
|
||||
}
|
||||
}
|
||||
export class DuplicateGroup {
|
||||
key: string;
|
||||
qsos: qso.QSO[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new DuplicateGroup(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.key = source["key"];
|
||||
this.qsos = this.convertValues(source["qsos"], qso.QSO);
|
||||
}
|
||||
|
||||
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 EmailSettings {
|
||||
enabled: boolean;
|
||||
smtp_host: string;
|
||||
|
||||
Reference in New Issue
Block a user