Tweak AliasVault.Client Item view section headings (#1404)

This commit is contained in:
Leendert de Borst
2025-12-22 13:55:07 +01:00
parent ebe27430ed
commit a68206b06d
2 changed files with 12 additions and 4 deletions

View File

@@ -16,7 +16,10 @@
break;
case FieldType.TextArea:
<div class="col-span-6">
<label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">@GetLabel()</label>
@if (!HideLabel)
{
<label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">@GetLabel()</label>
}
<div class="p-3 bg-gray-50 dark:bg-gray-700 rounded-lg text-gray-900 dark:text-white whitespace-pre-wrap text-sm">
@RenderTextWithLinks(Field.Value ?? string.Empty)
</div>
@@ -77,6 +80,12 @@
[Parameter]
public bool FullWidth { get; set; }
/// <summary>
/// Gets or sets whether to hide the label (useful when section header already shows the label).
/// </summary>
[Parameter]
public bool HideLabel { get; set; }
/// <summary>
/// Gets the label for the field.
/// </summary>

View File

@@ -97,7 +97,7 @@ else
<div class="grid grid-cols-6 gap-6">
@foreach (var field in notesFields)
{
<FieldBlock Field="@field" />
<FieldBlock Field="@field" HideLabel="true" />
}
</div>
</div>
@@ -233,7 +233,7 @@ else
<div class="grid grid-cols-6 gap-6">
@foreach (var field in noteTypeNotesFields)
{
<FieldBlock Field="@field" />
<FieldBlock Field="@field" HideLabel="true" />
}
</div>
</div>
@@ -243,7 +243,6 @@ else
@if (GroupedFields.TryGetValue(FieldCategory.Custom, out var customFields) && customFields.Count > 0)
{
<div class="p-4 mb-4 bg-white border border-gray-200 rounded-lg shadow-sm 2xl:col-span-2 dark:border-gray-700 sm:p-6 dark:bg-gray-800">
<h3 class="mb-4 text-xl font-semibold dark:text-white">@Localizer["CustomFieldsSection"]</h3>
<form action="#">
<div class="grid grid-cols-6 gap-6">
@foreach (var field in customFields)