diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index a00fa7701..26c8fa7b8 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -41,24 +41,17 @@ -
+
+ +
+
- In the following, only the most recent hours are included. To see more, click
@@ -1188,6 +1181,30 @@ export default class ContactsView extends Vue { .then(() => (this.contactEdit = null)); } + public async toggleShowContactAmounts() { + const newShowValue = !this.showGiveNumbers; + try { + await db.open(); + db.settings.update(MASTER_SETTINGS_KEY, { + showContactGivesInline: newShowValue, + }); + } catch (err) { + this.$notify( + { + group: "alert", + type: "danger", + title: "Error Updating Contact Setting", + text: "The setting may not have saved. Try again, maybe after restarting the app.", + }, + -1, + ); + console.error( + "Telling user to try again after contact-amounts setting update because:", + err, + ); + } + this.showGiveNumbers = newShowValue; + } public toggleShowGiveTotals() { if (this.showGiveTotals) { this.showGiveTotals = false; @@ -1203,9 +1220,12 @@ export default class ContactsView extends Vue { public showGiveAmountsClassNames() { return { - "bg-slate-500": this.showGiveTotals, - "bg-green-600": !this.showGiveTotals && this.showGiveConfirmed, - "bg-yellow-600": !this.showGiveTotals && !this.showGiveConfirmed, + "from-slate-400": this.showGiveTotals, + "to-slate-700": this.showGiveTotals, + "from-green-400": !this.showGiveTotals && this.showGiveConfirmed, + "to-green-700": !this.showGiveTotals && this.showGiveConfirmed, + "from-yellow-400": !this.showGiveTotals && !this.showGiveConfirmed, + "to-yellow-700": !this.showGiveTotals && !this.showGiveConfirmed, }; } }