Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
55 lines
1.8 KiB
Vue
55 lines
1.8 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import Icon from 'next/icon/Icon.vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useMessageContext } from './provider.js';
|
|
import { hasOneDayPassed } from 'shared/helpers/timeHelper';
|
|
import { ORIENTATION, MESSAGE_STATUS } from './constants';
|
|
|
|
defineProps({
|
|
error: { type: String, required: true },
|
|
});
|
|
|
|
const emit = defineEmits(['retry']);
|
|
|
|
const { orientation, status, createdAt } = useMessageContext();
|
|
|
|
const { t } = useI18n();
|
|
|
|
const canRetry = computed(() => !hasOneDayPassed(createdAt.value));
|
|
</script>
|
|
|
|
<template>
|
|
<div class="text-xs text-n-ruby-11 flex items-center gap-1.5">
|
|
<span>{{ t('CHAT_LIST.FAILED_TO_SEND') }}</span>
|
|
<div class="relative group">
|
|
<div
|
|
class="bg-n-alpha-2 rounded-md size-5 grid place-content-center cursor-pointer"
|
|
>
|
|
<Icon
|
|
icon="i-lucide-alert-triangle"
|
|
class="text-n-ruby-11 size-[14px]"
|
|
/>
|
|
</div>
|
|
<div
|
|
class="absolute bg-n-alpha-3 px-4 py-3 border rounded-xl border-n-strong text-n-slate-12 bottom-6 w-52 text-xs backdrop-blur-[100px] shadow-[0px_0px_24px_0px_rgba(0,0,0,0.12)] opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all break-all"
|
|
:class="{
|
|
'ltr:left-0 rtl:right-0': orientation === ORIENTATION.LEFT,
|
|
'ltr:right-0 rtl:left-0': orientation === ORIENTATION.RIGHT,
|
|
}"
|
|
>
|
|
{{ error }}
|
|
</div>
|
|
</div>
|
|
<button
|
|
v-if="canRetry"
|
|
type="button"
|
|
:disabled="status !== MESSAGE_STATUS.FAILED"
|
|
class="bg-n-alpha-2 rounded-md size-5 grid place-content-center cursor-pointer"
|
|
@click="emit('retry')"
|
|
>
|
|
<Icon icon="i-lucide-refresh-ccw" class="text-n-ruby-11 size-[14px]" />
|
|
</button>
|
|
</div>
|
|
</template>
|