Skip to content

Commit

Permalink
Fix loader
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinbusso committed Oct 6, 2023
1 parent b3cee57 commit 9f0be04
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/welcome/WelcomeMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<avatar-image class="ml-2 mr-1 d-flex align-items-center" size="18" :input-data="lastSession" hide-name="true"/> {{ aiProcessButtonSubtitle }}
</div>
<div v-else>
<span v-if="aiProcessButtonSubtitle">
<span v-if="showSessionLoader">
<i class="fa fa-spinner fa-spin"/>
</span>
<span>{{ aiProcessButtonSubtitle }}</span>
Expand Down Expand Up @@ -70,6 +70,13 @@ export default {
return '';
},
showSessionLoader() {
if (!(!this.promptSessionId || this.promptSessionId === '') && this.lastSession.firstname === undefined) {
return true;
}
return false;
},
aiProcessButtonTitle() {
if (!this.promptSessionId || this.promptSessionId === '') {
return this.$t('Create a process with AI');
Expand All @@ -81,10 +88,6 @@ export default {
return this.$t('Kick-start an AI generated process');
}
if (this.lastSession.firstname === undefined) {
return null;
}
return `${this.lastSession.firstname} ${this.lastSession.lastnameInitials}. | ${this.formatDateTime(this.lastSession.requestDate)}`;
},
},
Expand Down

0 comments on commit 9f0be04

Please sign in to comment.