merge: card import and archive manager screens (card pool, plan, verified erase and format, server destination, tree, charts, maintenance)

Union of the Tooltips resources; sample data keeps the sync server and the
simulated cards; the import test names App.Infrastructure.Formatting fully now
that a test namespace of the same name exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 11:01:34 +00:00
commit 828c64a485
57 files changed
+8742 -23

No files matched your search

+5
View File
@@ -14,6 +14,11 @@
Visibility="{Binding Detail, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<TextBlock Text="{Binding Detail}" FontFamily="{StaticResource Font.Mono}" FontSize="{StaticResource Size.Secondary}" TextWrapping="Wrap" TextTrimming="None" LineHeight="18" />
</Border>
<StackPanel x:Name="Typing" Margin="0,16,0,0" Visibility="Collapsed">
<TextBlock Text="{Binding TypedPrompt}" Foreground="{DynamicResource Brush.TextMuted}" TextWrapping="Wrap" />
<TextBox x:Name="Typed" Margin="0,6,0,0" ui:Field.Placeholder="{Binding TypedConfirmation}" ToolTip="{Binding TypedPrompt}"
AutomationProperties.Name="{Binding TypedPrompt}" TextChanged="OnTyped" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,24,0,0">
<Button Content="{Binding SafeText}" ToolTip="{Binding SafeToolTip}" IsDefault="True" IsCancel="True" MinWidth="96" Click="OnSafe" />
<Button x:Name="Action" Content="{Binding ActionText}" ToolTip="{Binding ActionToolTip}" MinWidth="96" Margin="8,0,0,0" Click="OnAction" />
@@ -12,6 +12,10 @@ public sealed partial class ConfirmDialog : TitanoWindow
DataContext = request;
InitializeComponent();
Action.SetResourceReference(StyleProperty, request.IsDestructive ? "Button.Destructive" : "Button.Primary");
if (request.TypedConfirmation is null) return;
Typing.Visibility = Visibility.Visible;
Loaded += (_, _) => Typed.Focus();
EnableAction(false);
}
/// <summary>True when the user chose the action.</summary>
@@ -26,4 +30,15 @@ public sealed partial class ConfirmDialog : TitanoWindow
private void OnSafe(object sender, RoutedEventArgs e) => DialogResult = false;
private void OnAction(object sender, RoutedEventArgs e) => DialogResult = true;
private void OnTyped(object sender, System.Windows.Controls.TextChangedEventArgs e) =>
EnableAction(string.Equals(Typed.Text.Trim(), ((ConfirmRequest)DataContext).TypedConfirmation, StringComparison.CurrentCultureIgnoreCase));
/// <summary>The action waits for the typed confirmation; until then its tooltip says what to type (DESIGN §4 disabled states).</summary>
private void EnableAction(bool enabled)
{
var request = (ConfirmRequest)DataContext;
Action.IsEnabled = enabled;
Action.ToolTip = enabled ? request.ActionToolTip : request.TypedPrompt;
}
}
+2 -2
View File
@@ -9,7 +9,7 @@ namespace Titano.App.Shell;
/// <summary>
/// Attaches an <see cref="EditableField"/> to a text box (DESIGN §4 inputs): Enter commits, Esc reverts, leaving
/// the field commits a valid value.
/// the field commits a valid value. Ctrl+Enter commits and still reaches the screen's shortcut (Import · Ctrl+Enter).
/// </summary>
public static class EditBehavior
{
@@ -37,7 +37,7 @@ public static class EditBehavior
{
field.Commit();
box.SelectAll();
e.Handled = true;
e.Handled = Keyboard.Modifiers != ModifierKeys.Control;
}
else if (e.Key == Key.Escape)
{
+22 -3
View File
@@ -3,8 +3,10 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using Titano.App.Archiving;
using Titano.App.DesignTime;
using Titano.App.Editor;
using Titano.App.Import;
using Titano.App.Server;
using Titano.App.Settings;
using Titano.Core.Diagnostics;
@@ -95,10 +97,21 @@ public static class ScreenCapture
shell.Navigate(SectionKey.About);
written += await SaveAsync(window, directory, "about", theme);
foreach (var key in new[] { SectionKey.Import, SectionKey.Sequence, SectionKey.Archive })
shell.Navigate(SectionKey.Sequence);
written += await SaveAsync(window, directory, "sequence", theme);
foreach (var state in ImportScenes.States)
{
shell.Navigate(key);
written += await SaveAsync(window, directory, key.ToString().ToLowerInvariant(), theme);
DismissToasts(window);
await ImportScenes.ShowAsync(shell, state);
if (!ImportScenes.ShowsToast(state)) DismissToasts(window);
written += await SaveAsync(window, directory, "import-" + state, theme);
}
DismissToasts(window);
foreach (var view in ArchiveScenes.Views)
{
await ArchiveScenes.ShowAsync(shell, view);
written += await SaveAsync(window, directory, "archive-" + view, theme);
}
}
// The sync table with proxies kept here and transfers in every state, then filtered to the conflict, then the
@@ -218,6 +231,12 @@ public static class ScreenCapture
return await SaveAsync(window, directory, screen, theme);
}
/// <summary>Toasts of one screen's scene stay out of the next screen's picture.</summary>
private static void DismissToasts(MainWindow window)
{
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
}
private static async Task<int> SaveAsync(Window window, string directory, string screen, AppTheme theme, ShellViewModel? waitForThumbnails = null)
{
await Settle(window);
+2
View File
@@ -268,6 +268,8 @@ public sealed class ShellViewModel : LocalizedViewModel
{
Jobs.Dispose();
Library.Dispose();
Import.Dispose();
Archive.Dispose();
Server.Dispose();
Settings.Dispose();
About.Dispose();