@page "/settings" @attribute [Authorize] @inject IUserSessionService Session @inject IJSRuntime JS @rendermode InteractiveServer @using Microsoft.JSInterop

Settings

Display
Behavior
Report Branding

Shown top-left on exported HTML reports. The client's logo (top-right) is set per profile.

@if (_saved) {
Settings saved.
} @code { private string _lang = "en", _theme = "System"; private bool _autoTakeOwnership, _saved; private LogoData? _mspLogo; protected override void OnInitialized() { var s = Session.Settings; _lang = s.Lang; _theme = s.Theme is "System" or "Light" ? s.Theme : "System"; _autoTakeOwnership = s.AutoTakeOwnership; _mspLogo = s.MspLogo; } private async Task OnMspLogoChanged(LogoData? logo) { _mspLogo = logo; await Save(); } private async Task Save() { Session.UpdateSettings(new AppSettings { Lang = _lang, Theme = _theme, AutoTakeOwnership = _autoTakeOwnership, MspLogo = _mspLogo }); SharepointToolbox.Web.Localization.TranslationSource.Instance.SetCulture(_lang); await JS.InvokeVoidAsync("sptb.setTheme", _theme); _saved = true; StateHasChanged(); _ = Task.Delay(2000).ContinueWith(_ => { _saved = false; InvokeAsync(StateHasChanged); }); } }