diff --git a/i18n/en/Jobs.resx b/i18n/en/Jobs.resx
index 723aaee7..b8ab8847 100644
--- a/i18n/en/Jobs.resx
+++ b/i18n/en/Jobs.resx
@@ -13,6 +13,7 @@
ResumeRetryShow
+ {0}: {1}{0} leftClear doneKind
@@ -50,8 +51,11 @@
after {0}nextNo log lines yet
+ Hide log
+ Show logPause allRendering settings
+ {0} · {1}Search target or kind{0} fps{0}/s
diff --git a/i18n/en/Server.resx b/i18n/en/Server.resx
index 3d9acadf..341cfbb2 100644
--- a/i18n/en/Server.resx
+++ b/i18n/en/Server.resx
@@ -95,7 +95,7 @@
Pause metered uploads{0} of {1}{0} used
- Offer this PC as render node
+ Act as render nodeAdminEditorUploader
@@ -157,8 +157,10 @@
Sync settingsTake serverUpload
+ {0}: {1}Server archive {1} · {0} sequencelong; {0} sequence count, {1} archive sizeServer archive {1} · {0} sequenceslong; {0} sequence count, {1} archive size
+ Show allThis PCSequenceServer
diff --git a/i18n/en/Settings.resx b/i18n/en/Settings.resx
index 1604e694..e3e90a41 100644
--- a/i18n/en/Settings.resx
+++ b/i18n/en/Settings.resx
@@ -54,13 +54,15 @@
StorageUpdatesAuto · {0}
- Low priority while editing
+ Background priorityCodecEncoderMaxSelf-test10-bit
+ Used forof {0} logical cores
+ Custom only{0} (built in){0} (hardware){0} (software)
@@ -76,12 +78,13 @@
Parallelism{0} fps · okPrefer hardware
- Hardware for previews only
+ Hardware for previewsQuality profileBalancedBestFastRe-detect
+ {0} {1}: {2}Run self-testSoftware only10-bit
@@ -90,7 +93,9 @@
Search settingsTrusted certificatesDefault server
+ Forget: {0}None
+ Offer this PCRender nodeClearSpilled frames and decoded thumbnails are deleted and rebuilt when needed. Originals, proxies and renders are not touched.long
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 2601110d..11c0ea73 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -274,6 +274,7 @@
Show the folder in ExplorerHide the logFinished jobs older than this are removed when Titano starts
+ Bring photos in from a card or a folder; imports, analyses and renders then show up hereRaise the priority: it runs before jobs of lower priorityOpen what this job worked onPause at the next checkpoint; Resume continues from there
@@ -355,6 +356,7 @@
Close without changing either copyThe settings that differ: this PC's value, then the server'sIdentify the server, confirm a new certificate, then sign in · Enter
+ Type the address of the Titano Server firstClose the session and work with the local archive only; you stay signed inDo not connect; nothing is sent to this serverSHA-256 fingerprint of the server certificate
@@ -365,6 +367,8 @@
Close without signing in · EscSent only to this server; Titano keeps a session token, never the passwordYour user name on the server
+ Video encoders the server can use on this PC: {0}
+ No server found on this network yet; type its addressPause uploads while Windows reports this connection as metered; they resume by themselves when it is notlongSpace you use on the server out of your quotaLet the server send render jobs to this PC when it is idle; uses your GPU encoders
@@ -376,6 +380,7 @@
Sign out; the token is removed from this PCConnection to the serverSize and sequences of the server archive
+ Clear the search and the filter to list every sequence againFetch the originals to this PC, verified by hash ({0}){0} sizeAll sequences on this PC and on the serverSettings differ between this PC and the server
@@ -383,6 +388,7 @@
Only on the serverCopy the server's render to this PC ({1}){0} count, {1} sizeCopy the {0} server renders to this PC ({1}){0} count, {1} size
+ Bring photos in from a card or a folder, then upload them from hereOverwrite the server copy with this PC's settingsWhen this PC last compared every sequence with the server, and how long it tookOpen the web admin in your browser (admins only)
diff --git a/i18n/it/Jobs.it.resx b/i18n/it/Jobs.it.resx
index 58ed4e7c..ec6f193b 100644
--- a/i18n/it/Jobs.it.resx
+++ b/i18n/it/Jobs.it.resx
@@ -13,6 +13,7 @@
RiprendiRiprovaMostra
+ {0}: {1}{0} rimanentiRimuovi concluseTipo
@@ -50,8 +51,11 @@
dopo {0}prossimaAncora nessuna riga di log
+ Nascondi log
+ Mostra logSospendi tutteImpostazioni di rendering
+ {0} · {1}Cerca oggetto o tipo{0} fps{0}/s
diff --git a/i18n/it/Server.it.resx b/i18n/it/Server.it.resx
index ab68efee..148043a7 100644
--- a/i18n/it/Server.it.resx
+++ b/i18n/it/Server.it.resx
@@ -93,7 +93,7 @@
Pausa su reti a consumo{0} di {1}{0} usati
- Offri questo PC per il rendering
+ Usa come nodo di renderingAmministratoreEditorCaricatore
@@ -155,8 +155,10 @@
SincronizzaUsa il serverCarica
+ {0}: {1}Archivio del server {1} · {0} sequenzaArchivio del server {1} · {0} sequenze
+ Mostra tutteQuesto PCSequenzaServer
diff --git a/i18n/it/Settings.it.resx b/i18n/it/Settings.it.resx
index 198c180c..a79933c8 100644
--- a/i18n/it/Settings.it.resx
+++ b/i18n/it/Settings.it.resx
@@ -54,13 +54,15 @@
Spazio su discoAggiornamentiAuto · {0}
- Priorità bassa in modifica
+ Priorità bassaCodecEncoderMassimoAutotest10 bit
+ Usato perdi {0} core logici
+ Solo Personalizzato{0} (integrato){0} (hardware){0} (software)
@@ -76,12 +78,13 @@
Parallelismo{0} fps · okPreferisci hardware
- Hardware solo per anteprime
+ Hardware per anteprimeProfilo di qualitàBilanciatoMassima qualitàVeloceRileva di nuovo
+ {0} {1}: {2}Esegui autotestSolo software10 bit
@@ -90,7 +93,9 @@
Cerca impostazioniCertificati attendibiliServer predefinito
+ Dimentica: {0}Nessuno
+ Offri questo PCNodo di renderingSvuotaI fotogrammi temporanei e le miniature vengono eliminati e ricreati quando servono. Originali, proxy ed esportazioni restano intatti.
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index 2d899232..94527f4f 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -274,6 +274,7 @@
Mostra la cartella in Esplora fileNasconde il logLe attività concluse più vecchie vengono rimosse all'avvio di Titano
+ Porta dentro le foto da una scheda o da una cartella; importazioni, analisi e rendering compaiono poi quiAlza la priorità: verrà eseguita prima delle attività a priorità più bassaApre l'oggetto di questa attivitàMette in pausa al prossimo punto di ripresa; Riprendi continua da lì
@@ -355,6 +356,7 @@
Chiudi senza modificare nessuna delle due copieLe impostazioni diverse: il valore di questo PC, poi quello del serverIdentifica il server, conferma un certificato nuovo e poi accedi · Invio
+ Scrivi prima l'indirizzo del Titano ServerChiude la sessione e lavora solo con l'archivio locale; l'accesso resta salvatoNon connetterti; a questo server non viene inviato nullaImpronta SHA-256 del certificato del server
@@ -365,6 +367,8 @@
Chiude senza accedere · EscInviata solo a questo server; Titano conserva un token di sessione, mai la passwordIl tuo nome utente sul server
+ Encoder video che il server può usare su questo PC: {0}
+ Nessun server trovato ancora in questa rete; scrivi il suo indirizzoMette in pausa i caricamenti mentre Windows segnala questa connessione come a consumo; riprendono da soli quando non lo èSpazio che usi sul server rispetto alla tua quotaPermette al server di inviare rendering a questo PC quando è inattivo; usa gli encoder della tua GPU
@@ -376,6 +380,7 @@
Esci; il token viene rimosso da questo PCConnessione al serverDimensione e sequenze dell'archivio del server
+ Cancella la ricerca e il filtro per rivedere tutte le sequenzeScarica gli originali su questo PC, verificati con l'hash ({0})Tutte le sequenze di questo PC e del serverLe impostazioni differiscono tra questo PC e il server
@@ -383,6 +388,7 @@
Solo sul serverCopia su questo PC il render del server ({1})Copia su questo PC i {0} render del server ({1})
+ Porta dentro le foto da una scheda o da una cartella, poi caricale da quiSovrascrivi la copia del server con le impostazioni di questo PCQuando questo PC ha confrontato per l'ultima volta tutte le sequenze con il server, e quanto ha impiegatoApri l'amministrazione web nel browser (solo amministratori)
diff --git a/src/Titano.App/Jobs/JobListModel.cs b/src/Titano.App/Jobs/JobListModel.cs
index cd72b0c8..4621ace1 100644
--- a/src/Titano.App/Jobs/JobListModel.cs
+++ b/src/Titano.App/Jobs/JobListModel.cs
@@ -132,6 +132,9 @@ public sealed class JobListModel
public int RunningCount => _entries.Values.Count(e => e.State == JobState.Running);
+ /// Running jobs claimed by this machine's workers (), not by render nodes or other PCs.
+ public int RunningOn(string localWorkerId) => _entries.Values.Count(e => e.State == JobState.Running && JobText.IsLocal(e.Job.NodeId, localWorkerId));
+
public int QueuedCount => _entries.Values.Count(e => e.State == JobState.Queued);
/// Same order as JobRepository.ClaimNextAsync: priority descending, then creation time and id.
diff --git a/src/Titano.App/Jobs/JobRowViewModel.cs b/src/Titano.App/Jobs/JobRowViewModel.cs
index 7aed3470..5f9a5e2e 100644
--- a/src/Titano.App/Jobs/JobRowViewModel.cs
+++ b/src/Titano.App/Jobs/JobRowViewModel.cs
@@ -8,8 +8,8 @@ using Titano.Ui.Mvvm;
namespace Titano.App.Jobs;
-/// A row action: label, tooltip and command (26-px row buttons, DESIGN §4 tables).
-public sealed record JobAction(string Text, string ToolTip, ICommand Command, bool IsDestructive = false);
+/// A row action: label, tooltip, the name screen readers hear (label and row) and command (26-px row buttons, DESIGN §4 tables).
+public sealed record JobAction(string Text, string ToolTip, string AccessibleName, ICommand Command);
/// One row of the Jobs table (Jobs.html): kind, target, progress, speed, left, where, state, actions, log.
public sealed class JobRowViewModel : ObservableObject
@@ -36,6 +36,9 @@ public sealed class JobRowViewModel : ObservableObject
public string Target => _entry.Job.TargetLabel ?? string.Empty;
+ /// "Render · Harbour sunset → 4K HEVC": the row's name for screen readers.
+ public string AccessibleName => JobText.Name(_entry.Job);
+
/// Progress 0…1 (0 while unknown).
public double Progress => _entry.State == JobState.Done ? 1 : _entry.Fraction ?? 0;
@@ -81,12 +84,16 @@ public sealed class JobRowViewModel : ObservableObject
{
if (!Set(ref _isExpanded, value)) return;
OnPropertyChanged(nameof(ToggleToolTip));
+ OnPropertyChanged(nameof(ToggleName));
if (value) _ = _actions.LoadLogAsync(this);
}
}
public string ToggleToolTip => Loc.L(_isExpanded ? "Tooltips.Jobs.HideLog" : "Tooltips.Jobs.ShowLog");
+ /// "Show log: Render · Harbour sunset": the expander names its row.
+ public string ToggleName => Loc.L("Jobs.ActionFor", Loc.L(_isExpanded ? "Jobs.Log.Hide" : "Jobs.Log.Show"), AccessibleName);
+
/// The last lines of the job log, plus the live message while it runs.
public string LogText
{
diff --git a/src/Titano.App/Jobs/JobText.cs b/src/Titano.App/Jobs/JobText.cs
index 4bec41c4..72da9fa3 100644
--- a/src/Titano.App/Jobs/JobText.cs
+++ b/src/Titano.App/Jobs/JobText.cs
@@ -48,9 +48,21 @@ public static class JobText
public static string Where(string? nodeId, string localWorkerId)
{
if (string.IsNullOrEmpty(nodeId)) return string.Empty;
+ return IsLocal(nodeId, localWorkerId) ? Loc.L("Jobs.Where.ThisPc") : NodeName(nodeId);
+ }
+
+ /// The job was claimed by one of this machine's numbered workers ("node#0", "node#1", …).
+ public static bool IsLocal(string? nodeId, string localWorkerId) =>
+ !string.IsNullOrEmpty(nodeId) && NodeName(nodeId).Equals(localWorkerId, StringComparison.OrdinalIgnoreCase);
+
+ /// "Kind: target" ("Render: Harbour sunset → 4K HEVC"), what a row is called for screen readers.
+ public static string Name(Job job) =>
+ string.IsNullOrWhiteSpace(job.TargetLabel) ? Kind(job.Kind) : Loc.L("Jobs.Row.Name", Kind(job.Kind), job.TargetLabel);
+
+ private static string NodeName(string nodeId)
+ {
var hash = nodeId.IndexOf('#', StringComparison.Ordinal);
- var name = hash < 0 ? nodeId : nodeId[..hash];
- return name.Equals(localWorkerId, StringComparison.OrdinalIgnoreCase) ? Loc.L("Jobs.Where.ThisPc") : name;
+ return hash < 0 ? nodeId : nodeId[..hash];
}
///
diff --git a/src/Titano.App/Sections/AboutView.xaml b/src/Titano.App/Sections/AboutView.xaml
index 805a251a..bf79c9a9 100644
--- a/src/Titano.App/Sections/AboutView.xaml
+++ b/src/Titano.App/Sections/AboutView.xaml
@@ -2,13 +2,15 @@
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:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
+ xmlns:infra="clr-namespace:Titano.App.Infrastructure">
-
+
+
@@ -35,14 +37,16 @@
-
+
-
+
+
@@ -53,7 +57,8 @@
+ Visibility="{Binding HasUpdateText, Converter={StaticResource BoolToVisibility}}"
+ AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding UpdateText}" />
diff --git a/src/Titano.App/Sections/JobsView.xaml b/src/Titano.App/Sections/JobsView.xaml
index 2e77d413..fde705da 100644
--- a/src/Titano.App/Sections/JobsView.xaml
+++ b/src/Titano.App/Sections/JobsView.xaml
@@ -6,7 +6,6 @@
xmlns:s="clr-namespace:Titano.App.Sections"
xmlns:j="clr-namespace:Titano.App.Jobs">
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -66,7 +106,7 @@
-
+
@@ -77,67 +117,73 @@
-
+
-
-
+
+
-
-
+
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.ScrollChanged="OnScrollChanged"
+ KeyboardNavigation.TabNavigation="Continue" AutomationProperties.Name="{l:Loc Shell.Nav.Jobs}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
@@ -162,6 +208,8 @@
-
+
+
+
diff --git a/src/Titano.App/Sections/JobsViewModel.cs b/src/Titano.App/Sections/JobsViewModel.cs
index 82432966..3a7ab09a 100644
--- a/src/Titano.App/Sections/JobsViewModel.cs
+++ b/src/Titano.App/Sections/JobsViewModel.cs
@@ -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; }
+ /// The empty state's one action: jobs start with an import.
+ public ICommand ImportCommand { get; }
+
public JobFilter Filter
{
get => _filter;
@@ -119,8 +123,11 @@ public sealed class JobsViewModel : SectionViewModel
}
}
- /// "Workers 1 / 4".
- public string WorkersText => Loc.L("Jobs.Workers", _model.RunningCount, _queue?.Workers ?? 0);
+ /// "Workers 1 / 4": jobs this PC's workers run out of its workers.
+ public string WorkersText => Loc.L("Jobs.Workers", _queue is { } queue ? _model.RunningOn(queue.WorkerId) : 0, _queue?.Workers ?? 0);
+
+ /// The engine of this PC runs workers (it has none before it starts).
+ public bool HasWorkers => _queue is { Workers: > 0 };
/// "History keeps 90 days".
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 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 run) =>
- new(Loc.L(textKey), Loc.L(toolTipKey), new AsyncRelayCommand(async () =>
+ /// A row button named with its row for screen readers ("Pause: Render · Harbour sunset").
+ private static JobAction Action(string textKey, string toolTipKey, string row, Func 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 run) =>
+ Action(textKey, toolTipKey, row, async () =>
{
if (owner.Queue is { } queue) await run(queue);
- }));
+ });
}
diff --git a/src/Titano.App/Sections/ServerView.xaml b/src/Titano.App/Sections/ServerView.xaml
index a6bdfcd5..5a9e71b7 100644
--- a/src/Titano.App/Sections/ServerView.xaml
+++ b/src/Titano.App/Sections/ServerView.xaml
@@ -3,6 +3,8 @@
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:infra="clr-namespace:Titano.App.Infrastructure"
+ xmlns:shell="clr-namespace:Titano.App.Shell"
xmlns:srv="clr-namespace:Titano.App.Server">
-
-
+
+
+
+
+
+
-
+
@@ -40,16 +62,23 @@
-
+
-
-
-
-
+
+
+
-
+
-
+
@@ -88,7 +117,8 @@
-
+
@@ -105,16 +135,21 @@
-
+
-
+
-
+
+
+
+
@@ -133,43 +168,46 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -186,11 +224,11 @@
-
-
@@ -208,16 +246,11 @@
-
-
-
-
-
-
+
+ AutomationProperties.Name="{Binding AccessibleName}" FontSize="12" Margin="0,2,6,2" />
@@ -225,15 +258,27 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Titano.App/Sections/ServerViewModel.cs b/src/Titano.App/Sections/ServerViewModel.cs
index b3f01f5b..8e7b3f54 100644
--- a/src/Titano.App/Sections/ServerViewModel.cs
+++ b/src/Titano.App/Sections/ServerViewModel.cs
@@ -2,7 +2,9 @@ using System.ComponentModel;
using System.Windows.Input;
using Titano.App.Infrastructure;
using Titano.App.Server;
+using Titano.App.Settings;
using Titano.App.Shell;
+using Titano.Core.Export;
using Titano.Core.Localization;
using Titano.Ui.Controls;
using Titano.Ui.Mvvm;
@@ -58,12 +60,20 @@ public sealed class ServerViewModel : SectionViewModel
public bool HasKnownServers => KnownServers.Any();
+ /// What ▾ lists, or why it is disabled.
+ public string KnownToolTip => Loc.L(HasKnownServers ? "Tooltips.Server.Found" : "Tooltips.Server.NoneFound");
+
+ /// What Connect does, or why it is disabled.
+ public string ConnectToolTip => Loc.L(Address.Trim().Length > 0 ? "Tooltips.Server.Connect" : "Tooltips.Server.ConnectNoAddress");
+
public string Address
{
get => _address;
set
{
- if (Set(ref _address, value ?? string.Empty)) CommandManager.InvalidateRequerySuggested();
+ if (!Set(ref _address, value ?? string.Empty)) return;
+ OnPropertyChanged(nameof(ConnectToolTip));
+ CommandManager.InvalidateRequerySuggested();
}
}
@@ -103,7 +113,7 @@ public sealed class ServerViewModel : SectionViewModel
/// "TLS 9A:3C:71:E0:… trusted 2026-09-01".
public string? CertificateText => Fingerprint is { } fp && Session.TrustOf(fp) is { } trust
- ? Loc.L("Server.Certificate.Trusted", ServerSession.ShortFingerprint(fp), Formatting.Date(trust.TrustedAt))
+ ? Loc.L("Server.Certificate.Trusted", Formatting.LeftToRight(ServerSession.ShortFingerprint(fp)), Formatting.Date(trust.TrustedAt))
: null;
public string CertificateToolTip => Loc.L("Tooltips.Server.CertificateTrusted");
@@ -138,6 +148,15 @@ public sealed class ServerViewModel : SectionViewModel
}
}
+ /// The video encoders a render node on this PC offers the server.
+ private IReadOnlyList NodeEncoders => EncoderUse.Node(Shell.Settings.Encoders.Select(e => e.Row),
+ AppServices.AllowsHardware(Shell.Services.Settings.HardwareEncoding, ExportResolver.CustomId));
+
+ /// "HEVC · H.264 · AV1" beside "Offer this PC as render node" (BRIEF §12.7); null before the encoders are known.
+ public string? NodeCodecsText => EncoderUse.Codecs(NodeEncoders);
+
+ public string NodeCodecsToolTip => Loc.L("Tooltips.Server.NodeEncoders", string.Join(", ", NodeEncoders.Select(e => e.DisplayName)));
+
/// Keep the proxy caches of server sequences opened with proxies up to date on this PC.
public bool KeepProxiesOffline
{
@@ -166,8 +185,13 @@ public sealed class ServerViewModel : SectionViewModel
}
}
- /// Re-reads values another screen changed (Settings › Server).
- public void Refresh() => OnPropertyChanged(nameof(RenderNodeOptIn));
+ /// Re-reads values another screen changed (Settings › Server and Rendering).
+ public void Refresh()
+ {
+ OnPropertyChanged(nameof(RenderNodeOptIn));
+ OnPropertyChanged(nameof(NodeCodecsText));
+ OnPropertyChanged(nameof(NodeCodecsToolTip));
+ }
/// Restores the saved session and starts listening for LAN servers.
public async Task AttachAsync()
@@ -181,6 +205,7 @@ public sealed class ServerViewModel : SectionViewModel
if (Address.Length == 0 && Session.Discovered.Count > 0) Address = Session.Discovered[0].Address;
};
if (!Shell.Services.Environment.IsCapture) _session.StartDiscovery();
+ Shell.Settings.Encoders.CollectionChanged += OnEncodersChanged;
Sync.Attach();
await _session.RestoreAsync();
if (_session.Flow.Error is not ConnectError.None and var error && !_session.IsConnected) ErrorText = ServerSession.ErrorText(error);
@@ -189,10 +214,17 @@ public sealed class ServerViewModel : SectionViewModel
public override void Dispose()
{
if (_session is not null) _session.PropertyChanged -= OnSessionChanged;
+ Shell.Settings.Encoders.CollectionChanged -= OnEncodersChanged;
Sync.Dispose();
base.Dispose();
}
+ /// The encoders next to the render-node option are listed on the first visit.
+ protected override void OnActivated()
+ {
+ if (Shell.Settings.Encoders.Count == 0 && !Shell.Settings.IsDetecting) _ = Shell.Settings.DetectEncodersAsync();
+ }
+
private void SetSyncOption(bool value, bool current, Action store, [System.Runtime.CompilerServices.CallerMemberName] string? name = null)
{
if (value == current) return;
@@ -222,22 +254,13 @@ public sealed class ServerViewModel : SectionViewModel
private void ShowCertificate()
{
- if (Fingerprint is not { } fingerprint) return;
- var forget = Shell.Services.Dialogs.Confirm(new ConfirmRequest
- {
- Heading = Loc.L("Server.Certificate.Title"),
- Message = Loc.L("Server.Certificate.Message"),
- Detail = ServerSession.FormatFingerprint(fingerprint),
- DetailToolTip = Loc.L("Tooltips.Server.Fingerprint"),
- SafeText = Loc.L("Server.Certificate.Keep"),
- SafeToolTip = Loc.L("Tooltips.Server.KeepTrust"),
- ActionText = Loc.L("Server.Certificate.Forget"),
- ActionToolTip = Loc.L("Tooltips.Server.ForgetTrust"),
- IsDestructive = true,
- });
- if (!forget) return;
- Session.Disconnect();
- Session.Forget(fingerprint);
+ if (Fingerprint is { } fingerprint) Session.ConfirmForget(fingerprint, Shell.Services.Dialogs);
+ }
+
+ private void OnEncodersChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ OnPropertyChanged(nameof(NodeCodecsText));
+ OnPropertyChanged(nameof(NodeCodecsToolTip));
}
private void OnSessionChanged(object? sender, PropertyChangedEventArgs e)
diff --git a/src/Titano.App/Sections/SettingsView.xaml b/src/Titano.App/Sections/SettingsView.xaml
index 52b4b36d..593d0e2c 100644
--- a/src/Titano.App/Sections/SettingsView.xaml
+++ b/src/Titano.App/Sections/SettingsView.xaml
@@ -3,11 +3,58 @@
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:infra="clr-namespace:Titano.App.Infrastructure"
xmlns:shell="clr-namespace:Titano.App.Shell"
xmlns:st="clr-namespace:Titano.App.Settings">
+
+
+
+
+
+
+
+
+
+
+
@@ -33,15 +87,16 @@
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
@@ -49,17 +104,22 @@
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -82,27 +142,35 @@
-
-
+
+
+
+
+
+
-
-
-
+
+
+ shell:EditBehavior.Field="{Binding FolderTemplate}" ToolTip="{Binding FolderTemplate.ToolTip}" AutomationProperties.Name="{l:Loc Settings.Archive.Folders}"
+ FlowDirection="LeftToRight" />
+ shell:EditBehavior.Field="{Binding FileTemplate}" ToolTip="{Binding FileTemplate.ToolTip}" AutomationProperties.Name="{l:Loc Settings.Archive.Files}"
+ FlowDirection="LeftToRight" />
-
+
@@ -126,8 +194,10 @@
ToolTip="{l:Loc Tooltips.Settings.Memory}" AutomationProperties.Name="{l:Loc Settings.Rendering.Memory}" />
-
+
+
+
@@ -135,11 +205,13 @@
-
-
+
+
+
@@ -155,31 +227,40 @@
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
@@ -188,18 +269,22 @@
-
-
-
-
-
+
+
+
+
+
+
+ VerticalAlignment="Center" Margin="10,0,0,0" Visibility="{Binding HasResult, Converter={StaticResource BoolToVisibility}}"
+ AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding ResultAnnouncement}" />
+
@@ -217,26 +302,33 @@
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
-
@@ -248,10 +340,10 @@
+ AutomationProperties.Name="{l:Loc Settings.Server.Default}" FlowDirection="LeftToRight" />
-
+
@@ -267,12 +359,12 @@
-
+
+ ToolTip="{Binding FullFingerprint}" Margin="10,0,0,0" FlowDirection="LeftToRight" HorizontalAlignment="Left" />
+ ToolTip="{l:Loc Tooltips.Server.ForgetTrust}" AutomationProperties.Name="{Binding ForgetName}" Margin="10,0,0,0" />
@@ -290,7 +382,8 @@
+ Visibility="{Binding Shell.About.HasUpdateText, Converter={StaticResource BoolToVisibility}}"
+ AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding Shell.About.UpdateText}" />
@@ -309,19 +402,28 @@
+
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
diff --git a/src/Titano.App/Sections/SettingsViewModel.cs b/src/Titano.App/Sections/SettingsViewModel.cs
index 4933f3ef..47b7b01f 100644
--- a/src/Titano.App/Sections/SettingsViewModel.cs
+++ b/src/Titano.App/Sections/SettingsViewModel.cs
@@ -144,7 +144,7 @@ public sealed class SettingsViewModel : SectionViewModel
OpenLogsCommand = new RelayCommand(() => ShellActions.Reveal(LogsFolder));
ExportDiagnosticsCommand = new AsyncRelayCommand(ExportDiagnosticsAsync);
BackupDatabaseCommand = new AsyncRelayCommand(BackupDatabaseAsync, () => Shell.Services.Database is not null);
- ResetSectionCommand = new RelayCommand(ResetSection);
+ ResetSectionCommand = new RelayCommand(ResetSection, () => CanResetSection);
ExportSettingsCommand = new AsyncRelayCommand(ExportSettingsAsync);
ImportSettingsCommand = new AsyncRelayCommand(ImportSettingsAsync);
Loc.CultureChanged += OnCultureChanged;
@@ -168,6 +168,7 @@ public sealed class SettingsViewModel : SectionViewModel
if (!Set(ref _page, value)) return;
OnPropertyChanged(nameof(SelectedPageItem));
OnPropertyChanged(nameof(PageTitle));
+ OnPropertyChanged(nameof(CanResetSection));
if (value == SettingsPage.Rendering && Encoders.Count == 0 && !_isDetecting) _ = DetectEncodersAsync();
if (value == SettingsPage.Storage) _ = UpdateCacheUsageAsync();
}
@@ -480,10 +481,13 @@ public sealed class SettingsViewModel : SectionViewModel
// ---------------- Footer ----------------
public ICommand ResetSectionCommand { get; }
+
+ /// Advanced holds no setting with a default (paths and actions only): it has no Reset section.
+ public bool CanResetSection => _page != SettingsPage.Advanced;
public ICommand ExportSettingsCommand { get; }
public ICommand ImportSettingsCommand { get; }
- /// Loads what needs the services (certificates, cache usage).
+ /// Loads what needs the services (certificates, cache usage) and follows the server session.
public void Attach()
{
try
@@ -495,16 +499,20 @@ public sealed class SettingsViewModel : SectionViewModel
Log.Warning("settings", "Cache folder not prepared", ex);
}
LoadCertificates();
- Shell.Services.Server.PropertyChanged += (_, _) => LoadCertificates();
+ Shell.Services.Server.PropertyChanged += OnServerChanged;
}
public override void Dispose()
{
Loc.CultureChanged -= OnCultureChanged;
+ Shell.Services.Server.PropertyChanged -= OnServerChanged;
_selfTest?.Cancel();
base.Dispose();
}
+ /// Other screens change the archive and the server in use: Settings shows them when it opens.
+ protected override void OnActivated() => ReloadShared();
+
// ---------------- Implementation ----------------
private void Save() => Shell.Services.SaveSettings();
@@ -527,6 +535,24 @@ public sealed class SettingsViewModel : SectionViewModel
OnPropertyChanged(nameof(IsPreferHardware));
OnPropertyChanged(nameof(IsSoftwareOnly));
OnPropertyChanged(nameof(IsHardwareForPreviews));
+ Shell.Server.Refresh();
+ }
+
+ ///
+ /// Takes the archive and server values other screens set (opening an archive, connecting), unless the field holds an
+ /// edit not committed yet.
+ ///
+ private void ReloadShared()
+ {
+ if (!ArchiveRoot.IsDirty) ArchiveRoot.Load(_s.LastArchivePath ?? string.Empty);
+ if (!DefaultServer.IsDirty) DefaultServer.Load(ServerAddress.Display(_s.ServerUrl));
+ UpdateArchiveFree();
+ }
+
+ private void OnServerChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ LoadCertificates();
+ if (!DefaultServer.IsDirty) DefaultServer.Load(ServerAddress.Display(_s.ServerUrl));
}
private void UpdatePreview() => PreviewNames = NamingPreview.FirstNames(FolderTemplate.Text, FileTemplate.Text);
@@ -623,7 +649,7 @@ public sealed class SettingsViewModel : SectionViewModel
{
Heading = Loc.L("Settings.Storage.ClearTitle"),
Message = Loc.L("Settings.Storage.ClearMessage"),
- Detail = folder,
+ Detail = Formatting.LeftToRight(folder),
DetailToolTip = Loc.L("Tooltips.Settings.CacheFolder"),
SafeText = Loc.L("Settings.Storage.Keep"),
SafeToolTip = Loc.L("Tooltips.Settings.KeepCache"),
@@ -715,11 +741,10 @@ public sealed class SettingsViewModel : SectionViewModel
case SettingsPage.Updates:
_s.CheckForUpdates = defaults.CheckForUpdates;
break;
- case SettingsPage.Advanced:
- break;
}
Save();
OnAllPropertiesChanged();
+ Shell.Server.Refresh();
}
private async Task ExportSettingsAsync()
@@ -783,10 +808,10 @@ public sealed class SettingsViewModel : SectionViewModel
Certificates.Clear();
foreach (var certificate in _s.TrustedCertificates.OrderByDescending(c => c.TrustedAt))
{
+ // The same question as on the Server screen; the session on that certificate is closed first.
Certificates.Add(new TrustedCertificateRow(certificate, new RelayCommand(() =>
{
- Shell.Services.Server.Forget(certificate.Fingerprint);
- LoadCertificates();
+ if (Shell.Services.Server.ConfirmForget(certificate.Fingerprint, Shell.Services.Dialogs)) LoadCertificates();
})));
}
OnPropertyChanged(nameof(HasCertificates));
diff --git a/src/Titano.App/Sections/WelcomeView.xaml b/src/Titano.App/Sections/WelcomeView.xaml
index d90ccc78..281180ee 100644
--- a/src/Titano.App/Sections/WelcomeView.xaml
+++ b/src/Titano.App/Sections/WelcomeView.xaml
@@ -47,13 +47,15 @@
+
+ CornerRadius="{StaticResource Radius.Dialog}" Padding="32,28" Effect="{StaticResource Shadow.Popup}"
+ KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
-
+
@@ -62,7 +64,7 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
diff --git a/src/Titano.App/Sections/WelcomeView.xaml.cs b/src/Titano.App/Sections/WelcomeView.xaml.cs
index e6236f21..86179c47 100644
--- a/src/Titano.App/Sections/WelcomeView.xaml.cs
+++ b/src/Titano.App/Sections/WelcomeView.xaml.cs
@@ -1,8 +1,25 @@
+using System.Windows;
using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Threading;
namespace Titano.App.Sections;
public partial class WelcomeView : UserControl
{
- public WelcomeView() => InitializeComponent();
+ public WelcomeView()
+ {
+ InitializeComponent();
+ IsVisibleChanged += (_, e) =>
+ {
+ if (e.NewValue is true) Dispatcher.InvokeAsync(FocusChoice, DispatcherPriority.Input);
+ };
+ }
+
+ /// The dialog opens with keyboard focus on the chosen card, so the keyboard starts inside it.
+ private void FocusChoice()
+ {
+ var chosen = new[] { LocalChoice, AdoptChoice, ServerChoice }.FirstOrDefault(c => c.IsChecked == true) ?? LocalChoice;
+ Keyboard.Focus(chosen);
+ }
}
diff --git a/src/Titano.App/Sections/WelcomeViewModel.cs b/src/Titano.App/Sections/WelcomeViewModel.cs
index c5fcf375..3276e6e0 100644
--- a/src/Titano.App/Sections/WelcomeViewModel.cs
+++ b/src/Titano.App/Sections/WelcomeViewModel.cs
@@ -100,13 +100,13 @@ public sealed class WelcomeViewModel : LocalizedViewModel
}
}
- /// "D:\TitanoArchive · 1.8 TB free".
+ /// "D:\TitanoArchive · 1.8 TB free" (the path left to right in every language).
public string LocalDetail => ArchiveLocations.FreeSpace(_localRoot) is { } free
- ? Loc.L("Shell.Welcome.Local.Detail", _localRoot, Formatting.Bytes(free))
- : _localRoot;
+ ? Loc.L("Shell.Welcome.Local.Detail", Formatting.LeftToRight(_localRoot), Formatting.Bytes(free))
+ : Formatting.LeftToRight(_localRoot);
/// The chosen folder to adopt; null until picked.
- public string? AdoptDetail => _adoptFolder;
+ public string? AdoptDetail => _adoptFolder is { } folder ? Formatting.LeftToRight(folder) : null;
public bool HasAdoptDetail => _adoptFolder is not null;
@@ -117,7 +117,7 @@ public sealed class WelcomeViewModel : LocalizedViewModel
/// "Studio NAS on this network · https://nas.local:8443".
public string? ServerDetail => FoundServer is { } s
- ? s.Name == s.Address ? s.Address : Loc.L("Shell.Welcome.Server.Found", s.Name, s.Address)
+ ? s.Name == s.Address ? Formatting.LeftToRight(s.Address) : Loc.L("Shell.Welcome.Server.Found", s.Name, Formatting.LeftToRight(s.Address))
: null;
public bool HasServerDetail => ServerDetail is not null;
diff --git a/src/Titano.App/Server/ServerSession.cs b/src/Titano.App/Server/ServerSession.cs
index d8cdd412..9f944024 100644
--- a/src/Titano.App/Server/ServerSession.cs
+++ b/src/Titano.App/Server/ServerSession.cs
@@ -77,6 +77,18 @@ public sealed class ServerSession : ObservableObject, ITrustStore, IDisposable
OnAllPropertiesChanged();
}
+ ///
+ /// Forgets a trusted certificate once the user confirmed it (Server screen and Settings › Server alike); the session
+ /// that relies on it is closed first. True when it was forgotten.
+ ///
+ public bool ConfirmForget(string fingerprint, IAppDialogs dialogs)
+ {
+ if (!dialogs.Confirm(ForgetRequest(fingerprint))) return false;
+ if (IsConnected && string.Equals(TrustOf(_flow.Info?.TlsFingerprint)?.Fingerprint, fingerprint, StringComparison.OrdinalIgnoreCase)) Disconnect();
+ Forget(fingerprint);
+ return true;
+ }
+
// ---------------- Session ----------------
/// Resumes the saved session at start; stays signed out quietly when it cannot be reused.
@@ -196,11 +208,27 @@ public sealed class ServerSession : ObservableObject, ITrustStore, IDisposable
ActionToolTip = Loc.L("Tooltips.Server.Trust"),
};
- /// Splits the 32-byte SHA-256 fingerprint into two lines of 16 bytes.
+ /// The destructive question before a trusted certificate is forgotten, with its fingerprint.
+ public static ConfirmRequest ForgetRequest(string fingerprint) => new()
+ {
+ Heading = Loc.L("Server.Certificate.Title"),
+ Message = Loc.L("Server.Certificate.Message"),
+ Detail = FormatFingerprint(fingerprint),
+ DetailToolTip = Loc.L("Tooltips.Server.Fingerprint"),
+ SafeText = Loc.L("Server.Certificate.Keep"),
+ SafeToolTip = Loc.L("Tooltips.Server.KeepTrust"),
+ ActionText = Loc.L("Server.Certificate.Forget"),
+ ActionToolTip = Loc.L("Tooltips.Server.ForgetTrust"),
+ IsDestructive = true,
+ };
+
+ /// Splits the 32-byte SHA-256 fingerprint into two lines of 16 bytes, each kept left to right.
public static string FormatFingerprint(string fingerprint)
{
var bytes = fingerprint.Split(':');
- return bytes.Length <= 16 ? fingerprint : string.Join(':', bytes.Take(16)) + "\n" + string.Join(':', bytes.Skip(16));
+ return bytes.Length <= 16
+ ? Formatting.LeftToRight(fingerprint)
+ : Formatting.LeftToRight(string.Join(':', bytes.Take(16))) + "\n" + Formatting.LeftToRight(string.Join(':', bytes.Skip(16)));
}
/// "9A:3C:71:E0:…" for the status line.
diff --git a/src/Titano.App/Server/SyncRow.cs b/src/Titano.App/Server/SyncRow.cs
index a5647aa7..13693165 100644
--- a/src/Titano.App/Server/SyncRow.cs
+++ b/src/Titano.App/Server/SyncRow.cs
@@ -11,6 +11,7 @@ namespace Titano.App.Server;
public sealed class SyncRowAction(SyncAction action, ICommand command) : ObservableObject
{
private string _toolTip = string.Empty;
+ private string _sequence = string.Empty;
public SyncAction Action { get; } = action;
public string Text => Loc.L("Server.Sync.Action." + Action);
@@ -22,8 +23,25 @@ public sealed class SyncRowAction(SyncAction action, ICommand command) : Observa
set => Set(ref _toolTip, value);
}
+ /// The title of the row's sequence.
+ public string Sequence
+ {
+ get => _sequence;
+ set
+ {
+ if (Set(ref _sequence, value)) OnPropertyChanged(nameof(AccessibleName));
+ }
+ }
+
+ /// "Upload: Clouds over the Langhe": screen readers name the sequence each of the many identical buttons acts on.
+ public string AccessibleName => Loc.L("Server.Sync.ActionFor", Text, _sequence);
+
/// The label in the current language.
- public void Relabel() => OnPropertyChanged(nameof(Text));
+ public void Relabel()
+ {
+ OnPropertyChanged(nameof(Text));
+ OnPropertyChanged(nameof(AccessibleName));
+ }
}
/// One row of the sync table (Server.html): sequence, this PC, server, state and the actions that apply.
@@ -93,7 +111,11 @@ public sealed class SyncRow : ObservableObject
var kept = _actions.ToDictionary(a => a.Action);
Actions = [.. wanted.Select(action => kept.GetValueOrDefault(action) ?? new SyncRowAction(action, new AsyncRelayCommand(() => _act(this, action))))];
}
- foreach (var action in _actions) action.ToolTip = SyncText.ToolTip(_entry, action.Action);
+ foreach (var action in _actions)
+ {
+ action.ToolTip = SyncText.ToolTip(_entry, action.Action);
+ action.Sequence = Title;
+ }
}
private void RaiseTexts()
diff --git a/src/Titano.App/Server/SyncTableViewModel.cs b/src/Titano.App/Server/SyncTableViewModel.cs
index 88fb2f8f..2b1cc56c 100644
--- a/src/Titano.App/Server/SyncTableViewModel.cs
+++ b/src/Titano.App/Server/SyncTableViewModel.cs
@@ -53,6 +53,15 @@ public sealed class SyncFilterChip(SyncFilter filter, Action select)
}
}
+/// Why the sync table shows no rows; each case has its one action (BRIEF §0.2 rule 6).
+public enum SyncEmpty
+{
+ None,
+ SignedOut,
+ Nothing,
+ NoMatch,
+}
+
///
/// The sync table of the Server screen (BRIEF §12.7, Server.html): every sequence of this PC and of the signed-in
/// server with what each side holds, where it stands and what can be done (upload, download originals, open with
@@ -87,6 +96,13 @@ public sealed class SyncTableViewModel : ObservableObject, IDisposable
{
if (Host.Server is { } server) ShellActions.OpenUrl(server + "/admin");
});
+ ClearFiltersCommand = new RelayCommand(() =>
+ {
+ _search = string.Empty;
+ OnPropertyChanged(nameof(SearchText));
+ Select(SyncFilter.All);
+ });
+ ImportCommand = new RelayCommand(() => _shell.Navigate(SectionKey.Import));
}
public ObservableCollection Rows { get; } = [];
@@ -94,6 +110,12 @@ public sealed class SyncTableViewModel : ObservableObject, IDisposable
public ICommand UploadAllCommand => _uploadAll;
public ICommand OpenAdminCommand { get; }
+ /// "No sequence matches": back to every sequence.
+ public ICommand ClearFiltersCommand { get; }
+
+ /// "Nothing to compare yet": bring photos in.
+ public ICommand ImportCommand { get; }
+
public string SearchText
{
get => _search;
@@ -108,11 +130,19 @@ public sealed class SyncTableViewModel : ObservableObject, IDisposable
public bool HasRows => Rows.Count > 0;
+ public SyncEmpty Empty => HasRows ? SyncEmpty.None
+ : !IsActive ? SyncEmpty.SignedOut
+ : _entries.Count == 0 ? SyncEmpty.Nothing
+ : SyncEmpty.NoMatch;
+
/// "Not connected to a server", "Nothing to compare yet" or "No sequence matches"; null when rows show.
- public string? EmptyText => HasRows ? null
- : !IsActive ? Loc.L("Server.Empty")
- : _entries.Count == 0 ? Loc.L("Server.Sync.Empty")
- : Loc.L("Server.Sync.NoMatch");
+ public string? EmptyText => Empty switch
+ {
+ SyncEmpty.SignedOut => Loc.L("Server.Empty"),
+ SyncEmpty.Nothing => Loc.L("Server.Sync.Empty"),
+ SyncEmpty.NoMatch => Loc.L("Server.Sync.NoMatch"),
+ _ => null,
+ };
/// What "Upload all local" sends, or why it is disabled.
public string UploadAllToolTip =>
@@ -134,8 +164,9 @@ public sealed class SyncTableViewModel : ObservableObject, IDisposable
public string? ErrorToolTip => Host.Agent?.LastError is { } error ? Loc.L("Tooltips.Server.Sync.Retrying", error.Message) : null;
- /// The server's web admin (it admits administrators only).
- public bool CanOpenAdmin => IsActive;
+ /// The server's web admin admits administrators only: the link shows for accounts that manage the archive or users.
+ public bool CanOpenAdmin => _shell.Services.Server.User is { } user && IsActive
+ && (user.Permissions & (long)(Permissions.ManageArchive | Permissions.ManageUsers)) != 0;
private SyncHost Host => _shell.Services.Sync;
@@ -249,6 +280,7 @@ public sealed class SyncTableViewModel : ObservableObject, IDisposable
while (Rows.Count > wanted.Count) Rows.RemoveAt(Rows.Count - 1);
}
OnPropertyChanged(nameof(HasRows));
+ OnPropertyChanged(nameof(Empty));
OnPropertyChanged(nameof(EmptyText));
}
diff --git a/src/Titano.App/Server/SyncText.cs b/src/Titano.App/Server/SyncText.cs
index f55ab693..7fe2ab5b 100644
--- a/src/Titano.App/Server/SyncText.cs
+++ b/src/Titano.App/Server/SyncText.cs
@@ -234,11 +234,16 @@ public static class SyncText
_ => Loc.L("Tooltips.Server.Sync." + action),
};
+ ///
+ /// The chips sort by where the originals are: a sequence being transferred still counts as only on this PC (no server
+ /// copy yet) or only on the server (no local originals yet), as the chip tooltips say.
+ ///
public static bool Matches(SyncEntry entry, SyncFilter filter, string search) =>
(filter switch
{
- SyncFilter.LocalOnly => entry.Status == SyncStatus.LocalOnly,
- SyncFilter.Remote => entry.Status is SyncStatus.RemoteOnly or SyncStatus.ProxiesOnly,
+ SyncFilter.LocalOnly => entry.Status == SyncStatus.LocalOnly || entry is { Status: SyncStatus.Transferring, Link: null },
+ SyncFilter.Remote => entry.Status is SyncStatus.RemoteOnly or SyncStatus.ProxiesOnly
+ || entry is { Status: SyncStatus.Transferring, HasLocalOriginals: false, Link: not null },
SyncFilter.Conflicts => entry.Status == SyncStatus.Conflict,
_ => true,
}) && (search.Length == 0 || entry.Title.Contains(search, StringComparison.CurrentCultureIgnoreCase));
diff --git a/src/Titano.App/Settings/EncoderInventory.cs b/src/Titano.App/Settings/EncoderInventory.cs
index 0996bd62..efabe68c 100644
--- a/src/Titano.App/Settings/EncoderInventory.cs
+++ b/src/Titano.App/Settings/EncoderInventory.cs
@@ -11,28 +11,6 @@ using Titano.Core.Windows.MediaFoundation;
namespace Titano.App.Settings;
-/// Who provides an encoder row.
-public enum EncoderSource
-{
- /// A Media Foundation MFT (hardware or Microsoft software).
- MediaFoundation,
-
- /// Titano's managed MJPEG/AVI writer.
- BuiltInMjpeg,
-
- /// Titano's managed GIF/APNG encoders.
- BuiltInAnimation,
-}
-
-/// One row of Settings › Rendering › Encoders.
-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;
-
- /// "NVIDIA · NVIDIA HEVC Encoder MFT" unless the name already carries the vendor.
- public string DisplayName => Vendor is { } vendor && !Name.Contains(vendor, StringComparison.OrdinalIgnoreCase) ? vendor + " · " + Name : Name;
-}
-
/// Outcome of encoding the synthetic test clip with one encoder.
public sealed record SelfTestResult(bool Passed, double FramesPerSecond, string? Error);
diff --git a/src/Titano.App/Settings/EncoderUse.cs b/src/Titano.App/Settings/EncoderUse.cs
new file mode 100644
index 00000000..aa2237fd
--- /dev/null
+++ b/src/Titano.App/Settings/EncoderUse.cs
@@ -0,0 +1,53 @@
+using Titano.Core.Export;
+using Titano.Core.Localization;
+using Titano.Core.Video;
+
+namespace Titano.App.Settings;
+
+/// Who provides an encoder row.
+public enum EncoderSource
+{
+ /// A Media Foundation MFT (hardware or Microsoft software).
+ MediaFoundation,
+
+ /// Titano's managed MJPEG/AVI writer.
+ BuiltInMjpeg,
+
+ /// Titano's managed GIF/APNG encoders.
+ BuiltInAnimation,
+}
+
+/// One row of Settings › Rendering › Encoders.
+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;
+
+ /// "NVIDIA · NVIDIA HEVC Encoder MFT" unless the name already carries the vendor.
+ public string DisplayName => Vendor is { } vendor && !Name.Contains(vendor, StringComparison.OrdinalIgnoreCase) ? vendor + " · " + Name : Name;
+}
+
+/// What the encoders of this PC are for: the built-in presets each one serves and what a render node offers.
+public static class EncoderUse
+{
+ /// Names of the built-in presets an encoder row can encode, in preset order.
+ public static IReadOnlyList 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)),
+ ];
+
+ /// "4K archive · 4K HEVC · …" for the Used for column, or "Custom only" when no preset uses the codec.
+ public static string Text(EncoderRow row) => Presets(row) is { Count: > 0 } names ? string.Join(" · ", names) : Loc.L("Settings.Rendering.CustomOnly");
+
+ ///
+ /// 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 (, as the node client decides).
+ ///
+ public static IReadOnlyList Node(IEnumerable rows, bool allowsHardware) =>
+ [.. rows.Where(r => r.Source == EncoderSource.MediaFoundation && (!r.Hardware || allowsHardware))];
+
+ /// "HEVC · H.264 · AV1": the codecs of , each once; null when there are none.
+ public static string? Codecs(IEnumerable encoders) =>
+ encoders.Select(e => e.Codec).Distinct(StringComparer.Ordinal).ToList() is { Count: > 0 } codecs ? string.Join(" · ", codecs) : null;
+}
diff --git a/src/Titano.App/Settings/SettingsRows.cs b/src/Titano.App/Settings/SettingsRows.cs
index 60fa3b35..51ed12a5 100644
--- a/src/Titano.App/Settings/SettingsRows.cs
+++ b/src/Titano.App/Settings/SettingsRows.cs
@@ -64,8 +64,11 @@ public sealed class EncoderRowViewModel(EncoderRow row) : ObservableObject
public bool HasTenBit => Row.TenBit;
- /// "8192×8192" or "no limit".
- public string MaxText => Row.MaxWidth > 0 ? $"{Row.MaxWidth}×{Row.MaxHeight}" : Loc.L("Settings.Rendering.NoLimit");
+ /// "8192×8192" (width first in every language) or "no limit".
+ public string MaxText => Row.MaxWidth > 0 ? Formatting.LeftToRight($"{Row.MaxWidth}×{Row.MaxHeight}") : Loc.L("Settings.Rendering.NoLimit");
+
+ /// The built-in presets this encoder serves (Settings.html "Used for").
+ public string UsedForText => EncoderUse.Text(Row);
public bool IsTesting
{
@@ -97,6 +100,9 @@ public sealed class EncoderRowViewModel(EncoderRow row) : ObservableObject
public string ResultToolTip => _result is { Passed: false, Error: { } error } ? error : Loc.L("Tooltips.Settings.SelfTestResult");
+ /// What a screen reader announces when the self-test of this row moves on: "HEVC NVIDIA NVENC (hardware): 142 fps · ok".
+ public string ResultAnnouncement => Loc.L("Settings.Rendering.ResultFor", Codec, Name, ResultText);
+
internal void Refresh() => OnAllPropertiesChanged();
private void RaiseResult()
@@ -105,6 +111,7 @@ public sealed class EncoderRowViewModel(EncoderRow row) : ObservableObject
OnPropertyChanged(nameof(ResultKind));
OnPropertyChanged(nameof(ResultText));
OnPropertyChanged(nameof(ResultToolTip));
+ OnPropertyChanged(nameof(ResultAnnouncement));
}
}
@@ -117,4 +124,7 @@ public sealed class TrustedCertificateRow(TrustedCertificate certificate, IComma
public string FullFingerprint => Certificate.Fingerprint;
public string TrustedText => Formatting.Date(Certificate.TrustedAt);
public ICommand ForgetCommand { get; } = forget;
+
+ /// "Forget: https://nas.local:8443": the button names its server for screen readers.
+ public string ForgetName => Loc.L("Settings.Server.ForgetName", Server);
}