fix(uploader): sign-in default button, neutral watch status, typed MB/s limit

The hidden sign-in button is the default only while visible and sign-in
runs only when signed out; the password copy is cleared after success.
A watch folder shows a neutral dot until its first check. The MB/s field
parses its own text so invalid input reverts instead of showing a
framework validation message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 10:31:58 +00:00
1 parent ebe62b77ad
commit 93f8dca1db
3 files changed
+46 -48

No files matched your search

+15 -9
View File
@@ -1,6 +1,7 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Windows.Input;
using System.Windows.Threading;
@@ -237,17 +238,22 @@ public sealed class MainViewModel : LocalizedViewModel
/// <summary>Accessible name of the pause/resume button (also the tray menu entry).</summary>
public string PauseLabel => Loc.L(IsPaused ? "Uploader.Action.Resume" : "Uploader.Action.Pause");
/// <summary>Upload limit in MB/s; 0 = unlimited.</summary>
public int BandwidthLimit
/// <summary>Upload limit in MB/s as typed; 0 = unlimited. Text that is not a whole number reverts.</summary>
public string BandwidthLimitText
{
get => _s.Session.BandwidthLimit;
get => _s.Session.BandwidthLimit.ToString(Loc.Culture);
set
{
var clamped = Math.Clamp(value, 0, 100_000);
if (clamped == _s.Session.BandwidthLimit) return;
_s.Session.BandwidthLimit = clamped;
_s.Settings.BandwidthLimit = clamped;
_s.SaveSettings();
if (int.TryParse(value, NumberStyles.Integer, Loc.Culture, out var limit))
{
limit = Math.Clamp(limit, 0, 100_000);
if (limit != _s.Session.BandwidthLimit)
{
_s.Session.BandwidthLimit = limit;
_s.Settings.BandwidthLimit = limit;
_s.SaveSettings();
}
}
OnPropertyChanged();
}
}
@@ -515,7 +521,7 @@ public sealed class MainViewModel : LocalizedViewModel
OnPropertyChanged(nameof(ConnectionText));
OnPropertyChanged(nameof(QuotaText));
OnPropertyChanged(nameof(IsConnectVisible));
OnPropertyChanged(nameof(BandwidthLimit));
OnPropertyChanged(nameof(BandwidthLimitText));
if (e.PropertyName != nameof(IServerSession.State)) return;
if (_s.Session.State == ConnectionState.Connected) _ = LoadSequencesAsync();
if (IsConnectVisible)