feat: wider rail and admin sidebar that collapse to icons

Owner review 1, phase 3a (docs/requests/2026-10-15-owner-review-1.md, R1).

The desktop rail is 200 px wide, so the section names fit in every
language, and collapses to 48 px of icons with its ≡ button or Ctrl+B.
Collapsed, each icon's tooltip names its section before saying what it is
for, while screen readers keep the name and the description. The choice is
written to the settings file the moment it changes (nothing else restarts)
and survives Settings › Reset all and Import; Ctrl+B waits behind the
first-run dialog like Ctrl+1…6, and a held key toggles once.

The admin panel's sidebar is 256 px and collapses to icons the same way,
with its own ≡ button or Ctrl+B (on the physical key where the layout's B
types no Latin letter, so Cyrillic, Greek, Hebrew and Arabic layouts work).
The choice is kept in the browser, for the page when the browser refuses
storage, and the tables fit their columns again after each toggle. At
900 px and below it stays the top bar and Ctrl+B stays the browser's.

The wider rail leaves 49-72 px less for every screen at the 1200 px
minimum. Six adversarial review rounds found what that cut, and in every
shipped language no action is cut off now: the Jobs columns share their
width (Target and Progress give way first, Kind/Where/State capped on wide
windows), the editor's preview tools take a second line, a server job's
Cancel has its own header column, the Archive tree keeps a year's label,
the Import rows and result, the certificates and cache rows and the frame
table fit. Headers, titles and cells that may be shortened end in an
ellipsis and show their text in their tooltip; state tooltips start with
the state, and their explanations were reworded not to repeat it (a queued
job "waits for its turn", jobs running one at a time). The crop-result
tool sits beside Crop mask, disabled with its reason while the mask is
off. Tests check these rows in all 38 languages at 1200 px; the App test
program now shuts WPF down in order, so its exit no longer crashes after
every test passed.

Phase 3 lands as two commits: R7 (the Edit section) edits the same shell
files and follows. Also updates BRIEF (12.1, 14.8, 24), DECISIONS,
CHANGELOG, STATUS, the request file, DESIGN and the mockups; every new or
reworded string is in all 38 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-16 21:50:48 +02:00
1 parent 43b6871cdc
commit 4ea44bb917
131 files changed
+1458 -670

No files matched your search

+7 -1
View File
@@ -44,7 +44,13 @@ public sealed record MaintenanceRow(Guid JobId, string DateText, string Text, st
_ => StatusKind.Offline,
};
public string StateToolTip => Loc.L("Tooltips.Jobs.State." + State);
/// <summary>
/// The state first, as on the Jobs screen (a running row shows its percentage, not the word), then what it means; a finished
/// row has the state alone, since this list shows no run time for its explanation to speak of.
/// </summary>
public string StateToolTip => State == JobState.Done
? Loc.L("Jobs.State.Done")
: string.Join(Loc.Separator, Loc.L("Jobs.State." + State), Loc.L("Tooltips.Jobs.State." + State));
}
/// <summary>
+19 -17
View File
@@ -94,7 +94,8 @@
<!-- Frames: virtualised table with sortable headers; row actions show on hover or selection (DESIGN §4 tables). -->
<DataTemplate DataType="{x:Type e:FramesTab}">
<Border Style="{StaticResource Border.Panel}" Margin="0,10,0,0">
<Grid>
<!-- Header and rows share the actions column, so the columns line up when the row actions are wider than 118 px (longer languages). -->
<Grid Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -103,31 +104,31 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*" MinWidth="40" />
<ColumnDefinition Width="*" MinWidth="56" />
<ColumnDefinition Width="1.2*" MinWidth="76" />
<ColumnDefinition Width="0.9*" MinWidth="52" />
<ColumnDefinition Width="0.6*" MinWidth="36" />
<ColumnDefinition Width="0.6*" MinWidth="36" />
<ColumnDefinition Width="1.1*" MinWidth="64" />
<ColumnDefinition Width="0.9*" MinWidth="44" />
<ColumnDefinition Width="1.6*" MinWidth="60" />
<ColumnDefinition Width="Auto" MinWidth="118" />
<ColumnDefinition Width="1.4*" MinWidth="60" />
<ColumnDefinition Width="Auto" MinWidth="118" SharedSizeGroup="FrameActions" />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[0]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Number}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" />
<Button Grid.Column="1" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[1]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Time}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" HorizontalContentAlignment="Right" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" HorizontalContentAlignment="Right" />
<Button Grid.Column="2" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[2]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Exposure}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" HorizontalContentAlignment="Right" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" HorizontalContentAlignment="Right" />
<Button Grid.Column="3" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[3]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Iso}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" HorizontalContentAlignment="Right" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" HorizontalContentAlignment="Right" />
<Button Grid.Column="4" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[4]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Aperture}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" HorizontalContentAlignment="Right" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" HorizontalContentAlignment="Right" />
<Button Grid.Column="5" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[5]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Size}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" HorizontalContentAlignment="Right" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" HorizontalContentAlignment="Right" />
<Button Grid.Column="6" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[6]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Tier}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" Margin="10,0,0,0" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" Margin="10,0,0,0" />
<Button Grid.Column="7" Style="{StaticResource Button.SortHeader}" DataContext="{Binding Columns[7]}" Command="{Binding SortCommand}"
Content="{l:Loc Editor.Frames.Column.Flags}" ToolTip="{l:Loc Tooltips.Editor.Frames.Sort}" Margin="10,0,0,0" />
Content="{Binding Header}" ToolTip="{Binding ToolTip}" Margin="10,0,0,0" />
</Grid>
</Border>
<ListBox Grid.Row="1" ItemsSource="{Binding Frames}" SelectedItem="{Binding Selected}" ItemContainerStyle="{StaticResource ListBoxItem.Row}"
@@ -138,14 +139,14 @@
<Grid Height="36">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*" MinWidth="40" />
<ColumnDefinition Width="*" MinWidth="56" />
<ColumnDefinition Width="1.2*" MinWidth="76" />
<ColumnDefinition Width="0.9*" MinWidth="52" />
<ColumnDefinition Width="0.6*" MinWidth="36" />
<ColumnDefinition Width="0.6*" MinWidth="36" />
<ColumnDefinition Width="1.1*" MinWidth="64" />
<ColumnDefinition Width="0.9*" MinWidth="44" />
<ColumnDefinition Width="1.6*" MinWidth="60" />
<ColumnDefinition Width="Auto" MinWidth="118" />
<ColumnDefinition Width="1.4*" MinWidth="60" />
<ColumnDefinition Width="Auto" MinWidth="118" SharedSizeGroup="FrameActions" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Number}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.CellNumber}" Text="{Binding Time}" />
@@ -153,8 +154,9 @@
<TextBlock Grid.Column="3" Style="{StaticResource Text.CellNumber}" Text="{Binding Iso}" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.CellNumber}" Text="{Binding Aperture}" />
<TextBlock Grid.Column="5" Style="{StaticResource Text.CellNumber}" Text="{Binding Size}" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Cell}" Text="{Binding Tier}" Margin="10,0,0,0" />
<TextBlock x:Name="Flags" Grid.Column="7" Style="{StaticResource Text.Cell}" Text="{Binding Flags}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Cell}" Text="{Binding Tier}" Margin="10,0,0,0" ToolTip="{Binding Tier}" />
<TextBlock x:Name="Flags" Grid.Column="7" Style="{StaticResource Text.Cell}" Text="{Binding Flags}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}"
ToolTip="{Binding FlagsToolTip}" />
<StackPanel x:Name="Actions" Grid.Column="8" Orientation="Horizontal" HorizontalAlignment="Right" Visibility="Hidden">
<Button Style="{StaticResource Button.Row}" Content="{Binding ExcludeText}" ToolTip="{Binding ExcludeToolTip}" ToolTipService.ShowOnDisabled="True"
Command="{Binding DataContext.ToggleExcludeCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}" />
+12 -6
View File
@@ -20,7 +20,8 @@
<Setter Property="MinWidth" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Margin" Value="0,0,6,0" />
<!-- 6 px apart, also between two lines of tools (the line they sit on takes the bottom 6 px back). -->
<Setter Property="Margin" Value="0,0,6,6" />
<Setter Property="Background" Value="{DynamicResource Brush.Chrome}" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.Card}" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
@@ -36,7 +37,7 @@
<Setter Property="MinWidth" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="Margin" Value="0,0,6,0" />
<Setter Property="Margin" Value="0,0,6,6" />
<Setter Property="Background" Value="{DynamicResource Brush.Chrome}" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.Card}" />
</Style>
@@ -95,10 +96,15 @@
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="Transparent">
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center">
<ContentPresenter VerticalAlignment="Center" />
<ui:Icon x:Name="Arrow" Glyph="{StaticResource Icon.ChevronUp}" Size="12" Margin="2,0,0,0" VerticalAlignment="Center" Visibility="Collapsed" />
</StackPanel>
<!-- The name ends in an ellipsis in a narrow column (the tooltip names the column). -->
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<ui:Icon x:Name="Arrow" Grid.Column="1" Glyph="{StaticResource Icon.ChevronUp}" Size="12" Margin="2,0,0,0" VerticalAlignment="Center" Visibility="Collapsed" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsSorted}" Value="True">
+6 -1
View File
@@ -297,6 +297,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
if (IsExportTab) _exportCropMask = value;
else _showCropMask = value;
OnPropertyChanged();
OnPropertyChanged(nameof(CropModeToolTip));
RequestPreview(immediate: true);
}
}
@@ -320,7 +321,10 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
public CropMaskMode CropMaskMode => _cropMaskMode;
public string CropModeToolTip => Loc.L(IsCropResult ? "Tooltips.Editor.Preview.CropLoss" : "Tooltips.Editor.Preview.CropResult");
/// <summary>What the crop-result tool switches to, or (disabled while the crop mask is off) why it waits.</summary>
public string CropModeToolTip => Loc.L(!ShowCropMask ? "Tooltips.Editor.Preview.CropModeOff"
: IsCropResult ? "Tooltips.Editor.Preview.CropLoss"
: "Tooltips.Editor.Preview.CropResult");
public PreviewZoomMode ZoomMode
{
@@ -794,6 +798,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
private void OnToolsChanged()
{
OnPropertyChanged(nameof(ShowCropMask));
OnPropertyChanged(nameof(CropModeToolTip));
OnPropertyChanged(nameof(ViewVectors));
OnPropertyChanged(nameof(ViewRegions));
}
+15 -1
View File
@@ -21,11 +21,17 @@ public enum FrameSort
Flags,
}
/// <summary>A sortable column header of the Frames table: its sort state and the command that sorts on it.</summary>
/// <summary>A sortable column header of the Frames table: its name, its sort state and the command that sorts on it.</summary>
public sealed class FrameColumn(FramesTab owner, FrameSort sort) : ObservableObject
{
public FrameSort Sort { get; } = sort;
/// <summary>"Time", "Decode" (narrow columns cut it at the minimum window: <see cref="ToolTip"/> has it whole).</summary>
public string Header => Loc.L("Editor.Frames.Column." + Sort);
/// <summary>"Time · Sort by this column…".</summary>
public string ToolTip => string.Join(Loc.Separator, Header, Loc.L("Tooltips.Editor.Frames.Sort"));
public bool IsSorted => owner.SortBy == Sort;
public bool IsDescending => IsSorted && owner.SortDescending;
@@ -34,6 +40,8 @@ public sealed class FrameColumn(FramesTab owner, FrameSort sort) : ObservableObj
public void Refresh()
{
OnPropertyChanged(nameof(Header));
OnPropertyChanged(nameof(ToolTip));
OnPropertyChanged(nameof(IsSorted));
OnPropertyChanged(nameof(IsDescending));
}
@@ -83,6 +91,9 @@ public sealed class FrameRow(FramesTab owner, Frame frame, int index) : Observab
}
}
/// <summary><see cref="Flags"/> whole, where the column cuts it; none on a frame without flags.</summary>
public string? FlagsToolTip => Flags is { Length: > 0 } flags ? flags : null;
public bool IsExcluded => owner.IsExcluded(Index);
public bool IsHero => owner.HeroIndex == Index;
@@ -100,6 +111,7 @@ public sealed class FrameRow(FramesTab owner, Frame frame, int index) : Observab
OnPropertyChanged(nameof(IsExcluded));
OnPropertyChanged(nameof(IsHero));
OnPropertyChanged(nameof(Flags));
OnPropertyChanged(nameof(FlagsToolTip));
OnPropertyChanged(nameof(ExcludeText));
OnPropertyChanged(nameof(ExcludeToolTip));
}
@@ -227,6 +239,8 @@ public sealed class FramesTab : EditorTab
public override void OnContentChanged()
{
Load();
// A language switch arrives here too: the headers follow.
foreach (var column in Columns) column.Refresh();
base.OnContentChanged();
}
+2 -1
View File
@@ -17,7 +17,8 @@
<v:PreviewViewport x:Name="Viewport" Source="{Binding PreviewImage}" OriginalSource="{Binding OriginalImage}" IsCompareEnabled="{Binding IsCompare}"
WipeLabel="{Binding WipeLabel}" ZoomMode="Actual" InfoText="{Binding InfoText}" AutomationProperties.Name="{l:Loc Editor.Preview}">
<v:PreviewViewport.ToolsContent>
<StackPanel Orientation="Horizontal">
<!-- The tools' 6 px bottom margin is for a second line in the editor; one line takes it back. -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,-6">
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding IsCompare}" ui:ButtonIcon.Glyph="{StaticResource Icon.Compare}"
Content="{l:Loc Editor.Preview.Compare}" ToolTip="{l:Loc Tooltips.Editor.Preview.Compare}" />
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="True" ui:ButtonIcon.Glyph="{StaticResource Icon.Info}" Checked="OnShotData"
@@ -182,6 +182,9 @@ public sealed class AppServices : IAsyncDisposable
ApplyJobSettings();
}
/// <summary>Writes the settings file and nothing else: for choices that change only what is shown (the rail).</summary>
public void SavePreferences() => SaveSettingsAction();
/// <summary>
/// The archive's rescan interval, now, and a review of the priority queue (Settings › Rendering): turned on, it may make
/// the running job yield at once. The parallelism applies from the next sequence or job.
+7 -2
View File
@@ -67,8 +67,12 @@ public sealed class JobRowViewModel : ObservableObject
_ => StatusKind.Offline,
};
/// <summary>The error of a failed job, or the state explanation.</summary>
public string StateToolTip => _entry.Job.Error is { Length: > 0 } error ? error : Loc.L("Tooltips.Jobs.State." + _entry.State);
/// <summary>
/// The state as the cell shows it (whole: the narrow column cuts longer states at the minimum window), then the error of
/// a failed job or what the state means (worded not to repeat the state).
/// </summary>
public string StateToolTip => string.Join(Loc.Separator, StateText,
_entry.Job.Error is { Length: > 0 } error ? error : Loc.L("Tooltips.Jobs.State." + _entry.State));
/// <summary>Muted text for rows that are not doing anything (queued, history), as in the mockup.</summary>
public bool IsDimmed => _entry.State is JobState.Queued or JobState.Done or JobState.Cancelled;
@@ -134,6 +138,7 @@ public sealed class JobRowViewModel : ObservableObject
OnPropertyChanged(nameof(LeftText));
OnPropertyChanged(nameof(WhereText));
OnPropertyChanged(nameof(StateText));
OnPropertyChanged(nameof(StateToolTip));
OnPropertyChanged(nameof(StateAnnouncement));
if (_isExpanded) OnPropertyChanged(nameof(LogText));
}
+13 -14
View File
@@ -127,21 +127,20 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type ar:ArchiveTreeRowViewModel}">
<Grid Margin="{Binding IndentMargin}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button x:Name="Toggle" Style="{StaticResource Button.IconSubtle}" Width="22" Height="22" MinWidth="22" ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronRight}"
Command="{Binding ToggleCommand}" ToolTip="{Binding ToggleToolTip}" AutomationProperties.Name="{Binding ToggleName}" Visibility="Hidden"
Focusable="False" />
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Title}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<TextBlock x:Name="Detail" Grid.Column="2" Text="{Binding Detail}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" Margin="8,0,0,0"
Visibility="Collapsed" Typography.NumeralAlignment="Tabular" />
<ui:StatusGlyph x:Name="State" Grid.Column="2" Kind="{Binding AvailabilityKind}" Text="{Binding AvailabilityText}" VerticalAlignment="Center"
<!-- Measured in order: the toggle's slot, an archive's state, the title, then a year's figures, which give way first (the row's
tooltip has them whole), so a year keeps its label at the minimum window. -->
<DockPanel Margin="{Binding IndentMargin}">
<Border DockPanel.Dock="Left" Width="24">
<Button x:Name="Toggle" Style="{StaticResource Button.IconSubtle}" Width="22" Height="22" MinWidth="22" HorizontalAlignment="Left"
ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronRight}" Command="{Binding ToggleCommand}" ToolTip="{Binding ToggleToolTip}"
AutomationProperties.Name="{Binding ToggleName}" Visibility="Hidden" Focusable="False" />
</Border>
<ui:StatusGlyph x:Name="State" DockPanel.Dock="Right" Kind="{Binding AvailabilityKind}" Text="{Binding AvailabilityText}" VerticalAlignment="Center"
Margin="8,0,0,0" ToolTip="{Binding AvailabilityToolTip}" Visibility="Collapsed" />
</Grid>
<TextBlock x:Name="Title" DockPanel.Dock="Left" Text="{Binding Title}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<TextBlock x:Name="Detail" Text="{Binding Detail}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" Margin="8,0,0,0"
TextTrimming="CharacterEllipsis" TextAlignment="Right" Visibility="Collapsed" Typography.NumeralAlignment="Tabular" />
</DockPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding HasChildren}" Value="True">
<Setter TargetName="Toggle" Property="Visibility" Value="Visible" />
+23 -22
View File
@@ -479,15 +479,15 @@
<ColumnDefinition Width="Auto" MinWidth="110" SharedSizeGroup="SessionTime" />
<ColumnDefinition Width="0.85*" MinWidth="70" />
<ColumnDefinition Width="Auto" MinWidth="56" SharedSizeGroup="SessionSize" />
<ColumnDefinition Width="0.9*" MinWidth="64" />
<ColumnDefinition Width="1.6*" MinWidth="150" />
<ColumnDefinition Width="0.9*" MinWidth="48" />
<ColumnDefinition Width="1.6*" MinWidth="140" />
<ColumnDefinition Width="Auto" SharedSizeGroup="SessionAction" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Session}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Frames}" Margin="10,0,0,0" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Camera}" Margin="10,0,0,0" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Sequence}" Margin="10,0,0,0" />
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Session}" ToolTip="{l:Loc Import.Session.Column.Session}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Frames}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Session.Column.Frames}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Session.Column.Size}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Camera}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Session.Column.Camera}" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Sequence}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Session.Column.Sequence}" />
</Grid>
<ListBox x:Name="SessionRows" Grid.Row="1" ItemsSource="{Binding Sessions}" ItemContainerStyle="{StaticResource ListBoxItem.Session}"
AutomationProperties.Name="{l:Loc Import.Plan.Title}" KeyboardNavigation.TabNavigation="Continue" ScrollViewer.VerticalScrollBarVisibility="Visible">
@@ -498,12 +498,12 @@
<ColumnDefinition Width="Auto" MinWidth="110" SharedSizeGroup="SessionTime" />
<ColumnDefinition Width="0.85*" MinWidth="70" />
<ColumnDefinition Width="Auto" MinWidth="56" SharedSizeGroup="SessionSize" />
<ColumnDefinition Width="0.9*" MinWidth="64" />
<ColumnDefinition Width="1.6*" MinWidth="150" />
<ColumnDefinition Width="0.9*" MinWidth="48" />
<ColumnDefinition Width="1.6*" MinWidth="140" />
<ColumnDefinition Width="Auto" SharedSizeGroup="SessionAction" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Row.TimeText}" ToolTip="{Binding Row.TimeText}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Row.FramesText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Row.FramesText}" Margin="10,0,0,0" ToolTip="{Binding Row.FramesText}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.CellNumber}" Text="{Binding Row.SizeText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Cell}" Text="{Binding Row.CameraText}" Margin="10,0,0,0" ToolTip="{Binding Row.CameraText}" />
<DockPanel Grid.Column="4" Margin="10,0,0,0">
@@ -540,13 +540,14 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<!-- The glyph colours the result; the text beside it is what screen readers announce. -->
<!-- The glyph colours the result; the text beside it is what screen readers announce. The figures move under it when the card is too
narrow for both (Romanian at 1200 px). -->
<WrapPanel>
<ui:StatusGlyph x:Name="ResultGlyph" Kind="{Binding ResultKind}" VerticalAlignment="Center" />
<TextBlock Text="{Binding ResultText, NotifyOnTargetUpdated=True}" Foreground="{Binding Foreground, ElementName=ResultGlyph}" FontSize="16" FontWeight="SemiBold"
VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" ToolTip="{l:Loc Tooltips.Import.Result}" AutomationProperties.LiveSetting="Polite" />
<TextBlock Text="{Binding DetailText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="14,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</WrapPanel>
<ListBox Grid.Row="1" ItemsSource="{Binding Failures}" Margin="0,8,0,0" ItemContainerStyle="{StaticResource ListBoxItem.Failure}"
Visibility="{Binding HasFailures, Converter={StaticResource BoolToVisibility}}" AutomationProperties.Name="{l:Loc Import.Result.FailuresName}">
<ListBox.ItemTemplate>
@@ -651,16 +652,16 @@
<!-- The right margin is the list's scroll bar (always shown, 10 px), so header and cells line up. -->
<Grid Grid.Row="2" Margin="0,10,10,4" TextElement.FontSize="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*" MinWidth="140" />
<ColumnDefinition Width="1.2*" MinWidth="120" />
<ColumnDefinition Width="1.8*" MinWidth="180" />
<ColumnDefinition Width="0.8*" MinWidth="90" />
<ColumnDefinition Width="*" MinWidth="110" />
<ColumnDefinition Width="Auto" MinWidth="64" SharedSizeGroup="PlanSize" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PlanAction" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Source}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Destination}" Margin="10,0,0,0" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Action}" Margin="10,0,0,0" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" />
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Source}" ToolTip="{l:Loc Import.Details.Column.Source}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Destination}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Details.Column.Destination}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Action}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Details.Column.Action}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" ToolTip="{l:Loc Import.Session.Column.Size}" />
</Grid>
<ListBox x:Name="PlanRows" Grid.Row="3" ItemsSource="{Binding Rows}" ItemContainerStyle="{StaticResource ListBoxItem.PlanRow}" AutomationProperties.Name="{l:Loc Import.Details.Title}"
KeyboardNavigation.TabNavigation="Continue" ScrollViewer.VerticalScrollBarVisibility="Visible">
@@ -673,16 +674,16 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*" MinWidth="140" />
<ColumnDefinition Width="1.2*" MinWidth="120" />
<ColumnDefinition Width="1.8*" MinWidth="180" />
<ColumnDefinition Width="0.8*" MinWidth="90" />
<ColumnDefinition Width="*" MinWidth="110" />
<ColumnDefinition Width="Auto" MinWidth="64" SharedSizeGroup="PlanSize" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PlanAction" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="Source" Style="{StaticResource Text.Cell}" Text="{Binding SourceText}" ToolTip="{Binding Source}" />
<TextBlock x:Name="Destination" Grid.Column="1" Style="{StaticResource Text.CellPath}" Text="{Binding DestinationText}" Margin="10,0,0,0"
ToolTip="{Binding Destination}" />
<TextBlock x:Name="Action" Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ActionText}" Margin="10,0,0,0" />
<TextBlock x:Name="Action" Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ActionText}" Margin="10,0,0,0" ToolTip="{Binding ActionText}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" />
<Button x:Name="Split" Grid.Column="4" Style="{StaticResource Button.RowAction}" Margin="10,0,4,0" Content="{l:Loc Import.Details.Split}"
Command="{Binding DataContext.SplitCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}"
+22 -19
View File
@@ -118,24 +118,27 @@
<!-- Header -->
<Border BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="14,8,24,8">
<Grid>
<!-- Kind, Where and State share the width with Target and Progress (Target, whose name is in its tooltip, gives way first), so the actions keep
their room at 1200 px beside the 200 px rail in every language; a cut kind, place, state or header shows whole in its tooltip. On wide
windows Kind, Where and State stop growing and Target takes the rest (Jobs.html). -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="28" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="1.6*" MinWidth="120" />
<ColumnDefinition Width="*" MinWidth="120" MaxWidth="240" />
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
<ColumnDefinition Width="1.6*" MinWidth="84" />
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
<ColumnDefinition Width="90" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="110" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="0.6*" MinWidth="80" MaxWidth="140" />
<ColumnDefinition Width="0.7*" MinWidth="116" MaxWidth="170" />
<ColumnDefinition Width="Auto" MinWidth="150" SharedSizeGroup="JobActions" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Kind}" Margin="10,0,0,0" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Target}" Margin="10,0,0,0" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Progress}" Margin="10,0,0,0" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Jobs.Column.Speed}" Margin="10,0,0,0" />
<TextBlock Grid.Column="5" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Jobs.Column.Left}" Margin="10,0,0,0" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Where}" Margin="16,0,0,0" />
<TextBlock Grid.Column="7" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.State}" Margin="10,0,0,0" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Kind}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.Kind}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Target}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.Target}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Progress}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.Progress}" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Jobs.Column.Speed}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.Speed}" />
<TextBlock Grid.Column="5" Style="{StaticResource Text.HeaderEnd}" Text="{l:Loc Jobs.Column.Left}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.Left}" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.Where}" Margin="16,0,0,0" ToolTip="{l:Loc Jobs.Column.Where}" />
<TextBlock Grid.Column="7" Style="{StaticResource Text.Header}" Text="{l:Loc Jobs.Column.State}" Margin="10,0,0,0" ToolTip="{l:Loc Jobs.Column.State}" />
</Grid>
</Border>
@@ -151,19 +154,19 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="28" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="1.6*" MinWidth="120" />
<ColumnDefinition Width="*" MinWidth="120" MaxWidth="240" />
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
<ColumnDefinition Width="1.6*" MinWidth="84" />
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
<ColumnDefinition Width="90" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="110" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="0.6*" MinWidth="80" MaxWidth="140" />
<ColumnDefinition Width="0.7*" MinWidth="116" MaxWidth="170" />
<ColumnDefinition Width="Auto" MinWidth="150" SharedSizeGroup="JobActions" />
</Grid.ColumnDefinitions>
<Button x:Name="Toggle" Style="{StaticResource Button.IconSubtle}" Width="22" Height="22" MinWidth="22" HorizontalAlignment="Left"
ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronRight}" Command="{Binding ToggleLogCommand}"
ToolTip="{Binding ToggleToolTip}" AutomationProperties.Name="{Binding ToggleName}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Muted}" Text="{Binding Kind}" Margin="10,0,0,0" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Muted}" Text="{Binding Kind}" Margin="10,0,0,0" ToolTip="{Binding Kind}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding Target}" Margin="10,0,0,0" ToolTip="{Binding Target}" />
<Grid Grid.Column="3" Margin="10,0,0,0">
<Grid.ColumnDefinitions>
@@ -176,7 +179,7 @@
</Grid>
<TextBlock Grid.Column="4" Style="{StaticResource Text.MutedEnd}" Text="{Binding SpeedText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="5" Style="{StaticResource Text.MutedEnd}" Text="{Binding LeftText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Muted}" Text="{Binding WhereText}" Margin="16,0,0,0" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.Muted}" Text="{Binding WhereText}" Margin="16,0,0,0" ToolTip="{Binding WhereText}" />
<!-- A new state is announced with its job; progress ticks are not. -->
<ui:StatusGlyph Grid.Column="7" Kind="{Binding StateKind}" Text="{Binding StateText}" ToolTip="{Binding StateToolTip}"
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0"
+6 -4
View File
@@ -282,13 +282,15 @@
<ColumnDefinition Width="80" />
<ColumnDefinition Width="*" MinWidth="120" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Title}" />
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Title}" ToolTip="{Binding Title}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding DateText}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding Camera}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}" />
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding Camera}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}"
ToolTip="{Binding Camera, Converter={x:Static ui:EmptyToNullConverter.Instance}}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.CellNumber}" Text="{Binding FramesText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.CellNumber}" Text="{Binding SpanText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="4" Style="{StaticResource Text.CellNumber}" Text="{Binding SpanText}" Margin="10,0,0,0"
ToolTip="{Binding SpanText, Converter={x:Static ui:EmptyToNullConverter.Instance}}" />
<TextBlock Grid.Column="5" Style="{StaticResource Text.CellNumber}" Text="{Binding IntervalText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="6" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" ToolTip="{Binding SizeText}" />
<ItemsControl Grid.Column="7" Margin="16,0,0,0" ItemsSource="{Binding Statuses}" ItemTemplate="{StaticResource Template.Status}"
ItemsPanel="{StaticResource Panel.Row}" VerticalAlignment="Center" Focusable="False" ClipToBounds="True" />
<Border Grid.Column="7" HorizontalAlignment="Right" Background="{DynamicResource Brush.Card}" Padding="6,0,0,0" Style="{StaticResource Border.RowActions}">
+31 -28
View File
@@ -38,39 +38,40 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource Button.IconSubtle}" ui:ButtonIcon.Glyph="{StaticResource Icon.Back}" Command="{Binding BackCommand}"
ToolTip="{l:Loc Tooltips.Editor.Back}" AutomationProperties.Name="{l:Loc Editor.Back}" Margin="-6,0,0,0" />
<TextBlock Grid.Column="1" Text="{Binding Title}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" Margin="6,0,12,0" MaxWidth="320"
TextTrimming="CharacterEllipsis" />
<!-- A server sequence edited with proxies: where it lives (read-only or out of date says so) and its analysis or render on the server,
before the summary; all of it shares the space the actions leave and ends in an ellipsis. -->
<DockPanel Grid.Column="2" VerticalAlignment="Center">
<!-- The title, where a server sequence edited with proxies lives (read-only or out of date says so) and the summary share what the server
job and the actions leave, and give way first: each ends in an ellipsis. -->
<DockPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock DockPanel.Dock="Left" Text="{Binding Title}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" Margin="6,0,12,0" MaxWidth="320"
TextTrimming="CharacterEllipsis" ToolTip="{Binding Title}" />
<ui:StatusGlyph DockPanel.Dock="Left" Kind="Remote" Text="{Binding RemoteText}" ToolTip="{Binding RemoteToolTip}" FontSize="{StaticResource Size.Body}" Margin="0,0,12,0"
MaxWidth="220" VerticalAlignment="Center" Visibility="{Binding IsRemote, Converter={StaticResource BoolToVisibility}}" />
<!-- The server job: its bar, what it is and how far (the text gives way first), and Cancel, which always stays (BRIEF §11.5). -->
<Grid DockPanel.Dock="Left" Margin="0,0,12,0" MaxWidth="300" VerticalAlignment="Center"
Visibility="{Binding ServerJobText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ProgressBar Width="48" Maximum="1" Value="{Binding ServerJobProgress, Mode=OneWay}" VerticalAlignment="Center" Margin="0,0,8,0"
AutomationProperties.Name="{Binding ServerJobText}" Visibility="{Binding HasServerJobProgress, Converter={StaticResource BoolToVisibility}}" />
<ui:StatusGlyph Grid.Column="1" Kind="{Binding ServerJobKind}" Text="{Binding ServerJobText}" ToolTip="{Binding ServerJobToolTip}"
FontSize="{StaticResource Size.Body}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
<Button Grid.Column="2" Style="{StaticResource Button.IconSubtle}" Width="26" Height="26" Margin="4,0,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Cancel}"
Command="{Binding CancelServerJobCommand}" ToolTip="{Binding CancelServerJobToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{l:Loc Editor.ServerJob.Cancel}" />
</Grid>
<TextBlock Text="{Binding Summary}" Style="{StaticResource Text.Secondary}" FontSize="{StaticResource Size.Body}" VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" ToolTip="{Binding Summary}" />
</DockPanel>
<!-- The server job: its bar, what it is and how far, and Cancel, which always stays (BRIEF §11.5): its own column, so the title gives way
before it at the minimum window. -->
<Grid Grid.Column="2" Margin="12,0,0,0" MaxWidth="300" VerticalAlignment="Center"
Visibility="{Binding ServerJobText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ProgressBar Width="48" Maximum="1" Value="{Binding ServerJobProgress, Mode=OneWay}" VerticalAlignment="Center" Margin="0,0,8,0"
AutomationProperties.Name="{Binding ServerJobText}" Visibility="{Binding HasServerJobProgress, Converter={StaticResource BoolToVisibility}}" />
<ui:StatusGlyph Grid.Column="1" Kind="{Binding ServerJobKind}" Text="{Binding ServerJobText}" ToolTip="{Binding ServerJobToolTip}"
FontSize="{StaticResource Size.Body}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
<Button Grid.Column="2" Style="{StaticResource Button.IconSubtle}" Width="26" Height="26" Margin="4,0,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Cancel}"
Command="{Binding CancelServerJobCommand}" ToolTip="{Binding CancelServerJobToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{l:Loc Editor.ServerJob.Cancel}" />
</Grid>
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="12,0,0,0">
<Button Content="{l:Loc Editor.Analyse}" Command="{Binding AnalyseCommand}" ToolTip="{Binding AnalyseToolTip}" ToolTipService.ShowOnDisabled="True" />
<Button Content="{l:Loc Editor.OptimiseAll}" Command="{Binding OptimiseAllCommand}" ToolTip="{Binding OptimiseAllToolTip}"
@@ -124,8 +125,9 @@
CropMaskMode="{Binding CropMaskMode}" InfoText="{Binding InfoText}" ToolTip="{l:Loc Tooltips.Editor.Preview.View}"
AutomationProperties.Name="{l:Loc Editor.Preview}" SizeChanged="OnPreviewSizeChanged">
<v:PreviewViewport.ToolsContent>
<!-- Tools give the keyboard back to the preview after a click, so Space keeps playing (OnToolClicked). -->
<StackPanel Orientation="Horizontal" ButtonBase.Click="OnToolClicked">
<!-- Tools give the keyboard back to the preview after a click, so Space keeps playing (OnToolClicked). They take a second
line rather than lose Play and Full screen where long labels meet a narrow preview (1200 px, 200 px rail). -->
<WrapPanel ButtonBase.Click="OnToolClicked" Margin="0,0,0,-6">
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding IsCompare}" ui:ButtonIcon.Glyph="{StaticResource Icon.Compare}"
Content="{l:Loc Editor.Preview.Compare}" ToolTip="{l:Loc Tooltips.Editor.Preview.Compare}" />
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
@@ -136,9 +138,10 @@
ToolTip="{l:Loc Tooltips.Editor.Preview.Regions}" />
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding ShowCropMask}" ui:ButtonIcon.Glyph="{StaticResource Icon.CropMask}"
Content="{l:Loc Editor.Preview.CropMask}" ToolTip="{l:Loc Tooltips.Editor.Preview.CropMask}" />
<!-- "What I lose" (dimmed) or "how it will look" (hidden) outside the crop (BRIEF §12.3). -->
<ToggleButton Visibility="{Binding ShowCropMask, Converter={StaticResource BoolToVisibility}}" Style="{StaticResource ToggleButton.PreviewToolIcon}"
IsChecked="{Binding IsCropResult}" ui:ButtonIcon.Glyph="{StaticResource Icon.Eye}" ToolTip="{Binding CropModeToolTip}"
<!-- "What I lose" (dimmed) or "how it will look" (hidden) outside the crop (BRIEF §12.3), beside the mask and always there (disabled
while the mask is off), so turning the mask on never moves the other tools to another line. -->
<ToggleButton Style="{StaticResource ToggleButton.PreviewToolIcon}" IsChecked="{Binding IsCropResult}" IsEnabled="{Binding ShowCropMask}"
ui:ButtonIcon.Glyph="{StaticResource Icon.Eye}" ToolTip="{Binding CropModeToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{l:Loc Editor.Preview.CropResult}" />
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
IsChecked="{Binding IsActualSize}" Content="{l:Loc Editor.Preview.ActualSize}" ToolTip="{l:Loc Tooltips.Editor.Preview.OneToOne}" />
@@ -160,7 +163,7 @@
</Style>
</Button.Style>
</Button>
</StackPanel>
</WrapPanel>
</v:PreviewViewport.ToolsContent>
</v:PreviewViewport>
<!-- The frame on screen cannot be read: one sentence instead of another frame's picture. -->
+12 -10
View File
@@ -185,7 +185,7 @@
</ItemsControl>
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Archive.Proxies}">
<ComboBox Width="140" HorizontalAlignment="Left" ItemsSource="{Binding ProxySizes}" SelectedItem="{Binding SelectedProxySize}" DisplayMemberPath="Label"
<ComboBox Width="170" HorizontalAlignment="Left" ItemsSource="{Binding ProxySizes}" SelectedItem="{Binding SelectedProxySize}" DisplayMemberPath="Label"
ToolTip="{l:Loc Tooltips.Settings.ProxySize}" AutomationProperties.Name="{l:Loc Settings.Archive.Proxies}" />
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Archive.Thumbnails}">
@@ -268,7 +268,7 @@
<!-- ================= Rendering (Settings.html) ================= -->
<StackPanel Style="{StaticResource Page}" Visibility="{Binding Page, Converter={x:Static shell:EqualsToVisibilityConverter.Instance}, ConverterParameter=Rendering}">
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Rendering.Quality}">
<ComboBox Width="160" HorizontalAlignment="Left" ItemsSource="{Binding Qualities}" SelectedItem="{Binding SelectedQuality}" DisplayMemberPath="Label"
<ComboBox Width="170" HorizontalAlignment="Left" ItemsSource="{Binding Qualities}" SelectedItem="{Binding SelectedQuality}" DisplayMemberPath="Label"
ToolTip="{l:Loc Tooltips.Settings.QualityProfile}" AutomationProperties.Name="{l:Loc Settings.Rendering.Quality}" />
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Rendering.Memory}">
@@ -317,12 +317,12 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="272" Margin="0,0,16,6">
<Grid Width="300" Margin="0,0,16,6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="112" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Label}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="0,0,8,0" />
<TextBlock Text="{Binding Label}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="0,0,8,0" ToolTip="{Binding Label}" />
<ComboBox Grid.Column="1" ItemsSource="{Binding Levels}" SelectedItem="{Binding Selected}" DisplayMemberPath="Label"
ToolTip="{Binding ToolTip}" AutomationProperties.Name="{Binding Label}" />
</Grid>
@@ -348,7 +348,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{l:Loc Settings.Rendering.Encoders}" FontWeight="SemiBold" VerticalAlignment="Center" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Hint}" Text="{Binding AdapterText}" Margin="10,0,0,0" ToolTip="{l:Loc Tooltips.Settings.Adapter}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Hint}" Text="{Binding AdapterText}" Margin="10,0,0,0" ToolTip="{Binding AdapterToolTip}" />
<Button Grid.Column="2" Style="{StaticResource Button.Compact}" Content="{l:Loc Settings.Rendering.Redetect}" Command="{Binding RedetectCommand}"
ToolTip="{l:Loc Tooltips.Settings.Redetect}" Margin="8,0,0,0" />
<Button Grid.Column="3" Style="{StaticResource Button.Compact}" Content="{l:Loc Settings.Rendering.SelfTest}" Command="{Binding SelfTestCommand}"
@@ -389,9 +389,9 @@
<ColumnDefinition Width="*" MinWidth="120" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Codec}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Name}" Margin="10,0,0,0" ToolTip="{Binding Row.Name}" />
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Name}" Margin="10,0,0,0" ToolTip="{Binding Name}" />
<TextBlock x:Name="TenBit" Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding TenBitText}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextFaint}" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Cell}" Text="{Binding MaxText}" Margin="10,0,0,0" />
<TextBlock Grid.Column="3" Style="{StaticResource Text.Cell}" Text="{Binding MaxText}" Margin="10,0,0,0" ToolTip="{Binding MaxText}" />
<ui:StatusGlyph Grid.Column="4" Kind="{Binding ResultKind}" Text="{Binding ResultText}" ToolTip="{Binding ResultToolTip}" FontSize="13"
VerticalAlignment="Center" Margin="10,0,0,0" Visibility="{Binding HasResult, Converter={StaticResource BoolToVisibility}}"
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding ResultAnnouncement}" />
@@ -490,10 +490,11 @@
<!-- ================= Storage ================= -->
<StackPanel Style="{StaticResource Page}" Visibility="{Binding Page, Converter={x:Static shell:EqualsToVisibilityConverter.Instance}, ConverterParameter=Storage}">
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Storage.Folder}">
<!-- Path, browse, usage, Clear on one line: the path gives way first (Settings.html). -->
<!-- Path, browse, usage, Clear on one line: the path gives way first (Settings.html), down to 110 px, so the row fits at 1200 px
beside the 200 px rail in every language. -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="160" MaxWidth="360" />
<ColumnDefinition Width="*" MinWidth="110" MaxWidth="360" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
@@ -541,8 +542,9 @@
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type st:TrustedCertificateRow}">
<Grid Height="36">
<!-- The server name gives way first (it ends in an ellipsis), so Forget fits at 1200 px in longer languages. -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="160" />
<ColumnDefinition Width="*" MinWidth="120" />
<ColumnDefinition Width="170" />
<ColumnDefinition Width="110" />
<ColumnDefinition Width="Auto" />
+12 -2
View File
@@ -669,9 +669,17 @@ public sealed class SettingsViewModel : SectionViewModel
public string? AdapterText
{
get => _adapterText;
private set => Set(ref _adapterText, value);
private set
{
if (Set(ref _adapterText, value)) OnPropertyChanged(nameof(AdapterToolTip));
}
}
/// <summary>The adapter and its encoders whole (the row may cut them at the minimum width), then what they are.</summary>
public string AdapterToolTip => AdapterText is { Length: > 0 } adapter
? string.Join(Loc.Separator, adapter, Loc.L("Tooltips.Settings.Adapter"))
: Loc.L("Tooltips.Settings.Adapter");
public bool IsDetecting
{
get => _isDetecting;
@@ -1550,6 +1558,7 @@ public sealed class SettingsViewModel : SectionViewModel
TrustedCertificates = _s.TrustedCertificates,
RecentServers = _s.RecentServers,
Window = _s.Window,
RailCollapsed = _s.RailCollapsed,
FirstRunCompleted = _s.FirstRunCompleted,
JobsClearedAt = _s.JobsClearedAt,
};
@@ -1620,10 +1629,11 @@ public sealed class SettingsViewModel : SectionViewModel
Shell.Notify(Loc.L("Errors.Settings.Import"), isError: true);
return;
}
// Everything but the session, the window and the first-run flag.
// Everything but the session, the window and its rail, and the first-run flag.
imported.ProtectedToken = _s.ProtectedToken;
imported.ServerUrl = _s.ServerUrl;
imported.Window = _s.Window;
imported.RailCollapsed = _s.RailCollapsed;
imported.FirstRunCompleted = _s.FirstRunCompleted;
ApplyAll(imported);
// Settings of a PC never rewrite the shared archive.json: the imported templates and sizes are the defaults of new
+2 -1
View File
@@ -69,7 +69,8 @@ public sealed class SyncRow : ObservableObject
/// <summary>"Clouds over the Langhe: In sync": what a screen reader announces when the state changes (not progress).</summary>
public string StateAnnouncement => Loc.L("Server.Sync.Row.State", Title, StateText);
public string StateToolTip => SyncText.State(_entry).ToolTip;
/// <summary>The state whole (its fixed column cuts the longer ones), then what it means or what differs.</summary>
public string StateToolTip => string.Join(Loc.Separator, StateText, SyncText.State(_entry).ToolTip);
/// <summary>Settings differ on both sides: the row is drawn on the warning tint (the word in the State column says it too).</summary>
public bool IsConflict => _entry.Status == SyncStatus.Conflict && _entry.Transfer is null;
+13 -10
View File
@@ -28,6 +28,8 @@
<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}" />
<!-- The rail's names or its icons alone (owner review 1). -->
<KeyBinding Key="B" Modifiers="Control" Command="{Binding ToggleRailCommand}" />
</ui:TitanoWindow.InputBindings>
<Grid>
<Grid.ColumnDefinitions>
@@ -35,20 +37,18 @@
<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). -->
<!-- Navigation rail: full names, collapsible to icons (BRIEF §12.1; owner review 1): 200 px with names, 48 px of icons
whose tooltips name their section, by ≡ or Ctrl+B, and the choice is kept. 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" />
<Setter Property="Width" Value="{StaticResource Width.Rail}" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsRailCollapsed}" Value="True">
<Setter Property="MinWidth" Value="0" />
<Setter Property="Width" Value="48" />
<Setter Property="Width" Value="{StaticResource Width.RailCollapsed}" />
</DataTrigger>
</Style.Triggers>
</Style>
@@ -57,11 +57,13 @@
<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}" />
<!-- The tooltip names the section while the rail shows icons alone; screen readers hear the name once, then what it is for. -->
<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}"
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding RailToolTip}" AutomationProperties.Name="{Binding Label}"
AutomationProperties.HelpText="{Binding ToolTip}"
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
@@ -70,7 +72,8 @@
<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}"
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding RailToolTip}" AutomationProperties.Name="{Binding Label}"
AutomationProperties.HelpText="{Binding ToolTip}"
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
+7
View File
@@ -70,6 +70,13 @@ public partial class MainWindow : TitanoWindow
if (!e.Handled && e.Key == Key.F6 && Keyboard.Modifiers == ModifierKeys.None) e.Handled = Toasts.FocusNewest();
}
/// <summary>A held Ctrl+B toggles the rail once, not at the keyboard's repeat rate.</summary>
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
base.OnPreviewKeyDown(e);
if (e.IsRepeat && e.Key == Key.B && Keyboard.Modifiers == ModifierKeys.Control) e.Handled = true;
}
private void UpdateConnection() =>
Connection.SetResourceReference(TextBlock.ForegroundProperty, _shell.IsConnected ? "Brush.Accent" : "Brush.TextMuted");
+17
View File
@@ -20,6 +20,7 @@ public abstract class SectionViewModel(SectionKey key, string iconKey) : Localiz
{
private bool _isSelected;
private int _badge;
private bool _inCollapsedRail;
public SectionKey Key { get; } = key;
@@ -34,6 +35,22 @@ public abstract class SectionViewModel(SectionKey key, string iconKey) : Localiz
/// <summary>Rail tooltip: what the section is for.</summary>
public string ToolTip => Core.Localization.Loc.L("Tooltips.Nav." + Key);
/// <summary>
/// The rail button's tooltip: <see cref="ToolTip"/>, after the section's name while the rail shows icons alone (owner
/// review 1).
/// </summary>
public string RailToolTip => _inCollapsedRail ? Core.Localization.Loc.L("Tooltips.Nav.Collapsed", Label, ToolTip) : ToolTip;
/// <summary>The rail shows icons alone (<see cref="ShellViewModel.IsRailCollapsed"/>).</summary>
internal bool InCollapsedRail
{
get => _inCollapsedRail;
set
{
if (Set(ref _inCollapsedRail, value)) OnPropertyChanged(nameof(RailToolTip));
}
}
/// <summary>Window title suffix ("Titano — Import").</summary>
public virtual string Title => Label;
+6 -1
View File
@@ -46,6 +46,7 @@ public sealed class ShellViewModel : LocalizedViewModel
About = new AboutViewModel(this);
TopSections = [Library, Import, Sequence, Archive, Jobs, Server];
BottomSections = [Settings, About];
foreach (var section in AllSections) section.InCollapsedRail = _isRailCollapsed;
_current = Library;
Library.IsSelected = true;
Library.PropertyChanged += OnCurrentChanged;
@@ -57,7 +58,8 @@ public sealed class ShellViewModel : LocalizedViewModel
else if (p is SectionKey k) Navigate(k);
else if (p is string name && Enum.TryParse<SectionKey>(name, out var key)) Navigate(key);
}, _ => IsShellEnabled);
ToggleRailCommand = new RelayCommand(() => IsRailCollapsed = !IsRailCollapsed);
// Like the shortcuts above, Ctrl+B leaves the shell behind the first-run dialog alone.
ToggleRailCommand = new RelayCommand(() => IsRailCollapsed = !IsRailCollapsed, () => IsShellEnabled);
services.Server.PropertyChanged += (_, _) => SetConnection(services.Server.ServerName);
if (!_settings.FirstRunCompleted) _welcome = new WelcomeViewModel(this);
}
@@ -117,6 +119,7 @@ public sealed class ShellViewModel : LocalizedViewModel
public string WindowTitle => Current == Library ? Loc.L("Shell.AppName") : Loc.L("Shell.WindowTitle", Loc.L("Shell.AppName"), Current.Title);
/// <summary>The rail shows icons alone (≡ or Ctrl+B); kept at once in the settings (owner review 1).</summary>
public bool IsRailCollapsed
{
get => _isRailCollapsed;
@@ -124,6 +127,8 @@ public sealed class ShellViewModel : LocalizedViewModel
{
if (!Set(ref _isRailCollapsed, value)) return;
_settings.RailCollapsed = value;
foreach (var section in AllSections) section.InCollapsedRail = value;
Services.SavePreferences();
OnPropertyChanged(nameof(RailToggleToolTip));
OnPropertyChanged(nameof(RailToggleName));
}
+17 -2
View File
@@ -54,7 +54,7 @@ h2 { font-size: 14px; font-weight: 600; }
/* Shell */
/* The sidebar column keeps the chrome colour below the sticky sidebar on long pages. */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; background: var(--chrome); }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: var(--chrome); }
.sidebar { display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; min-width: 0; }
.brand img { width: 22px; height: 22px; }
@@ -72,6 +72,21 @@ h2 { font-size: 14px; font-weight: 600; }
.sidebar .user { margin-top: auto; border-top: 1px solid var(--stroke); padding: 8px 10px 0; display: flex; align-items: center; gap: 10px; }
.user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user .who span { color: var(--text-muted); font-size: 11px; }
/* Owner review 1: the menu collapses to its icons (the button, or Ctrl+B); the names stay for screen readers. */
.sidebar-toggle { align-self: flex-start; margin-block-end: 6px; margin-inline-start: 2px; }
.nav a { position: relative; }
/* Exactly the widths the narrow layout below leaves (fractional widths at 125 % scaling included). */
@media not all and (max-width: 900px) {
.shell.collapsed { grid-template-columns: 56px minmax(0, 1fr); }
.shell.collapsed .sidebar { padding-inline: 8px; }
.shell.collapsed .sidebar-toggle { align-self: center; margin-inline-start: 0; }
.shell.collapsed .brand > div, .shell.collapsed .user .avatar, .shell.collapsed .user .who { display: none; }
.shell.collapsed .brand { padding-inline: 9px; }
.shell.collapsed .user { padding: 8px 0 0; justify-content: center; }
.shell.collapsed .nav a { justify-content: center; padding: 0; }
.shell.collapsed .nav a > span:not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell.collapsed .badge { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; padding: 0 4px; font-size: 10px; }
}
.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); border-inline-start: 1px solid var(--stroke); }
.header { position: sticky; top: 0; z-index: 5; min-height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid var(--stroke); background: var(--chrome); }
@@ -275,7 +290,7 @@ dialog.dialog p { margin: 0; color: var(--text-muted); }
.shell { grid-template-columns: minmax(0, 1fr); }
.sidebar { flex-direction: row; overflow-x: auto; padding: 8px; position: static; height: auto; border-bottom: 1px solid var(--stroke); }
.main { border-inline-start: 0; }
.sidebar .brand, .sidebar .user { display: none; }
.sidebar .brand, .sidebar .user, .sidebar-toggle { display: none; }
.nav { display: flex; gap: 4px; }
.nav a > span:not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header { position: static; flex-wrap: wrap; padding-block: 10px; }
+61 -1
View File
@@ -2,15 +2,20 @@
import { api, ApiFailure } from "./api.js";
import { t, plural, loadStrings, applyStrings, setLanguage, languages, culture } from "./i18n.js";
import { icons } from "./icons.js";
import { escapeHtml, attr, errorText, nativeName, formatNumber } from "./ui.js";
import { escapeHtml, attr, errorText, nativeName, formatNumber, fitColumns } from "./ui.js";
const app = document.getElementById("app");
const pages = ["dashboard", "users", "archive", "jobs", "settings", "logs", "about"];
const THEME_KEY = "titano.admin.theme";
const SIDEBAR_KEY = "titano.admin.sidebar";
/** The narrow layout of admin.css, where the menu is the top bar and does not collapse. */
const NARROW = window.matchMedia("(max-width: 900px)");
let info = null;
let events = null;
const listeners = new Set();
/** The sidebar choice made on this page, kept here too: a browser that refuses storage still keeps it across pages. */
let sidebarChoice = null;
applyTheme(storedTheme());
@@ -19,6 +24,16 @@ async function start() {
info = await api.get("/api/v1/server/info").catch(() => null);
await api.resume();
window.addEventListener("hashchange", () => render("title"));
// The menu's names or its icons alone, as on the desktop (owner review 1). A layout whose B key types another letter
// (Cyrillic, Greek, Hebrew, Arabic) is matched on the physical key, so the tooltips' Ctrl+B holds in every language. In the
// narrow layout the menu is the top bar with no toggle: the browser keeps its own Ctrl+B there.
document.addEventListener("keydown", (e) => {
if (!(e.ctrlKey || e.metaKey) || e.shiftKey || e.altKey || e.repeat || !app.querySelector(".shell") || NARROW.matches) return;
const key = e.key.toLowerCase();
if (key !== "b" && !(e.code === "KeyB" && !/^[a-z]$/.test(key))) return;
e.preventDefault();
toggleSidebar();
});
window.addEventListener("titano:signed-out", () => {
events?.stop();
events = null;
@@ -129,6 +144,7 @@ function renderShell(page, focus) {
app.innerHTML = `
<div class="shell">
<aside class="sidebar">
<button class="btn icon sidebar-toggle" id="sidebar-toggle">${icons.menu}</button>
${brand()}
<nav class="nav">${nav}</nav>
<div class="user">
@@ -150,6 +166,8 @@ function renderShell(page, focus) {
</div>
</div>`;
applyStrings(app);
applySidebar(sidebarCollapsed());
app.querySelector("#sidebar-toggle").addEventListener("click", toggleSidebar);
document.title = `${t(`Admin.Nav.${cap(page)}`)} · Titano Server`;
app.querySelector("#signout").addEventListener("click", async () => {
events?.stop();
@@ -202,6 +220,48 @@ function renderShell(page, focus) {
});
}
/** The menu shows icons alone: their tooltips then name the page, and the choice is kept in this browser. */
function applySidebar(collapsed) {
const shell = app.querySelector(".shell");
if (!shell) return;
shell.classList.toggle("collapsed", collapsed);
const toggle = shell.querySelector("#sidebar-toggle");
const tip = t(collapsed ? "Admin.Nav.Expand.Tip" : "Admin.Nav.Collapse.Tip");
toggle.title = tip;
toggle.setAttribute("aria-label", tip);
toggle.setAttribute("aria-expanded", String(!collapsed));
shell.querySelectorAll(".nav a").forEach((a) => {
const page = a.getAttribute("href").replace("#/", "");
const tip = t(`Admin.Nav.${cap(page)}.Tip`);
a.title = collapsed ? t("Admin.Nav.Collapsed", t(`Admin.Nav.${cap(page)}`), tip) : tip;
// Screen readers already have the name (the hidden label): their description stays the tip alone.
if (collapsed) a.setAttribute("aria-description", tip);
else a.removeAttribute("aria-description");
});
}
function sidebarCollapsed() {
if (sidebarChoice !== null) return sidebarChoice;
try {
return localStorage.getItem(SIDEBAR_KEY) === "collapsed";
} catch {
return false;
}
}
function toggleSidebar() {
const collapsed = !app.querySelector(".shell")?.classList.contains("collapsed");
sidebarChoice = collapsed;
applySidebar(collapsed);
// The page's width changed by 200 px without a window resize: the tables fit their columns again.
document.querySelectorAll(".table[data-levels]").forEach(fitColumns);
try {
localStorage.setItem(SIDEBAR_KEY, collapsed ? "collapsed" : "expanded");
} catch {
// Only this page keeps the choice then (sidebarChoice).
}
}
const badgeCounts = new Map();
let badgeTimer = null;
let badgeAgain = false;
+1
View File
@@ -7,6 +7,7 @@ export const icons = {
settings: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M5.8 8 A2.2 2.2 0 1 0 10.2 8 A2.2 2.2 0 1 0 5.8 8 Z M8 1.5 V3.5 M8 12.5 V14.5 M1.5 8 H3.5 M12.5 8 H14.5 M3.4 3.4 L4.8 4.8 M11.2 11.2 L12.6 12.6 M3.4 12.6 L4.8 11.2 M11.2 4.8 L12.6 3.4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
logs: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3.5 1.5 H9.5 L12.5 4.5 V14.5 H3.5 Z M5.5 7 H10.5 M5.5 9.5 H10.5 M5.5 12 H8.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
about: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M1.5 8 A6.5 6.5 0 1 0 14.5 8 A6.5 6.5 0 1 0 1.5 8 Z M8 7 V11 M8 4.8 V5.2" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
menu: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M2.5 4 H13.5 M2.5 8 H13.5 M2.5 12 H13.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
power: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.8 V7.5 M11.54 4.59 A5.5 5.5 0 1 1 4.46 4.59" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
moon: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M9.5 1.8 A6.5 6.5 0 1 0 14.2 11.2 A5.5 5.5 0 0 1 9.5 1.8 Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
refresh: `<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M10.75 3.24 A5.5 5.5 0 1 1 4.46 3.79 M13.2 2.6 L13.2 5.3 L10.5 5.3" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
+10
View File
@@ -15,6 +15,16 @@ public sealed class NullToCollapsedConverter : IValueConverter
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => throw new NotSupportedException();
}
/// <summary>"" → null, anything else as is: a cell's tooltip repeats its text, and an empty cell has none (not an empty box).</summary>
public sealed class EmptyToNullConverter : IValueConverter
{
public static EmptyToNullConverter Instance { get; } = new();
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) => value is string { Length: 0 } ? null : value;
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => throw new NotSupportedException();
}
/// <summary>true → Collapsed (inverse of BooleanToVisibilityConverter).</summary>
public sealed class InverseBoolToVisibilityConverter : IValueConverter
{
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Windows.Controls;
namespace Titano.Ui.Controls;
/// <summary>Attached state of the navigation rail (DESIGN §3: 128 px, collapses to 48 px icons).</summary>
/// <summary>Attached state of the navigation rail (DESIGN §3: 200 px, collapses to 48 px icons).</summary>
public static class NavRail
{
public static readonly DependencyProperty IsCollapsedProperty = DependencyProperty.RegisterAttached(
+1 -1
View File
@@ -31,7 +31,7 @@
<sys:Double x:Key="Height.JobBar">40</sys:Double>
<sys:Double x:Key="Height.Toolbar">56</sys:Double>
<sys:Double x:Key="Height.StatusBar">30</sys:Double>
<sys:Double x:Key="Width.Rail">128</sys:Double>
<sys:Double x:Key="Width.Rail">200</sys:Double>
<sys:Double x:Key="Width.RailCollapsed">48</sys:Double>
<sys:Double x:Key="Width.SidePanel">320</sys:Double>
<GridLength x:Key="Grid.SettingsList">200</GridLength>