Loading angepasst

This commit is contained in:
MarcWieland
2026-06-26 21:35:23 +02:00
parent 6ff8743dad
commit 0c3eb3a323
19 changed files with 1991 additions and 188 deletions
@@ -96,6 +96,9 @@
</div>
@code {
[PersistentState(AllowUpdates = true)]
public string? PersistentCompanyName { get; set; }
[Parameter] public EventCallback OnToggleDrawer { get; set; }
private bool _showVersionBadge;
@@ -103,17 +106,25 @@
protected override async Task OnInitializedAsync()
{
try
if (PersistentCompanyName != null)
{
var tenantInfo = await Http.GetFromJsonAsync<TenantInfo>("api/tenant/current");
if (tenantInfo?.IsTenant == true && !string.IsNullOrEmpty(tenantInfo.Name))
{
_companyName = tenantInfo.Name;
}
_companyName = PersistentCompanyName;
}
catch
else
{
// Ignore background error
try
{
var tenantInfo = await Http.GetFromJsonAsync<TenantInfo>("api/tenant/current");
if (tenantInfo?.IsTenant == true && !string.IsNullOrEmpty(tenantInfo.Name))
{
_companyName = tenantInfo.Name;
PersistentCompanyName = _companyName;
}
}
catch
{
// Ignore background error
}
}
}