feat(qsl): copy a card design from another profile
A second profile is usually the same operator with a different rig or a different locator — same callsign, same cards. Having to redraw a design because the antenna changed is work nobody should do. The designer now lists the designs the active profile cannot see and copies a chosen one into it. Designs it already sees — its own, and the shared ones — are left out: they are not something to copy. A COPY, not a move or a share. The original profile keeps its design untouched and the duplicate is free to diverge, which it usually will: a second profile exists because something differs, and that something often ends up on the card. The PICTURES are copied too, and that is the part worth getting right. Stored documents reference photos by name relative to the template's own asset folder, so duplicating the JSON alone would point the new design at files that are not in its folder. It is validated against its own folder afterwards, and a failure rolls the row back rather than leaving a design whose pictures are missing. Sharing the source's folder was the other option and a worse one: deleting either design would then have emptied the other.
This commit is contained in:
Vendored
+4
@@ -770,6 +770,8 @@ export function PopulateBuiltinReferences(arg1:string):Promise<number>;
|
||||
|
||||
export function PublishLogNow():Promise<string>;
|
||||
|
||||
export function QSLCopyTemplateToActiveProfile(arg1:number):Promise<number>;
|
||||
|
||||
export function QSLDefaultTemplateID():Promise<number>;
|
||||
|
||||
export function QSLDeleteTemplate(arg1:number):Promise<void>;
|
||||
@@ -784,6 +786,8 @@ export function QSLGetEmailTemplates():Promise<main.QSLEmailTemplates>;
|
||||
|
||||
export function QSLGetTemplate(arg1:number):Promise<string>;
|
||||
|
||||
export function QSLListOtherProfileTemplates():Promise<Array<main.QSLForeignTemplate>>;
|
||||
|
||||
export function QSLListTemplates():Promise<Array<main.QSLTemplateInfo>>;
|
||||
|
||||
export function QSLPhotoDataURL(arg1:number,arg2:string):Promise<string>;
|
||||
|
||||
Reference in New Issue
Block a user