feat(app): Import and Archive manager screens with capture scenes and resources
Import (cards and folders): the card pool with remembered profiles and the nickname field for new cards, the form (destination, scan, sessions, names with live preview and tokens, duplicates, after-import choices), the plan panel with editable session titles, Show plan, the archive import job or the folder/server run with progress, the verification result and the after-import actions (dry run, delete, format through the Windows dialog, eject, open in Library), card-insertion toasts, automatic import into the archive and resume after re-insertion. Deep analysis after import is queued with ProcessingJobs at background priority. Archive manager: archive picker, tree with availability, figure tiles and charts, mass operations on the selected set, scan/rebuild (dialog)/verify/ duplicates/orphans/adopt/maintenance as jobs, and the maintenance view with index health, recent runs and the duplicate and orphan reports with safe fixes. --capture renders import-<state> and archive-<view> from a simulated card and sample reports; en and it resources for both screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
31 files changed
+4531
-28
No files matched your search
@@ -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;
|
||||
Action.IsEnabled = false;
|
||||
Loaded += (_, _) => Typed.Focus();
|
||||
}
|
||||
|
||||
/// <summary>True when the user chose the action.</summary>
|
||||
@@ -26,4 +30,7 @@ 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) =>
|
||||
Action.IsEnabled = string.Equals(Typed.Text.Trim(), ((ConfirmRequest)DataContext).TypedConfirmation, StringComparison.CurrentCultureIgnoreCase);
|
||||
}
|
||||
@@ -3,7 +3,9 @@ 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.Import;
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Ui.Theming;
|
||||
@@ -91,10 +93,20 @@ 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);
|
||||
|
||||
DismissToasts(window);
|
||||
foreach (var state in ImportScenes.States)
|
||||
{
|
||||
shell.Navigate(key);
|
||||
written += await SaveAsync(window, directory, key.ToString().ToLowerInvariant(), theme);
|
||||
await ImportScenes.ShowAsync(shell, state);
|
||||
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);
|
||||
}
|
||||
}
|
||||
Log.Info("capture", $"{written} screenshot(s) written to {Path.GetFullPath(directory)}");
|
||||
@@ -111,6 +123,12 @@ public static class ScreenCapture
|
||||
}
|
||||
}
|
||||
|
||||
/// <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);
|
||||
|
||||
Reference in new issue
Block a user