|
3 | 3 | 'incidents',
|
4 | 4 | ])
|
5 | 5 |
|
6 |
| -<div class="relative flex flex-col gap-5"> |
7 |
| - <h3 class="text-xl font-semibold">{{ $date }}</h3> |
| 6 | +<div class="relative flex flex-col gap-5" x-data="{ forDate: new Date(@js($date)) }"> |
| 7 | + <h3 class="text-xl font-semibold" x-html="forDate.toLocaleDateString()"></h3> |
8 | 8 | @forelse($incidents as $incident)
|
9 |
| - <div class="bg-white border divide-y rounded-lg ml-9 dark:divide-zinc-700 dark:border-zinc-700 dark:bg-zinc-800"> |
| 9 | + <div x-data="{ timestamp: new Date(@js($incident->timestamp)) }" class="bg-white border divide-y rounded-lg ml-9 dark:divide-zinc-700 dark:border-zinc-700 dark:bg-zinc-800"> |
10 | 10 | <div @class([
|
11 | 11 | 'flex flex-col bg-zinc-50 p-4 dark:bg-zinc-900 gap-2',
|
12 | 12 | 'rounded-t-lg' => $incident->incidentUpdates->isNotEmpty(),
|
|
19 | 19 | <a href="{{ route('cachet.status-page.incident', $incident) }}">{{ $incident->name}}</a>
|
20 | 20 | </h3>
|
21 | 21 | <span class="text-xs text-zinc-500 dark:text-zinc-400">
|
22 |
| - {{ $incident->timestamp->diffForHumans() }} — {{ $incident->timestamp->toDayDateTimeString() }} |
| 22 | + {{ $incident->timestamp->diffForHumans() }} — <span x-text="timestamp.toLocaleString()"></span> |
23 | 23 | </span>
|
24 | 24 | </div>
|
25 | 25 | <div class="flex justify-start sm:justify-end">
|
|
40 | 40 | </div>
|
41 | 41 | <div class="flex flex-col px-4 divide-y dark:divide-zinc-700">
|
42 | 42 | @foreach ($incident->incidentUpdates as $update)
|
43 |
| - <div class="relative py-4"> |
| 43 | + <div class="relative py-4" x-data="{ timestamp: new Date(@js($update->created_at)) }"> |
44 | 44 | <x-cachet::incident-update-status :update="$update" />
|
45 | 45 | {{-- <h3 class="text-lg font-semibold">Incident Update Title</h3>--}}
|
46 |
| - <span class="text-xs text-zinc-500 dark:text-zinc-400">{{ $update->created_at->diffForHumans() }} — {{ $update->created_at->toDayDateTimeString() }}</span> |
| 46 | + <span class="text-xs text-zinc-500 dark:text-zinc-400"> |
| 47 | + {{ $update->created_at->diffForHumans() }} — <span x-text="timestamp.toLocaleString()"></span> |
| 48 | + </span> |
47 | 49 | <div class="mt-1 prose-sm md:prose md:prose-zinc dark:text-zinc-100">
|
48 | 50 | {!! $update->formattedMessage() !!}
|
49 | 51 | </div>
|
|
0 commit comments