From 0582954cfad258511eee7eb328e238dd024b082d Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 31 Jul 2025 15:53:37 +0800 Subject: [PATCH] Remove 'customTitle' variable --- src/components/GiftedDialog.vue | 3 --- src/views/ClaimView.vue | 1 - src/views/ContactGiftingView.vue | 4 ---- src/views/ContactsView.vue | 4 ---- src/views/HomeView.vue | 12 +++++------- src/views/ProjectViewView.vue | 4 ---- 6 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 127c2e2e..30178566 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -122,7 +122,6 @@ export default class GiftedDialog extends Vue { amountInput = "0"; callbackOnSuccess?: (amount: number) => void = () => {}; - customTitle?: string; description = ""; firstStep = true; // true = Step 1 (giver/recipient selection), false = Step 2 (amount/description) giver?: libsUtil.GiverReceiverInputInfo; // undefined means no identified giver agent @@ -222,11 +221,9 @@ export default class GiftedDialog extends Vue { giver?: libsUtil.GiverReceiverInputInfo, receiver?: libsUtil.GiverReceiverInputInfo, offerId?: string, - customTitle?: string, prompt?: string, callbackOnSuccess: (amount: number) => void = () => {}, ) { - this.customTitle = customTitle; this.giver = giver; this.prompt = prompt || ""; this.receiver = receiver; diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 874ea900..be588b2c 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -1001,7 +1001,6 @@ export default class ClaimView extends Vue { giver, undefined, this.veriClaim.handleId, - "Offer fulfilled by " + (giver?.name || "someone not named"), ); } diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue index 04178059..17235244 100644 --- a/src/views/ContactGiftingView.vue +++ b/src/views/ContactGiftingView.vue @@ -225,7 +225,6 @@ export default class ContactGiftingView extends Vue { giver, recipient, undefined, - this.stepType === "giver" ? "Given by Unnamed" : "Given to Unnamed", this.prompt, ); // Immediately select "Unnamed" and move to Step 2 @@ -276,9 +275,6 @@ export default class ContactGiftingView extends Vue { giver, recipient, undefined, - this.stepType === "giver" - ? "Given by " + (contact?.name || "someone not named") - : "Given to " + (contact?.name || "someone not named"), this.prompt, ); } diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 3d5576e7..f3fc6ffb 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -1049,7 +1049,6 @@ export default class ContactsView extends Vue { } let callback: (amount: number) => void; - let customTitle = ""; // choose whether to open dialog to user or from user if (giverDid == this.activeDid) { callback = (amount: number) => { @@ -1057,7 +1056,6 @@ export default class ContactsView extends Vue { newList[recipientDid] = (newList[recipientDid] || 0) + amount; this.givenByMeUnconfirmed = newList; }; - customTitle = "Given to " + (receiver?.name || "Someone Unnamed"); } else { // must be (recipientDid == this.activeDid) callback = (amount: number) => { @@ -1065,13 +1063,11 @@ export default class ContactsView extends Vue { newList[giverDid] = (newList[giverDid] || 0) + amount; this.givenToMeUnconfirmed = newList; }; - customTitle = "Received from " + (giver?.name || "Someone Unnamed"); } (this.$refs.customGivenDialog as GiftedDialog).open( giver, receiver, undefined as unknown as string, - customTitle, undefined as unknown as string, callback, ); diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index d99c3093..228fcc3c 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1597,7 +1597,7 @@ export default class HomeView extends Vue { * @param giver Optional contact info for giver * @param description Optional gift description */ - openDialog(giver?: GiverReceiverInputInfo | "Unnamed", description?: string) { + openDialog(giver?: GiverReceiverInputInfo | "Unnamed", prompt?: string) { if (giver === "Unnamed") { // Special case: Pass undefined to trigger Step 1, but with "Unnamed" pre-selected (this.$refs.giftedDialog as GiftedDialog).open( @@ -1607,8 +1607,7 @@ export default class HomeView extends Vue { name: "You", } as GiverReceiverInputInfo, undefined, - "Given by Unnamed", - description, + prompt, ); // Immediately select "Unnamed" and move to Step 2 (this.$refs.giftedDialog as GiftedDialog).selectGiver(); @@ -1620,8 +1619,7 @@ export default class HomeView extends Vue { name: "You", } as GiverReceiverInputInfo, undefined, - "Given by " + (giver?.name || "someone not named"), - description, + prompt, ); } } @@ -1829,10 +1827,10 @@ export default class HomeView extends Vue { openPersonDialog( giver?: GiverReceiverInputInfo | "Unnamed", - description?: string, + prompt?: string, ) { this.showProjectsDialog = false; - this.openDialog(giver, description); + this.openDialog(giver, prompt); } openProjectDialog() { diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index 4c4759be..b7a6b83f 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -1155,7 +1155,6 @@ export default class ProjectViewView extends Vue { undefined, undefined, undefined, - "Given by Unnamed to this project", ); // Immediately select "Unnamed" and move to Step 2 (this.$refs.giveDialogToThis as GiftedDialog).selectGiver(); @@ -1173,7 +1172,6 @@ export default class ProjectViewView extends Vue { image: this.imageUrl, }, undefined, - `Given to ${this.name}`, ); } } @@ -1189,7 +1187,6 @@ export default class ProjectViewView extends Vue { }, { did: this.activeDid, name: "You" }, undefined, - `${this.name} gave to you`, undefined, undefined, ); @@ -1239,7 +1236,6 @@ export default class ProjectViewView extends Vue { giver, undefined, offer.handleId, - "Given by " + (giver?.name || "someone not named"), ); }