@page "/permissions" @inject IPermissionService PermissionService @layout PageLayout @using Services.Website @inject Blazored.LocalStorage.ILocalStorageService LocalStorage @implements IDisposable What's this page? This page has options to enable and disable certain permissions settings. Such as Storage and Data Collection. What does this website store? This website usages storage to track user defined default on the Storage page. Why would I enable storage? Enable storage if you want to website to remeber past settings whenever you visit the website on the same web browser. What data does this website collect? This website usages Google Analytics to collect data enabled on the Analytics page. Why would I enable data collection? Enable data tracking if you want the website maintainer to know how your using the website. @code { private bool _storageEnabled = false; private bool _dataCollectionEnabled = false; protected override void OnInitialized() { PermissionService.Subscribe(Update); Update(); } void Update() { _storageEnabled = PermissionService.GetIsStorageEnabled(); _dataCollectionEnabled = PermissionService.GetIsDataCollectionEnabled(); StateHasChanged(); } void IDisposable.Dispose() { PermissionService.Unsubscribe(Update); } private void StoragePermissionChanged(ChangeEventArgs obj) { PermissionService.SetIsStorageEnabled((bool)obj.Value!); } private void DataCollectionPermissionChanged(ChangeEventArgs obj) { PermissionService.SetIsDataCollectionEnabled((bool)obj.Value!); } }