Browse Source

fix bad prompt if they choose to confirm, and use the right phrasing for singular "hour"

search-bbox
Trent Larson 1 year ago
parent
commit
06b173e861
  1. 19
      src/views/ContactsView.vue

19
src/views/ContactsView.vue

@ -461,7 +461,9 @@ export default class ContactsView extends Vue {
confirm(
"Are you sure you want to use one of your registrations for " +
this.nameForDid(this.contacts, contact.did) +
(contact.registered ? " -- especially since they are already marked as registered" : "") +
(contact.registered
? " -- especially since they are already marked as registered"
: "") +
"?",
)
) {
@ -692,11 +694,17 @@ export default class ContactsView extends Vue {
// if they have unconfirmed amounts, ask to confirm those first
if (toDid == identity?.did && this.givenToMeUnconfirmed[fromDid] > 0) {
const isare = this.givenToMeUnconfirmed[fromDid] == 1 ? "is" : "are";
const hours = this.givenToMeUnconfirmed[fromDid] == 1 ? "hour" : "hours";
if (
confirm(
"There are " +
"There " +
isare +
" " +
this.givenToMeUnconfirmed[fromDid] +
" unconfirmed hours from them." +
" unconfirmed " +
hours +
" from them." +
" Would you like to confirm some of those hours?",
)
) {
@ -704,6 +712,7 @@ export default class ContactsView extends Vue {
name: "contact-amounts",
query: { contactDid: fromDid },
});
return;
}
}
if (!this.isNumeric(this.hourInput)) {
@ -754,7 +763,9 @@ export default class ContactsView extends Vue {
confirm(
"Are you sure you want to record " +
this.hourInput +
" hours " +
" hour" +
(this.hourInput == "1" ? "" : "s") +
" " +
toFrom +
description +
"?",

Loading…
Cancel
Save