From f53a6f3045066e816c2317183e3543f78aee8276 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 1 Feb 2024 11:52:31 -0700 Subject: [PATCH] tweak the prompt for contacts to be able to skip them --- src/components/GiftedPrompts.vue | 47 ++++++++++++++++++++++---------- src/main.ts | 2 ++ src/views/HomeView.vue | 2 +- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/components/GiftedPrompts.vue b/src/components/GiftedPrompts.vue index adb07b1..3803862 100644 --- a/src/components/GiftedPrompts.vue +++ b/src/components/GiftedPrompts.vue @@ -2,9 +2,9 @@

Here's one:

- + @@ -17,22 +17,35 @@

-

- Did this person or someone near them do something – maybe a - while ago? -
- +

+ That's all your contacts. - {{ - currentContact.name || AppString.NO_CONTACT_NAME - }} + + + Did {{ currentContact.name || AppString.NO_CONTACT_NAME }} +
+ or someone near them do anything – maybe a while ago? +
+ + + + +

@@ -42,7 +55,7 @@ class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mt-4" @click="cancel" > - That's it. + That's it!
@@ -108,7 +121,7 @@ export default class GivenPrompts extends Vue { if ( this.currentIdeaIndex == this.CONTACT_PROMPT_INDEX - 1 || (this.currentIdeaIndex == this.CONTACT_PROMPT_INDEX && - this.currentContact) + this.shownContactDbIndices.length < this.numContacts) ) { this.currentIdeaIndex = this.CONTACT_PROMPT_INDEX; this.findNextUnshownContact(); @@ -128,7 +141,7 @@ export default class GivenPrompts extends Vue { (this.CONTACT_PROMPT_INDEX + 1) % (this.IDEAS.length + this.OTHER_PROMPTS) || (this.currentIdeaIndex == this.CONTACT_PROMPT_INDEX && - this.currentContact) + this.shownContactDbIndices.length < this.numContacts) ) { this.currentIdeaIndex = this.CONTACT_PROMPT_INDEX; this.findNextUnshownContact(); @@ -144,6 +157,12 @@ export default class GivenPrompts extends Vue { } } + nextIdeaPastContacts() { + this.currentIdeaIndex = 0; + this.currentContact = undefined; + this.shownContactDbIndices = []; + } + async findNextUnshownContact() { // get a random contact if (this.shownContactDbIndices.length === this.numContacts) { diff --git a/src/main.ts b/src/main.ts index fc0152a..0bcda41 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,6 +36,7 @@ import { faFileLines, faFloppyDisk, faFolderOpen, + faForward, faGift, faGlobe, faHand, @@ -92,6 +93,7 @@ library.add( faFileLines, faFloppyDisk, faFolderOpen, + faForward, faGift, faGlobe, faHand, diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index be13973..23b66ce 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -110,7 +110,7 @@ @click="openGiftedPrompts()" class="block text-center text-md font-bold bg-blue-500 text-white px-2 py-3 rounded-md" > - If you want an idea... + Ideas...