Trim curation quick parse chrome

This commit is contained in:
2026-03-21 10:36:22 +01:00
parent 4422cf8ba4
commit ce5485032c
2 changed files with 34 additions and 18 deletions

View File

@@ -66,8 +66,12 @@
IsBusy="IsReparsing" IsBusy="IsReparsing"
IsDisabled="IsSaving" IsDisabled="IsSaving"
ShowActionButton="false" ShowActionButton="false"
ShowSectionHeader="false"
ShowSourcePreview="false"
ShowExampleHint="false"
ShowDescriptionEditor="false" ShowDescriptionEditor="false"
ShowValidationSummary="false" ShowValidationSummary="false"
ShowLegend="false"
ErrorMessage="@QuickParseErrorMessage" ErrorMessage="@QuickParseErrorMessage"
SectionClass="critical-editor-section critical-curation-quick-parse-section" /> SectionClass="critical-editor-section critical-curation-quick-parse-section" />
} }

View File

@@ -8,24 +8,27 @@
<p class="error-text critical-editor-error">@ErrorMessage</p> <p class="error-text critical-editor-error">@ErrorMessage</p>
} }
<div class="critical-editor-section-header"> @if (ShowSectionHeader)
<div> {
<h4>Quick Parse Input</h4> <div class="critical-editor-section-header">
<p class="muted">First line is the result prose. Later lines are base affixes or <code>condition: ...</code> lines with comma-separated shorthand.</p> <div>
<h4>Quick Parse Input</h4>
<p class="muted">First line is the result prose. Later lines are base affixes or <code>condition: ...</code> lines with comma-separated shorthand.</p>
</div>
@if (ShowActionButton)
{
<button
type="button"
class="btn-ritual"
@onclick="HandleReparseClickAsync"
@onclick:stopPropagation="true"
@onclick:preventDefault="true"
disabled="@(IsBusy || IsDisabled)">
@(IsBusy ? BusyActionButtonText : ActionButtonText)
</button>
}
</div> </div>
@if (ShowActionButton) }
{
<button
type="button"
class="btn-ritual"
@onclick="HandleReparseClickAsync"
@onclick:stopPropagation="true"
@onclick:preventDefault="true"
disabled="@(IsBusy || IsDisabled)">
@(IsBusy ? BusyActionButtonText : ActionButtonText)
</button>
}
</div>
<div class="@GetQuickParseGridCssClass()"> <div class="@GetQuickParseGridCssClass()">
<div class="field-shell"> <div class="field-shell">
@@ -64,7 +67,10 @@
} }
</div> </div>
<p class="muted critical-editor-advanced-hint">Example: <code>Foe brings his guard up, frightened by your display.</code> then <code>+5, 1mp</code> or <code>w/o shield: glancing blow, +15, 3s, 3np</code>.</p> @if (ShowExampleHint)
{
<p class="muted critical-editor-advanced-hint">Example: <code>Foe brings his guard up, frightened by your display.</code> then <code>+5, 1mp</code> or <code>w/o shield: glancing blow, +15, 3s, 3np</code>.</p>
}
@if (ShowLegend) @if (ShowLegend)
{ {
@@ -112,9 +118,15 @@
[Parameter] [Parameter]
public bool ShowActionButton { get; set; } = true; public bool ShowActionButton { get; set; } = true;
[Parameter]
public bool ShowSectionHeader { get; set; } = true;
[Parameter] [Parameter]
public bool ShowSourcePreview { get; set; } = true; public bool ShowSourcePreview { get; set; } = true;
[Parameter]
public bool ShowExampleHint { get; set; } = true;
[Parameter] [Parameter]
public bool ShowLegend { get; set; } = true; public bool ShowLegend { get; set; } = true;