UI-05: the main window's TaskbarItemInfo mirrors the job bar (progress, sliding while the total is unknown) and turns red while a failure waits on the Jobs screen. UI-06: the Uploader's tray icon moves to Titano.Ui (Interop/TrayIcon, with a balloon click callback and error balloons) and the Uploader keeps using it. While the main window is minimised, hidden or behind another program, every toast (card inserted, auto-import, job ended, server messages) also becomes a Windows notification; clicking it restores the window and runs the toast's action. The icon exists only while such a notification can be clicked. Settings › General gains Notifications (on by default) and Startup: Start with Windows writes the HKCU Run value "Titano" with --minimized, and the window then waits minimised on the taskbar. UI-07: Ctrl+1…6 and Ctrl+, navigate from anywhere in the window, as the rail tooltips say (not behind the first-run dialog). The editor's 1:1 view moves to Ctrl+Shift+1; its tooltip key is renamed so no translation keeps the old shortcut. UI-08: the Jobs screen raises one toast when a long operation ends (render, deep analysis, verify, rebuild, maintenance, upload: Open; failures: Retry, or Import for a failed import), whichever screen started it. Background work and scans end silently, and a finished render of the sequence open in the editor is left to the editor's own toast with its output file. UI-10: the Jobs badge adds failures not seen on the Jobs screen yet; the Server badge counts settings conflicts waiting for a choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
122 lines
8.9 KiB
XML
122 lines
8.9 KiB
XML
<ui:TitanoWindow x:Class="Titano.App.Shell.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
|
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
|
xmlns:shell="clr-namespace:Titano.App.Shell"
|
|
xmlns:infra="clr-namespace:Titano.App.Infrastructure"
|
|
xmlns:s="clr-namespace:Titano.App.Sections"
|
|
Title="{Binding WindowTitle}"
|
|
Width="1440" Height="900" MinWidth="1200" MinHeight="760"
|
|
WindowStartupLocation="CenterScreen">
|
|
<!-- The taskbar button mirrors the job bar (BRIEF §11.5); red while a failure waits on the Jobs screen. -->
|
|
<ui:TitanoWindow.TaskbarItemInfo>
|
|
<TaskbarItemInfo ProgressState="{Binding TaskbarState}" ProgressValue="{Binding TaskbarProgress}" />
|
|
</ui:TitanoWindow.TaskbarItemInfo>
|
|
<!-- Sections by keyboard, as the rail tooltips list them (BRIEF §12.1): Ctrl+1…6 down the rail, Ctrl+, for Settings. -->
|
|
<ui:TitanoWindow.InputBindings>
|
|
<KeyBinding Key="D1" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Library}" />
|
|
<KeyBinding Key="D2" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Import}" />
|
|
<KeyBinding Key="D3" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Sequence}" />
|
|
<KeyBinding Key="D4" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Archive}" />
|
|
<KeyBinding Key="D5" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Jobs}" />
|
|
<KeyBinding Key="D6" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Server}" />
|
|
<KeyBinding Key="NumPad1" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Library}" />
|
|
<KeyBinding Key="NumPad2" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Import}" />
|
|
<KeyBinding Key="NumPad3" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Sequence}" />
|
|
<KeyBinding Key="NumPad4" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Archive}" />
|
|
<KeyBinding Key="NumPad5" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Jobs}" />
|
|
<KeyBinding Key="NumPad6" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Server}" />
|
|
<KeyBinding Key="OemComma" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Settings}" />
|
|
</ui:TitanoWindow.InputBindings>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Navigation rail: full names, collapsible to icons (BRIEF §12.1). Expanded it is at least 128 px and grows with
|
|
the longest label of the language (up to 200 px); collapsed it is 48 px of icons. While the first-run dialog is
|
|
open the shell behind it takes no input. The buttons of both lists form one group (GroupName); their check
|
|
binds one way, the section the shell navigates to (a GroupName spans every window not yet on screen). -->
|
|
<Border x:Name="Rail" Background="{DynamicResource Brush.Chrome}" ui:NavRail.IsCollapsed="{Binding IsRailCollapsed}"
|
|
IsEnabled="{Binding IsShellEnabled}">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="MinWidth" Value="128" />
|
|
<Setter Property="MaxWidth" Value="200" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsRailCollapsed}" Value="True">
|
|
<Setter Property="MinWidth" Value="0" />
|
|
<Setter Property="Width" Value="48" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<DockPanel Margin="8,8,8,8" LastChildFill="False">
|
|
<Button DockPanel.Dock="Top" Style="{StaticResource Button.IconSubtle}" HorizontalAlignment="Left" Margin="0,0,0,6"
|
|
ui:ButtonIcon.Glyph="{StaticResource Icon.Menu}" Command="{Binding ToggleRailCommand}"
|
|
ToolTip="{Binding RailToggleToolTip}" AutomationProperties.Name="{Binding RailToggleName}" />
|
|
<ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding TopSections}" Focusable="False">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type shell:SectionViewModel}">
|
|
<ui:NavRailButton GroupName="Rail" Glyph="{Binding Glyph}" Content="{Binding Label}" Badge="{Binding Badge}"
|
|
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding ToolTip}" AutomationProperties.Name="{Binding Label}"
|
|
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<ItemsControl DockPanel.Dock="Bottom" ItemsSource="{Binding BottomSections}" Focusable="False">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type shell:SectionViewModel}">
|
|
<ui:NavRailButton GroupName="Rail" Glyph="{Binding Glyph}" Content="{Binding Label}" Badge="{Binding Badge}"
|
|
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding ToolTip}" AutomationProperties.Name="{Binding Label}"
|
|
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<Grid Grid.Column="1" IsEnabled="{Binding IsShellEnabled}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Job bar (DESIGN §4): current job, progress, time left, pause; "Ready" when idle, hidden when idle in the editor.
|
|
Screen readers hear which job starts and when the queue empties, not its progress ticks. -->
|
|
<ui:JobBar x:Name="JobBar" Text="{Binding JobText}" Progress="{Binding JobProgress}" IsActive="{Binding IsJobActive}" IsIndeterminate="{Binding IsJobIndeterminate}"
|
|
StopCommand="{Binding StopJobCommand}" StopToolTip="{l:Loc Tooltips.Shell.PauseJob}" StopName="{l:Loc Shell.JobBar.Pause}" ActionGlyph="{StaticResource Icon.Pause}"
|
|
Visibility="{Binding IsJobBarVisible, Converter={StaticResource BoolToVisibility}}"
|
|
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding JobAnnouncement}" />
|
|
|
|
<ContentControl Grid.Row="1" Content="{Binding Current}" Focusable="False" />
|
|
|
|
<!-- Status strip -->
|
|
<Border Grid.Row="2" Height="30" Background="{DynamicResource Brush.Chrome}" Padding="20,0">
|
|
<StackPanel Orientation="Horizontal" TextElement.FontSize="12" TextElement.Foreground="{DynamicResource Brush.TextMuted}">
|
|
<TextBlock Text="{Binding SequencesText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding PhotosText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding StorageText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock x:Name="Connection" Text="{Binding ConnectionText}" Margin="0,0,18,0" VerticalAlignment="Center"
|
|
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding ConnectionText}" />
|
|
<TextBlock Text="{Binding JobsText}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- First run (Welcome.html): the shell dimmed behind one dialog that keeps the keyboard. -->
|
|
<Grid x:Name="WelcomeOverlay" Grid.ColumnSpan="2" Visibility="{Binding IsWelcomeOpen, Converter={StaticResource BoolToVisibility}}"
|
|
KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
|
|
<Border Background="{DynamicResource Brush.Scrim}" />
|
|
<s:WelcomeView DataContext="{Binding Welcome}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,114,0,0"
|
|
AutomationProperties.Name="{l:Loc Shell.Welcome.Title}" />
|
|
</Grid>
|
|
|
|
<!-- Above the first-run dialog too, so a card inserted meanwhile can still be acted on (Welcome.html). -->
|
|
<ui:ToastHost x:Name="Toasts" Grid.ColumnSpan="2" />
|
|
</Grid>
|
|
</ui:TitanoWindow>
|