forked from trent_larson/crowd-funder-for-time-pwa
Remove 'customTitle' variable
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1001,7 +1001,6 @@ export default class ClaimView extends Vue {
|
||||
giver,
|
||||
undefined,
|
||||
this.veriClaim.handleId,
|
||||
"Offer fulfilled by " + (giver?.name || "someone not named"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user