|
@@ -3,10 +3,12 @@
|
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
import isToday from 'dayjs/plugin/isToday';
|
|
import isToday from 'dayjs/plugin/isToday';
|
|
import isYesterday from 'dayjs/plugin/isYesterday';
|
|
import isYesterday from 'dayjs/plugin/isYesterday';
|
|
|
|
+ import localizedFormat from 'dayjs/plugin/localizedFormat';
|
|
|
|
|
|
dayjs.extend(relativeTime);
|
|
dayjs.extend(relativeTime);
|
|
dayjs.extend(isToday);
|
|
dayjs.extend(isToday);
|
|
dayjs.extend(isYesterday);
|
|
dayjs.extend(isYesterday);
|
|
|
|
+ dayjs.extend(localizedFormat);
|
|
|
|
|
|
import { getContext, onMount } from 'svelte';
|
|
import { getContext, onMount } from 'svelte';
|
|
const i18n = getContext<Writable<i18nType>>('i18n');
|
|
const i18n = getContext<Writable<i18nType>>('i18n');
|
|
@@ -154,9 +156,9 @@
|
|
class="mt-1.5 flex flex-shrink-0 items-center text-xs self-center invisible group-hover:visible text-gray-500 font-medium first-letter:capitalize"
|
|
class="mt-1.5 flex flex-shrink-0 items-center text-xs self-center invisible group-hover:visible text-gray-500 font-medium first-letter:capitalize"
|
|
>
|
|
>
|
|
<Tooltip
|
|
<Tooltip
|
|
- content={dayjs(message.created_at / 1000000).format('dddd, DD MMMM YYYY HH:mm')}
|
|
|
|
|
|
+ content={dayjs(message.created_at / 1000000).format('LLLL')}
|
|
>
|
|
>
|
|
- {dayjs(message.created_at / 1000000).format('HH:mm')}
|
|
|
|
|
|
+ {dayjs(message.created_at / 1000000).format('LT')}
|
|
</Tooltip>
|
|
</Tooltip>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
@@ -175,7 +177,7 @@
|
|
class=" self-center text-xs invisible group-hover:visible text-gray-400 font-medium first-letter:capitalize ml-0.5 translate-y-[1px]"
|
|
class=" self-center text-xs invisible group-hover:visible text-gray-400 font-medium first-letter:capitalize ml-0.5 translate-y-[1px]"
|
|
>
|
|
>
|
|
<Tooltip
|
|
<Tooltip
|
|
- content={dayjs(message.created_at / 1000000).format('dddd, DD MMMM YYYY HH:mm')}
|
|
|
|
|
|
+ content={dayjs(message.created_at / 1000000).format('LLLL')}
|
|
>
|
|
>
|
|
<span class="line-clamp-1">{formatDate(message.created_at / 1000000)}</span>
|
|
<span class="line-clamp-1">{formatDate(message.created_at / 1000000)}</span>
|
|
</Tooltip>
|
|
</Tooltip>
|