Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserving line breaks in description #17

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<div class="grid space-y-8 lg:gap-8 lg:space-y-0 mt-5">
<div class="grid mt-5">
<div class="dark:bg-darker flex items-center justify-between overflow-x-auto rounded-md bg-white p-2">
<div class="dark:bg-darker col-span-2 overflow-x-auto rounded-md bg-white">
<div class="dark:border-primary flex items-center justify-between border-b p-4">
<div class="dark:bg-darker col-span-2 overflow-x-auto rounded-md bg-white w-full">
<div class="dark:border-primary flex items-end justify-between border-b p-4">
<h4 class="dark:text-light text-lg font-semibold text-gray-500">{{ 'common.description' | translate }}</h4>
<a class="dark:text-primary text-primary cursor-pointer" (click)="editRequested()">{{ 'common.edit' | translate }}</a>
<div class="">
<a class="dark:text-primary text-primary cursor-pointer" (click)="editRequested()">{{ 'common.edit' | translate }}</a>
</div>
</div>

<div class="overflow-x-auto">
<div class="relative m-3">
<div>
<p>{{ cluster?.metadata?.description }}</p>
</div>
@if (cluster?.metadata?.description) {
<div class="whitespace-pre-line">{{ cluster?.metadata?.description }}</div>
} @else {
<div class="text-gray-500">{{ 'common.noValue' | translate }}</div>
}
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<tr class="hover:bg-grey-light">
<td class="px-2 py-1 align-top">{{ 'pages.clusters.details.metadata.description' | translate }}</td>
<td class="px-2 py-1 font-bold">
<div class="dark:bg-gray-800 bg-slate-200 p-4">
<div class="dark:bg-gray-800 bg-slate-200 p-4 whitespace-pre-line">
{{ cluster?.metadata?.description }}
</div>
</td>
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
"summary": "Summary",
"report": "Report",
"change": "Change",
"description": "Description"
"description": "Description",
"noValue": "No value"
},
"error": {
"forbidden": "Forbidden area",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
"summary": "Sammendrag",
"report": "Rapport",
"change": "Change",
"description": "Beskrivelse"
"description": "Beskrivelse",
"noValue": "Ingen verdi"
},
"nav": {
"home": "Oversikt",
Expand Down
Loading