Complete Enhanced Triple Migration Pattern for contact components

- Migrate ContactBulkActions, ContactInputForm, ContactListHeader, ContactListItem, LargeIdenticonModal, and ContactsView to PlatformServiceMixin
- Add comprehensive deep linking support to CapacitorPlatformService and WebPlatformService
- Enhance PlatformService with new database operations and deep link handling
- Update service worker and documentation for migration progress
- Fix TypeScript type errors in util.ts and deepLinks.ts
- Streamline circular dependency analysis and migration tracking docs
This commit is contained in:
Matthew Raymer
2025-07-16 08:41:13 +00:00
parent 8dd73950f5
commit b1ef7fb9ee
15 changed files with 433 additions and 201 deletions

View File

@@ -39,4 +39,4 @@ export default class ContactBulkActions extends Vue {
@Prop({ required: true }) copyButtonClass!: string;
@Prop({ required: true }) copyButtonDisabled!: boolean;
}
</script>
</script>

View File

@@ -52,7 +52,7 @@
placeholder="New URL or DID, Name, Public Key, Next Public Key Hash"
class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2 h-10"
/>
<!-- Add Button -->
<button
class="px-4 rounded-r bg-green-200 border border-green-400"
@@ -79,7 +79,7 @@ import { Component, Vue, Prop, Model } from "vue-facing-decorator";
})
export default class ContactInputForm extends Vue {
@Prop({ required: true }) isRegistered!: boolean;
@Model("input", { type: String, default: "" })
inputValue!: string;
@@ -95,4 +95,4 @@ export default class ContactInputForm extends Vue {
return this.inputValue;
}
}
</script>
</script>

View File

@@ -72,4 +72,4 @@ export default class ContactListHeader extends Vue {
@Prop({ required: true }) showActionsButtonText!: string;
@Prop({ required: true }) giveAmountsButtonClass!: Record<string, boolean>;
}
</script>
</script>

View File

@@ -150,33 +150,43 @@ export default class ContactListItem extends Vue {
/**
* Get give amount for a specific contact and direction
*/
private getGiveAmountForContact(contactDid: string, isGivenToMe: boolean): number {
private getGiveAmountForContact(
contactDid: string,
isGivenToMe: boolean,
): number {
if (this.showGiveTotals) {
if (isGivenToMe) {
return (this.givenToMeConfirmed[contactDid] || 0) +
(this.givenToMeUnconfirmed[contactDid] || 0);
return (
(this.givenToMeConfirmed[contactDid] || 0) +
(this.givenToMeUnconfirmed[contactDid] || 0)
);
} else {
return (this.givenByMeConfirmed[contactDid] || 0) +
(this.givenByMeUnconfirmed[contactDid] || 0);
return (
(this.givenByMeConfirmed[contactDid] || 0) +
(this.givenByMeUnconfirmed[contactDid] || 0)
);
}
} else if (this.showGiveConfirmed) {
return isGivenToMe
? (this.givenToMeConfirmed[contactDid] || 0)
: (this.givenByMeConfirmed[contactDid] || 0);
return isGivenToMe
? this.givenToMeConfirmed[contactDid] || 0
: this.givenByMeConfirmed[contactDid] || 0;
} else {
return isGivenToMe
? (this.givenToMeUnconfirmed[contactDid] || 0)
: (this.givenByMeUnconfirmed[contactDid] || 0);
return isGivenToMe
? this.givenToMeUnconfirmed[contactDid] || 0
: this.givenByMeUnconfirmed[contactDid] || 0;
}
}
/**
* Get give description for a specific contact and direction
*/
private getGiveDescriptionForContact(contactDid: string, isGivenToMe: boolean): string {
return isGivenToMe
? (this.givenToMeDescriptions[contactDid] || '')
: (this.givenByMeDescriptions[contactDid] || '');
private getGiveDescriptionForContact(
contactDid: string,
isGivenToMe: boolean,
): string {
return isGivenToMe
? this.givenToMeDescriptions[contactDid] || ""
: this.givenByMeDescriptions[contactDid] || "";
}
}
</script>
</script>

View File

@@ -35,4 +35,4 @@ import { Contact } from "../db/tables/contacts";
export default class LargeIdenticonModal extends Vue {
@Prop({ required: true }) contact!: Contact | undefined;
}
</script>
</script>