Files
Chronos/src/Titano.App/Infrastructure/IAppDialogs.cs
T
Claude 04895c7b7b fix(app): Library and Archive delete, quick actions and toolbar after review
Delete… runs in an in-window dialog shared by the Library and the Archive
manager: the dry run and the move into the trash report progress and stop
on Cancel, the toast counts only what really moved, and its Undo reports
failures. The confirmation names at most six moves and three refusals in
the UI font. Delete… stands apart at the far right of both bars and last
in the tab order.

The toolbar's filters wrap instead of pushing out the right-hand group at
1200 px. Card and row quick actions show while selected or focused, so Tab
reaches them; Analyse and Render are disabled with a reason when nothing
can run them, and say so in a toast if the session drops. Remote cards get
their own card, Analyse and Render tooltips; the details panel's Folder and
the saved-view menu say why they are disabled. Status offers Rendered, Not
rendered and Synced. Remote cards count in the Year and Camera choices and
the timeline. The trash dialog shows one sentence when empty.

--capture adds archive-trash and library-viewname.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 08:06:14 +00:00

49 lines
2.2 KiB
C#

namespace Titano.App.Infrastructure;
/// <summary>Texts of a confirmation dialog (DESIGN §4: two buttons, safe action left and default).</summary>
public sealed record ConfirmRequest
{
public required string Heading { get; init; }
public required string Message { get; init; }
/// <summary>Detail block (certificate fingerprint, list of what changes); null hides it.</summary>
public string? Detail { get; init; }
/// <summary>The detail is set in the monospaced font (fingerprints, values to compare); false sets it in the UI font (names, sentences).</summary>
public bool IsDetailMonospaced { get; init; } = true;
public string? DetailToolTip { get; init; }
public required string SafeText { get; init; }
public required string SafeToolTip { get; init; }
public required string ActionText { get; init; }
public required string ActionToolTip { get; init; }
/// <summary>Warning-outlined action (never a primary) for data-destroying choices.</summary>
public bool IsDestructive { get; init; }
/// <summary>Text the user must type before the action enables (formatting a card: its name); null asks no typing.</summary>
public string? TypedConfirmation { get; init; }
/// <summary>Label of the typing field ("Type the card name to confirm").</summary>
public string? TypedPrompt { get; init; }
}
/// <summary>Modal questions and OS pickers the view models ask for (BRIEF §12.1: modals only for confirmations and login).</summary>
public interface IAppDialogs
{
/// <summary>A folder chosen in the shell's folder picker; null when cancelled.</summary>
string? PickFolder(string title, string? initialFolder = null);
/// <summary>A JSON file chosen in the shell's Open dialog; null when cancelled.</summary>
string? PickJsonFile(string title);
/// <summary>True when the user chose the action.</summary>
bool Confirm(ConfirmRequest request);
/// <summary>
/// The login form. <paramref name="signIn"/> receives user and password and returns null on success or the
/// error sentence to show; the form stays open until it succeeds or the user cancels. True when signed in.
/// </summary>
bool SignIn(string server, string? username, Func<string, string, Task<string?>> signIn);
}