Skip to content

Commit ab9e517

Browse files
committed
fix(frontend): allow newlines
1 parent 4934613 commit ab9e517

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

frontend/src/components/Incident.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313
{#if incident != undefined}
1414
{#if full}
1515
<a class="card bg-base-200 w-full shadow-sm {incident_class}" href={!full ? `/i/${incident.id}` : undefined}>
16-
<div class="card-body w-full items-center">
16+
<div class="card-body m-auto w-3/4 items-center">
1717
<h2 class="card-title py-4">
1818
<div class="flex flex-col w-full items-center">
1919
<span class="text-2xl">{incident.name} {#if incident.impact != "none"}<div class="badge {impact_class}">{incident.impact}</div>{/if}</span>
2020
<span class="text-sm italic">{dateAgo(incident.timestamp.getTime())}</span>
2121
</div>
2222
</h2>
23-
<span class=" flex flex-col gap-4 text-left text-base">
24-
{#await marked(incident.description)}
23+
<span class=" flex flex-col gap-4 text-left text-base w-full">
24+
{#await marked(incident.description, { breaks: true })}
2525
<p>loading...</p>
2626
{:then html}
2727
<Render html={html} />
2828
{/await}
2929
</span>
30+
<div class="divider"></div>
3031
{#if incident.updates && incident.updates.length > 0}
31-
<div>
32-
<div class="divider"></div>
32+
<div class="w-full">
3333
<ul class="timeline timeline-vertical timeline-compact gap-6 py-2">
3434
{#each incident.updates.sort((a, b) => a.timestamp.getTime() + b.timestamp.getTime()) as update}
3535
<li>
3636
<div class="timeline-start timeline-box flex gap-4 py-3 text-left text-sm">
3737
{#if update.status}
3838
<span class="update-status font-bold">{String(update.status).charAt(0).toUpperCase() + String(update.status).slice(1)}</span>
3939
{/if}
40-
{#await marked(update.text)}
40+
{#await marked(update.text, { breaks: true })}
4141
<p>loading...</p>
4242
{:then html}
4343
<Render html={html} />
@@ -65,7 +65,7 @@
6565
</div>
6666
</h2>
6767
<span class=" flex flex-col gap-4 text-left text-sm">
68-
{#await marked(incident.description)}
68+
{#await marked(incident.description, { breaks: true })}
6969
<p>loading...</p>
7070
{:then html}
7171
<Render html={html} />
@@ -86,7 +86,7 @@
8686
{#if update.status}
8787
<span class="update-status font-bold">{String(update.status).charAt(0).toUpperCase() + String(update.status).slice(1)}</span>
8888
{/if}
89-
{#await marked(update.text)}
89+
{#await marked(update.text, { breaks: true })}
9090
<p>loading...</p>
9191
{:then html}
9292
<Render html={html} />

0 commit comments

Comments
 (0)