feat: edit print templates on the printer page and store them on presets

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-03 22:45:56 -04:00
co-authored by Cursor
parent 1337d9833d
commit c03ffc0833
18 changed files with 904 additions and 293 deletions
@@ -0,0 +1,37 @@
<MudDialog>
<DialogContent>
<MudTextField @bind-Value="_name"
Label="Preset name"
Variant="Variant.Outlined"
Immediate="true"
MaxLength="100"
Autofocus="true" />
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">Cancel</MudButton>
<MudButton Color="Color.Primary"
Variant="Variant.Filled"
OnClick="Save"
Disabled="@string.IsNullOrWhiteSpace(_name)">
Save
</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter]
IMudDialogInstance MudDialog { get; set; } = null!;
private string _name = string.Empty;
private void Save()
{
var name = _name.Trim();
if (string.IsNullOrWhiteSpace(name))
return;
MudDialog.Close(DialogResult.Ok(name));
}
private void Cancel() => MudDialog.Cancel();
}