PR U-5: shared Loading component
Add Components/Loading.razor and swap the ad-hoc `<p>Lädt…</p>` guard visuals for it across the four reports, three edit dialogs, and three chart pages (the last three now show the placeholder instead of a blank page while waiting for view data). Kept as a pure visual so each call site changes from `<p>Lädt…</p>` to `<Loading/>` with no other churn. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
577d63c0fa
commit
58ca05f83e
11 changed files with 28 additions and 7 deletions
9
Schaad.Accounting.UI/Components/Loading.razor
Normal file
9
Schaad.Accounting.UI/Components/Loading.razor
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
@* Consistent placeholder for async-loaded pages/dialogs. Replaces the
|
||||
ad-hoc `<p>Lädt…</p>` sprinkled across pages after PR P made every
|
||||
OnInitializedAsync truly async. Kept as a pure visual — callers keep
|
||||
their existing null-guard and just render this while data is loading. *@
|
||||
|
||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem;">
|
||||
<FluentProgressRing/>
|
||||
<FluentLabel>Lädt…</FluentLabel>
|
||||
</div>
|
||||
|
|
@ -7,3 +7,7 @@
|
|||
{
|
||||
<PlotlyChart style="height: 700px; min-height: 500px" @bind-Config="config" @bind-Layout="layout" @bind-Data="data" @ref="chart" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<Loading/>
|
||||
}
|
||||
|
|
@ -7,3 +7,7 @@
|
|||
{
|
||||
<PlotlyChart style="height: 700px; min-height: 500px" @bind-Config="config" @bind-Layout="layout" @bind-Data="data" @ref="chart" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<Loading/>
|
||||
}
|
||||
|
|
@ -7,3 +7,7 @@
|
|||
{
|
||||
<PlotlyChart style="height: 700px; min-height: 500px" @bind-Config="config" @bind-Layout="layout" @bind-Data="data" @ref="chart" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<Loading/>
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<FluentDialogBody>
|
||||
@if (editContext is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<FluentDialogBody>
|
||||
@if (editContext is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<FluentDialogBody>
|
||||
@if (editContext is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@if (balance is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@if (balanceSheet is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@if (accounts is null || transactions is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@if (accounts is null)
|
||||
{
|
||||
<p>Lädt…</p>
|
||||
<Loading/>
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue