forked from jsnbuchanan/crowd-funder-for-time-pwa
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:
@@ -39,4 +39,4 @@ export default class ContactBulkActions extends Vue {
|
||||
@Prop({ required: true }) copyButtonClass!: string;
|
||||
@Prop({ required: true }) copyButtonDisabled!: boolean;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -72,4 +72,4 @@ export default class ContactListHeader extends Vue {
|
||||
@Prop({ required: true }) showActionsButtonText!: string;
|
||||
@Prop({ required: true }) giveAmountsButtonClass!: Record<string, boolean>;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -35,4 +35,4 @@ import { Contact } from "../db/tables/contacts";
|
||||
export default class LargeIdenticonModal extends Vue {
|
||||
@Prop({ required: true }) contact!: Contact | undefined;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user