2a0054aa30
Adotta lo stile condiviso delle app Integry: superfici piatte, raggi ampi, spaziature a scala fissa, gerarchia data dallo spazio prima che dalla decorazione. La palette storica di SteUP resta intatta; sono stati aggiunti solo i ruoli che mancavano (workspace, surfaceMuted, divider, inkMuted e le triplette dei toni semantici). Fondamenta - tokens.css: ruoli colore, scale di spazio/raggi/tipografia, curve di movimento e scala z-index semantica. Unica fonte di verita': pilotano anche le variabili CSS di MudBlazor. - Inter variabile ospitata in locale (133KB) al posto di Nunito da Google Fonts: l'app lavora offline, un font che arriva dalla rete in campo non arriva. - base.css: shell applicativa e comportamenti da app nativa — niente selezione testo, niente menu al tocco lungo, niente lampo grigio sul tap, niente rimbalzo elastico, niente zoom a doppio tocco, scroll con inerzia. - mudblazor-overrides.css: MudBlazor appiattito (elevation 0, nessun tint, target 44/48, etichette in caso naturale). - Rimossi Bootstrap (CSS, icone e JS) e i 996 righe di CSS con ambito per componente del vecchio sistema: erano tutti inutilizzati. Struttura - Navigazione flottante in basso con icona piena sulla voce attiva; da 720px diventa colonna laterale. Il MudFabMenu e' sostituito da un bottom sheet: stessa funzione, bersagli molto piu' grandi. - Testata alta col titolo a sinistra, fusa con la pagina. - Nel form scheda il salvataggio sta in una barra ancorata in fondo, non in coda a uno scroll lungo. - Scelta di punto vendita e articoli a schermo intero con ricerca; la selezione multipla usa righe da 56px invece di un menu a tendina. - Urgenza scelta a pillole invece che da una select. Stato e riscontro - StatusBadgeHelper: tono, icona ed etichetta di ogni stato in un punto solo, cosi' lo stesso stato si presenta identico ovunque. - Scheletri al posto degli spinner; l'overlay bloccante dice sempre cosa sta facendo; gli stati vuoti suggeriscono la mossa successiva. - Rimosso il ritardo artificiale di 250ms in InspectionCard, che non attendeva nulla. DESIGN.md riscritto sul nuovo sistema. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
158 lines
4.9 KiB
C#
158 lines
4.9 KiB
C#
using MudBlazor;
|
|
using SteUp.Shared.Components.SingleElements.Modal;
|
|
using SteUp.Shared.Components.SingleElements.Modal.ExceptionModal;
|
|
using SteUp.Shared.Core.Dto;
|
|
using SteUp.Shared.Core.Entities;
|
|
|
|
namespace SteUp.Shared.Core.Helpers;
|
|
|
|
public static class ModalHelper
|
|
{
|
|
extension(IDialogService dialog)
|
|
{
|
|
public async Task<DialogResult?> OpenSelectShop()
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalSelectShop>(
|
|
"ModalSelectShop",
|
|
new DialogParameters(),
|
|
new DialogOptions
|
|
{
|
|
FullScreen = true,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = false
|
|
}
|
|
);
|
|
|
|
return await modal.Result;
|
|
}
|
|
|
|
public async Task<DialogResult?> OpenFormScheda(string codMdep, DateTime data,
|
|
bool isNew = false, Scheda? scheda = null, bool readOnly = false)
|
|
{
|
|
scheda = isNew && scheda == null ? new Scheda() : scheda;
|
|
|
|
var modal = await dialog.ShowAsync<ModalFormScheda>(
|
|
"ModalFormScheda",
|
|
new DialogParameters<ModalFormScheda>
|
|
{
|
|
{ x => x.CodMdep, codMdep },
|
|
{ x => x.Data, data },
|
|
{ x => x.IsNew, isNew },
|
|
{ x => x.ReadOnly, readOnly },
|
|
{ x => x.Scheda, scheda }
|
|
},
|
|
new DialogOptions
|
|
{
|
|
FullScreen = true,
|
|
CloseButton = false,
|
|
NoHeader = true
|
|
}
|
|
);
|
|
|
|
return await modal.Result;
|
|
}
|
|
|
|
public async Task<DialogResult?> OpenAddAttached()
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalAddAttached>(
|
|
"Add attached",
|
|
new DialogParameters(),
|
|
new DialogOptions
|
|
{
|
|
FullScreen = false,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = false
|
|
}
|
|
);
|
|
|
|
return await modal.Result;
|
|
}
|
|
|
|
public async Task<DialogResult?> OpenSuggestActivityDescription(List<StbActivityTyperDto>? activityTypers)
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalSuggestDescription>(
|
|
"Suggest activity description",
|
|
new DialogParameters<ModalSuggestDescription>
|
|
{
|
|
{ x => x.ActivityTypers, activityTypers }
|
|
},
|
|
new DialogOptions
|
|
{
|
|
FullScreen = false,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = true
|
|
}
|
|
);
|
|
|
|
return await modal.Result;
|
|
}
|
|
|
|
public async Task<DialogResult?> OpenSelectArt(List<ArticoliInGrigliaDto>? articoli)
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalSelectArt>(
|
|
"ModalSelectArt",
|
|
new DialogParameters<ModalSelectArt>
|
|
{
|
|
{ x => x.Articoli, articoli }
|
|
},
|
|
new DialogOptions
|
|
{
|
|
FullScreen = true,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = false
|
|
}
|
|
);
|
|
|
|
return await modal.Result;
|
|
}
|
|
|
|
public async Task ShowError(string message)
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalError>(
|
|
"ModalError",
|
|
new DialogParameters<ModalError>
|
|
{
|
|
{ x => x.ErrorMessage, message }
|
|
},
|
|
new DialogOptions
|
|
{
|
|
FullScreen = false,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = true,
|
|
FullWidth = true,
|
|
MaxWidth = MaxWidth.ExtraLarge
|
|
}
|
|
);
|
|
|
|
await modal.Result;
|
|
}
|
|
|
|
public async Task ShowWarning(string message)
|
|
{
|
|
var modal = await dialog.ShowAsync<ModalError>(
|
|
"ModalError",
|
|
new DialogParameters<ModalError>
|
|
{
|
|
{ x => x.ErrorMessage, message },
|
|
{ x => x.IsWarning, true }
|
|
},
|
|
new DialogOptions
|
|
{
|
|
FullScreen = false,
|
|
CloseButton = false,
|
|
NoHeader = true,
|
|
BackdropClick = true,
|
|
FullWidth = true,
|
|
MaxWidth = MaxWidth.ExtraLarge
|
|
}
|
|
);
|
|
|
|
await modal.Result;
|
|
}
|
|
}
|
|
} |