Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature | Force online status #93

Merged
merged 4 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions app/javascript/widget/components/ChatHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@
:class="$dm('text-black-900', 'dark:text-slate-50')"
>
<span v-dompurify-html="title" class="mr-1" />
<div
:class="
`h-2 w-2 rounded-full leading-4
${isOnline ? 'bg-green-500' : 'hidden'}`
"
/>
<div class="h-2 w-2 rounded-full leading-4 bg-green-500" />
</div>
<div
class="text-xs mt-1"
:class="$dm('text-black-700', 'dark:text-slate-400')"
>
{{ replyWaitMessage }}
{{ $t('TEAM_AVAILABILITY.ONLINE') }}
</div>
</div>
</div>
Expand Down
6 changes: 1 addition & 5 deletions app/javascript/widget/components/TeamAvailability.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
:class="$dm('text-black-700', 'dark:text-slate-50')"
>
<div class="text-base leading-5 font-medium mb-1">
{{
isOnline
? $t('TEAM_AVAILABILITY.ONLINE')
: $t('TEAM_AVAILABILITY.OFFLINE')
}}
{{ $t('TEAM_AVAILABILITY.ONLINE') }}
</div>
<div class="text-xs leading-4 mt-1">
{{ replyWaitMessage }}
Expand Down
1 change: 1 addition & 0 deletions app/javascript/widget/i18n/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"OFFLINE": "We are away at the moment"
},
"REPLY_TIME": {
"INSTANTLY": "Typically replies instantly",
"IN_A_FEW_MINUTES": "Typically replies in a few minutes",
"IN_A_FEW_HOURS": "Typically replies in a few hours",
"IN_A_DAY": "Typically replies in a day",
Expand Down
1 change: 1 addition & 0 deletions app/javascript/widget/i18n/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"OFFLINE": "Estamos ausentes en este momento"
},
"REPLY_TIME": {
"INSTANTLY": "Normalmente responde de inmediato",
"IN_A_FEW_MINUTES": "Normalmente responde en unos minutos",
"IN_A_FEW_HOURS": "Normalmente responde en unas pocas horas",
"IN_A_DAY": "Normalmente responde en un día"
Expand Down
4 changes: 1 addition & 3 deletions app/javascript/widget/mixins/availability.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export default {
? this.replyTimeStatus
: `${this.$t('REPLY_TIME.BACK_IN')} ${this.timeLeftToBackInOnline}`;
}
return this.isOnline
? this.replyTimeStatus
: this.$t('TEAM_AVAILABILITY.OFFLINE');
return this.$t('REPLY_TIME.INSTANTLY')
},
outOfOfficeMessage() {
return this.channelConfig.outOfOfficeMessage;
Expand Down