fix(app): Server, Jobs, Settings, About and Welcome after the accessibility and RTL review
- Keyboard: Tab follows the visual order (toolbars, section list, dialog buttons), reaches every Jobs row button, stays inside the Welcome dialog (which opens focused); the Settings section list shows a focus ring. - Screen readers: sync and job rows read as their sequence or job with the state as item status; row buttons name their row; filter chips are radio buttons; the connection state, errors, sync retries, update checks and self-test results are announced; Auto values are text, not dead buttons. - Right to left: paths, addresses, templates, fingerprints, the job log, sizes and the logo stay left to right; numbers stay right-aligned. - Layout: Jobs and sync headers line up with their rows (shared padding, shared actions column, constant scroll-bar gutter); toolbars wrap before anything is cut; Settings labels share a column as wide as the longest one; path rows give way instead of wrapping; conflict rows use the warning tint. - Behaviour: Settings reloads the archive folder and default server set elsewhere; forgetting a certificate in Settings asks first and disconnects the session on it; transfers count in the Local only and Remote chips; the Workers readout counts this PC's workers; badge, status strip and Running chip agree; the admin link shows for administrators only; Reset section is gone from Advanced; empty states carry one action; shorter labels; the encoders a render node offers and the presets each encoder serves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
28 files changed
+801
-319
No files matched your search
@@ -0,0 +1,53 @@
|
||||
using Titano.Core.Export;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Core.Video;
|
||||
|
||||
namespace Titano.App.Settings;
|
||||
|
||||
/// <summary>Who provides an encoder row.</summary>
|
||||
public enum EncoderSource
|
||||
{
|
||||
/// <summary>A Media Foundation MFT (hardware or Microsoft software).</summary>
|
||||
MediaFoundation,
|
||||
|
||||
/// <summary>Titano's managed MJPEG/AVI writer.</summary>
|
||||
BuiltInMjpeg,
|
||||
|
||||
/// <summary>Titano's managed GIF/APNG encoders.</summary>
|
||||
BuiltInAnimation,
|
||||
}
|
||||
|
||||
/// <summary>One row of Settings › Rendering › Encoders.</summary>
|
||||
public sealed record EncoderRow(string Codec, string Name, string? Vendor, EncoderSource Source, bool Hardware, bool TenBit, int MaxWidth, int MaxHeight, VideoCodec? VideoCodec)
|
||||
{
|
||||
public bool CanSelfTest => Source != EncoderSource.BuiltInAnimation;
|
||||
|
||||
/// <summary>"NVIDIA · NVIDIA HEVC Encoder MFT" unless the name already carries the vendor.</summary>
|
||||
public string DisplayName => Vendor is { } vendor && !Name.Contains(vendor, StringComparison.OrdinalIgnoreCase) ? vendor + " · " + Name : Name;
|
||||
}
|
||||
|
||||
/// <summary>What the encoders of this PC are for: the built-in presets each one serves and what a render node offers.</summary>
|
||||
public static class EncoderUse
|
||||
{
|
||||
/// <summary>Names of the built-in presets an encoder row can encode, in preset order.</summary>
|
||||
public static IReadOnlyList<string> Presets(EncoderRow row) =>
|
||||
[
|
||||
.. ExportPresets.BuiltIn
|
||||
.Where(p => row.Source == EncoderSource.BuiltInAnimation ? p.Codec is VideoCodec.Gif or VideoCodec.Apng : p.Codec == row.VideoCodec)
|
||||
.Select(p => Loc.L(p.NameKey)),
|
||||
];
|
||||
|
||||
/// <summary>"4K archive · 4K HEVC · …" for the Used for column, or "Custom only" when no preset uses the codec.</summary>
|
||||
public static string Text(EncoderRow row) => Presets(row) is { Count: > 0 } names ? string.Join(" · ", names) : Loc.L("Settings.Rendering.CustomOnly");
|
||||
|
||||
/// <summary>
|
||||
/// The Media Foundation encoders a render node on this PC offers the server: the software ones, and the hardware ones
|
||||
/// when its renders may use them (<paramref name="allowsHardware"/>, as the node client decides).
|
||||
/// </summary>
|
||||
public static IReadOnlyList<EncoderRow> Node(IEnumerable<EncoderRow> rows, bool allowsHardware) =>
|
||||
[.. rows.Where(r => r.Source == EncoderSource.MediaFoundation && (!r.Hardware || allowsHardware))];
|
||||
|
||||
/// <summary>"HEVC · H.264 · AV1": the codecs of <paramref name="encoders"/>, each once; null when there are none.</summary>
|
||||
public static string? Codecs(IEnumerable<EncoderRow> encoders) =>
|
||||
encoders.Select(e => e.Codec).Distinct(StringComparer.Ordinal).ToList() is { Count: > 0 } codecs ? string.Join(" · ", codecs) : null;
|
||||
}
|
||||
Reference in new issue
Block a user