Added guidelines from the organization to the BeyondFacts Lab (#1204)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-15 11:40:15 +01:00
1 parent cb54ad297d
commit 1361b984eb
38 files changed
+967 -255

No files matched your search

@@ -74,6 +74,21 @@ public partial class BeyondFactsLabAssistant : MSGComponentBase
/// </summary>
private bool introductionExpanded;
/// <summary>
/// Whether the area with the guidelines of the organization is open. It opens with every visit of the page, so
/// that the person has them in view while preparing.
/// </summary>
private bool organizationRulesExpanded = true;
/// <summary>
/// Gets the guidelines of the organization for public appearances, which only a configuration plugin sets; empty
/// without any.
/// </summary>
/// <remarks>
/// Read anew with every render, so that a reloaded configuration plugin shows right away.
/// </remarks>
private string OrganizationRules => this.SettingsManager.ConfigurationData.BeyondFactsLab.OrganizationRules;
/// <inheritdoc />
protected override async Task OnInitializedAsync()
{
@@ -195,5 +210,15 @@ public partial class BeyondFactsLabAssistant : MSGComponentBase
return Task.CompletedTask;
}
/// <summary>
/// Remembers whether the person opened or closed the area with the guidelines of the organization.
/// </summary>
/// <param name="isExpanded">Whether the area is open now.</param>
private Task OrganizationRulesExpandedChanged(bool isExpanded)
{
this.organizationRulesExpanded = isExpanded;
return Task.CompletedTask;
}
private async Task OpenSettingsDialogAsync() => await this.DialogService.ShowAsync<SettingsDialogBeyondFactsLab>(null, new DialogParameters(), DialogOptions.FULLSCREEN);
}