@page "/settings" @using Data_Coupler.Services @using Data_Coupler.Models @inject IJSRuntime JSRuntime @inject ILogger Logger Impostazioni - Data Coupler

Impostazioni Sistema

@if (!string.IsNullOrEmpty(toastMessage)) { }
@code { private string activeTab = "backup"; private string toastMessage = ""; private string toastType = "info"; protected override async Task OnInitializedAsync() { // Inizializzazione se necessaria await base.OnInitializedAsync(); } private void SetActiveTab(string tabName) { activeTab = tabName; StateHasChanged(); } private void ShowToast(string message, string type = "info") { toastMessage = message; toastType = type; StateHasChanged(); // Auto-hide dopo 5 secondi per messaggi di successo if (type == "success") { _ = Task.Delay(5000).ContinueWith(_ => ClearToast()); } } private void ShowToastTuple((string message, string type) toast) { ShowToast(toast.message, toast.type); } private void ClearToast() { toastMessage = ""; toastType = "info"; InvokeAsync(StateHasChanged); } }