Skip to content

Commit 2fed7ad

Browse files
committed
Improve prose leading and fix alignment bug
1 parent f3f94b0 commit 2fed7ad

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

database/seeders/DatabaseSeeder.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ public function run(): void
123123

124124
$incident->incidentUpdates()->create([
125125
'status' => IncidentStatusEnum::fixed,
126-
'message' => 'Our DNS provider has fixed the issue. We will continue to monitor the situation.',
126+
'message' => <<<'EOF'
127+
Our DNS provider has fixed the issue. We will continue to monitor the situation.
128+
129+
For more information, please you can read our latest [blog post](https://blog.cachethq.io).
130+
EOF
131+
,
127132
'user_id' => $user->id,
128133
'created_at' => $timestamp = $incident->created_at->addMinutes(45),
129134
'updated_at' => $timestamp,

resources/views/components/component-group.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
->class(['overflow-hidden rounded-lg border shadow dark:border-zinc-700'])
88
}}>
99
<div class="flex items-center justify-between bg-white p-4 dark:border-zinc-700 dark:bg-zinc-800">
10-
<button x-disclosure:button class="flex items-center gap-3 text-zinc-500 dark:text-zinc-300">
10+
<button x-disclosure:button class="flex items-center gap-2 text-zinc-500 dark:text-zinc-300">
1111
<h3 class="text-lg font-semibold">
1212
{{ $componentGroup->name }}
1313
</h3>
14-
<x-heroicon-o-chevron-up ::class="!$disclosure.isOpen && 'rotate-180'" class="h-6 w-6 transition" />
14+
<x-heroicon-o-chevron-up ::class="!$disclosure.isOpen && 'rotate-180'" class="size-4 transition" />
1515
</button>
1616

17-
@if(($incidentCount = $componentGroup->components->sum('incidents_count')) > 0)
17+
@if(($incidentCount = $componentGroup->components()->sum('incidents_count')) > 0)
1818
<a href="#" class="rounded border border-zinc-800 px-2 py-1 text-xs font-semibold text-zinc-800 dark:border-zinc-600 dark:text-zinc-400">
1919
{{ trans_choice(':incidents Incidents', $incidentCount, ['incidents' => $incidentCount]) }}
2020
</a>

resources/views/components/component.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818
@if($component->link)
1919
<div class="mt-1 text-sm text-zinc-500">
20-
<a href="{{ $component->link }}" class="text-zinc-700 underline dark:text-zinc-300">{{ __('View Details') }}</a>
20+
<a href="{{ $component->link }}" class="text-zinc-700 underline dark:text-zinc-300" target="_blank" rel="nofollow noopener">{{ __('View Details') }}</a>
2121
</div>
2222
@endif
2323
</div>

resources/views/components/incident.blade.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
'rounded-lg' => $incident->incidentUpdates->isEmpty(),
1414
])>
1515
<div class="text-xs font-medium">{{ $incident->components->pluck('name')->join(', ') }}</div>
16-
<div class="flex flex-col sm:flex-row justify-between gap-2 flex-col-reverse items-center">
16+
<div class="flex flex-col sm:flex-row justify-between gap-2 flex-col-reverse items-start sm:items-center">
1717
<div class="flex flex-col flex-1">
1818
<div class="flex gap-2 items-center">
1919
<h3 class="max-w-full text-base font-semibold break-words sm:text-xl">
@@ -33,9 +33,7 @@
3333
<x-cachet::incident-badge :type="$incident->status" />
3434
</div>
3535
</div>
36-
<div class="prose-sm md:prose md:prose-zinc dark:text-zinc-100">
37-
{!! $incident->formattedMessage() !!}
38-
</div>
36+
<div class="prose-sm md:prose prose-zinc dark:prose-invert prose-a:text-primary-500 prose-a:underline prose-p:leading-normal">{!! $incident->formattedMessage() !!}</div>
3937
</div>
4038

4139
@if($incident->incidentUpdates->isNotEmpty())
@@ -49,21 +47,19 @@
4947
@foreach ($incident->incidentUpdates as $update)
5048
<div class="relative py-4" x-data="{ timestamp: new Date(@js($update->created_at)) }">
5149
<x-cachet::incident-update-status :update="$update" />
52-
{{-- <h3 class="text-lg font-semibold">Incident Update Title</h3>--}}
50+
<h3 class="text-lg font-semibold">{{ $update->status->getLabel() }}</h3>
5351
<span class="text-xs text-zinc-500 dark:text-zinc-400">
5452
{{ $update->created_at->diffForHumans() }} — <time datetime="{{ $update->created_at->toW3cString() }}" x-text="timestamp.toLocaleString()"></time>
5553
</span>
56-
<div class="mt-1 prose-sm md:prose md:prose-zinc dark:text-zinc-100">
57-
{!! $update->formattedMessage() !!}
58-
</div>
54+
<div class="prose-sm md:prose prose-zinc dark:prose-invert prose-a:text-primary-500 prose-a:underline prose-p:leading-normal">{!! $update->formattedMessage() !!}</div>
5955
</div>
6056
@endforeach
6157
</div>
6258
@endif
6359
</div>
6460
</div>
6561
@empty
66-
<div class="text-sm text-zinc-500 dark:text-zinc-400">
62+
<div class="mt-1 prose-sm md:prose prose-zinc dark:prose-invert prose-a:text-primary-500 prose-a:underline">
6763
{{ __('No incidents reported.') }}
6864
</div>
6965
@endforelse

resources/views/components/schedule.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="flex items-start gap-2.5 w-full">
44
<span class="mt-1.5 h-3 w-3 shrink-0 rounded-full bg-orange-200 animate-pulse"></span>
55
<div class="flex-1">
6-
<div class="flex flex-col sm:flex-row justify-between gap-2 flex-col-reverse items-center">
6+
<div class="flex flex-col sm:flex-row justify-between gap-2 flex-col-reverse items-start sm:items-center">
77
<div class="flex flex-col flex-1">
88
<h3 class="max-w-full text-base font-semibold break-words sm:text-xl">
99
{{ $schedule->name}}
@@ -16,9 +16,7 @@
1616
<x-cachet::schedule-badge :schedule="$schedule" />
1717
</div>
1818
</div>
19-
<div class="prose-sm md:prose md:prose-zinc dark:text-zinc-100">
20-
{!! $schedule->formattedMessage() !!}
21-
</div>
19+
<div class="prose-sm md:prose prose-zinc dark:prose-invert prose-a:text-primary-500 prose-a:underline prose-p:leading-normal">{!! $schedule->formattedMessage() !!}</div>
2220
</div>
2321
</div>
2422
</div>

0 commit comments

Comments
 (0)