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
@@ -84,6 +84,7 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
Shell.Navigate(SectionKey.Settings);
|
||||
});
|
||||
LoadMoreCommand = new RelayCommand(() => _ = LoadMoreAsync());
|
||||
ImportCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Import));
|
||||
}
|
||||
|
||||
public ShellViewModel Shell { get; }
|
||||
@@ -99,6 +100,9 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
public ICommand RenderingSettingsCommand { get; }
|
||||
public ICommand LoadMoreCommand { get; }
|
||||
|
||||
/// <summary>The empty state's one action: jobs start with an import.</summary>
|
||||
public ICommand ImportCommand { get; }
|
||||
|
||||
public JobFilter Filter
|
||||
{
|
||||
get => _filter;
|
||||
@@ -119,8 +123,11 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>"Workers 1 / 4".</summary>
|
||||
public string WorkersText => Loc.L("Jobs.Workers", _model.RunningCount, _queue?.Workers ?? 0);
|
||||
/// <summary>"Workers 1 / 4": jobs this PC's workers run out of its workers.</summary>
|
||||
public string WorkersText => Loc.L("Jobs.Workers", _queue is { } queue ? _model.RunningOn(queue.WorkerId) : 0, _queue?.Workers ?? 0);
|
||||
|
||||
/// <summary>The engine of this PC runs workers (it has none before it starts).</summary>
|
||||
public bool HasWorkers => _queue is { Workers: > 0 };
|
||||
|
||||
/// <summary>"History keeps 90 days".</summary>
|
||||
public string HistoryText => Loc.Plural("Jobs.History", (long)new JobEngineOptions().HistoryRetention.TotalDays);
|
||||
@@ -258,9 +265,12 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
Shell.SetJob(JobText.Bar(current), current.Fraction ?? 0, indeterminate: current.Fraction is null);
|
||||
else
|
||||
Shell.SetJob(null, 0);
|
||||
Shell.SetJobCount(_model.RunningCount + _model.QueuedCount, _model.QueuedCount);
|
||||
Badge = _model.RunningCount;
|
||||
// The rail badge, the status strip and the Running chip count the same jobs: running or paused (Jobs.html).
|
||||
var active = _model.CountOf(JobFilter.Running);
|
||||
Shell.SetJobCount(active, _model.QueuedCount);
|
||||
Badge = active;
|
||||
OnPropertyChanged(nameof(WorkersText));
|
||||
OnPropertyChanged(nameof(HasWorkers));
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
|
||||
@@ -318,41 +328,42 @@ internal sealed class JobActions(JobsViewModel owner)
|
||||
public IReadOnlyList<JobAction> For(JobEntry entry)
|
||||
{
|
||||
var job = entry.Job;
|
||||
var row = JobText.Name(job);
|
||||
return entry.State switch
|
||||
{
|
||||
JobState.Running =>
|
||||
[
|
||||
Make("Jobs.Action.Pause", "Tooltips.Jobs.Pause", q => q.PauseAsync(job.Id)),
|
||||
Make("Jobs.Action.Cancel", "Tooltips.Jobs.Cancel", q => q.CancelAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Pause", "Tooltips.Jobs.Pause", row, q => q.PauseAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Cancel", "Tooltips.Jobs.Cancel", row, q => q.CancelAsync(job.Id)),
|
||||
],
|
||||
JobState.Paused =>
|
||||
[
|
||||
Make("Jobs.Action.Resume", "Tooltips.Jobs.Resume", q => q.ResumeAsync(job.Id)),
|
||||
Make("Jobs.Action.Cancel", "Tooltips.Jobs.Cancel", q => q.CancelAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Resume", "Tooltips.Jobs.Resume", row, q => q.ResumeAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Cancel", "Tooltips.Jobs.Cancel", row, q => q.CancelAsync(job.Id)),
|
||||
],
|
||||
JobState.Queued when job.Priority < JobPriority.User =>
|
||||
[
|
||||
Make("Jobs.Action.MoveUp", "Tooltips.Jobs.MoveUp", q => q.RaisePriorityAsync(job.Id)),
|
||||
Make("Jobs.Action.Remove", "Tooltips.Jobs.Remove", q => q.CancelAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.MoveUp", "Tooltips.Jobs.MoveUp", row, q => q.RaisePriorityAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Remove", "Tooltips.Jobs.Remove", row, q => q.CancelAsync(job.Id)),
|
||||
],
|
||||
JobState.Queued =>
|
||||
[
|
||||
Make("Jobs.Action.Pause", "Tooltips.Jobs.PauseQueued", q => q.PauseAsync(job.Id)),
|
||||
Make("Jobs.Action.Remove", "Tooltips.Jobs.Remove", q => q.CancelAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Pause", "Tooltips.Jobs.PauseQueued", row, q => q.PauseAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Remove", "Tooltips.Jobs.Remove", row, q => q.CancelAsync(job.Id)),
|
||||
],
|
||||
JobState.Failed =>
|
||||
[
|
||||
Make("Jobs.Action.Retry", "Tooltips.Jobs.Retry", q => q.ResumeAsync(job.Id)),
|
||||
new JobAction(Loc.L("Jobs.Action.Show"), Loc.L("Tooltips.Jobs.Show"), new AsyncRelayCommand(() => owner.OpenTargetAsync(job))),
|
||||
OnQueue("Jobs.Action.Retry", "Tooltips.Jobs.Retry", row, q => q.ResumeAsync(job.Id)),
|
||||
Action("Jobs.Action.Show", "Tooltips.Jobs.Show", row, () => owner.OpenTargetAsync(job)),
|
||||
],
|
||||
JobState.Cancelled =>
|
||||
[
|
||||
Make("Jobs.Action.Retry", "Tooltips.Jobs.Retry", q => q.ResumeAsync(job.Id)),
|
||||
OnQueue("Jobs.Action.Retry", "Tooltips.Jobs.Retry", row, q => q.ResumeAsync(job.Id)),
|
||||
],
|
||||
_ =>
|
||||
[
|
||||
new JobAction(Loc.L("Jobs.Action.Open"), Loc.L("Tooltips.Jobs.Open"), new AsyncRelayCommand(() => owner.OpenTargetAsync(job))),
|
||||
new JobAction(Loc.L("Jobs.Action.Folder"), Loc.L("Tooltips.Jobs.Folder"), new AsyncRelayCommand(() => owner.RevealTargetAsync(job))),
|
||||
Action("Jobs.Action.Open", "Tooltips.Jobs.Open", row, () => owner.OpenTargetAsync(job)),
|
||||
Action("Jobs.Action.Folder", "Tooltips.Jobs.Folder", row, () => owner.RevealTargetAsync(job)),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -371,9 +382,16 @@ internal sealed class JobActions(JobsViewModel owner)
|
||||
}
|
||||
}
|
||||
|
||||
private JobAction Make(string textKey, string toolTipKey, Func<IJobQueue, Task> run) =>
|
||||
new(Loc.L(textKey), Loc.L(toolTipKey), new AsyncRelayCommand(async () =>
|
||||
/// <summary>A row button named with its row for screen readers ("Pause: Render · Harbour sunset").</summary>
|
||||
private static JobAction Action(string textKey, string toolTipKey, string row, Func<Task> run)
|
||||
{
|
||||
var text = Loc.L(textKey);
|
||||
return new JobAction(text, Loc.L(toolTipKey), Loc.L("Jobs.ActionFor", text, row), new AsyncRelayCommand(run));
|
||||
}
|
||||
|
||||
private JobAction OnQueue(string textKey, string toolTipKey, string row, Func<IJobQueue, Task> run) =>
|
||||
Action(textKey, toolTipKey, row, async () =>
|
||||
{
|
||||
if (owner.Queue is { } queue) await run(queue);
|
||||
}));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user