|
@ -109,7 +109,22 @@ export default class GiftedDialog extends Vue { |
|
|
|
|
|
|
|
|
libsUtil = libsUtil; |
|
|
libsUtil = libsUtil; |
|
|
|
|
|
|
|
|
async created() { |
|
|
async open(giver?: GiverInputInfo, offerId?: string) { |
|
|
|
|
|
this.description = ""; |
|
|
|
|
|
this.giver = giver || {}; |
|
|
|
|
|
if (!this.giver.name) { |
|
|
|
|
|
this.giver.name = didInfo( |
|
|
|
|
|
this.giver.did, |
|
|
|
|
|
this.activeDid, |
|
|
|
|
|
this.allMyDids, |
|
|
|
|
|
this.allContacts, |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
// if we show "given to user" selection, default checkbox to true |
|
|
|
|
|
this.givenToUser = this.showGivenToUser; |
|
|
|
|
|
this.amountInput = "0"; |
|
|
|
|
|
this.offerId = offerId || ""; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
await db.open(); |
|
|
await db.open(); |
|
|
const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings; |
|
|
const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings; |
|
@ -135,23 +150,6 @@ export default class GiftedDialog extends Vue { |
|
|
-1, |
|
|
-1, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
open(giver?: GiverInputInfo, offerId?: string) { |
|
|
|
|
|
this.description = ""; |
|
|
|
|
|
this.giver = giver || {}; |
|
|
|
|
|
if (!this.giver.name) { |
|
|
|
|
|
this.giver.name = didInfo( |
|
|
|
|
|
this.giver.did, |
|
|
|
|
|
this.activeDid, |
|
|
|
|
|
this.allMyDids, |
|
|
|
|
|
this.allContacts, |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
// if we show "given to user" selection, default checkbox to true |
|
|
|
|
|
this.givenToUser = this.showGivenToUser; |
|
|
|
|
|
this.amountInput = "0"; |
|
|
|
|
|
this.offerId = offerId || ""; |
|
|
|
|
|
|
|
|
|
|
|
this.visible = true; |
|
|
this.visible = true; |
|
|
} |
|
|
} |
|
|