Unione delle correzioni dell'interfaccia

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
Claude committed 2026-10-14 01:44:32 +00:00
commit 82ed0287fa
27 files changed
+1365 -59

No files matched your search

+9 -3
View File
@@ -1,4 +1,3 @@
using System.Globalization;
using Febe.Core.Domain;
using Febe.Core.Engine;
using Febe.Core.Library;
@@ -16,9 +15,16 @@ public static class AccountSettingsMapper
/// <summary>Largest «Storico, massimo al giorno» the form accepts: twice the «Rapido» value (spec §7.5).</summary>
public static int MaxBackfillPerDay => CautionProfile.Fast.BackfillPostsPerAccountPerDay * 2;
public static AccountSettingsDto ToDto(Account account)
/// <summary>The form of an account.</summary>
/// <param name="account">The stored account.</param>
/// <param name="zone">
/// Alberto's zone: «Da una data» is stored as the first instant of a local day (<see cref="LocalCalendar.StartOfDay"/>),
/// so it is shown as that local day, which <see cref="Apply"/> turns back into the same instant.
/// </param>
public static AccountSettingsDto ToDto(Account account, TimeZoneInfo zone)
{
ArgumentNullException.ThrowIfNull(account);
ArgumentNullException.ThrowIfNull(zone);
var reference = account with { IsFollowed = false, Frequency = account.Frequency == Frequency.Custom ? Frequency.Custom : account.Frequency };
return new AccountSettingsDto(
account.KeepUpdated,
@@ -28,7 +34,7 @@ public static class AccountSettingsMapper
ApiMapping.Types(account.ContentTypes),
ApiMapping.Depth(account.Limits.Depth),
account.Limits.LastPosts,
account.Limits.FromDate is { } from ? from.UtcDateTime.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) : null,
account.Limits.FromDate is { } from ? ApiMapping.Day(LocalCalendar.Today(from, zone)) : null,
account.Limits.BackfillPostsPerDay,
account.Limits.MaxVideoBytes is { } bytes ? Math.Round(bytes / 1024d / 1024d, 1) : null,
account.Limits.StoryVideos,
+2 -2
View File
@@ -57,7 +57,7 @@ public static class AccountsApi
throw new BadRequestException($"{ItalianText.Handle(account.Username)} è «Solo archivio»: Febe non lo contatta.");
}
var edited = AccountSettingsMapper.Apply(account, AccountSettingsMapper.ToDto(account) with { KeepUpdated = body.Value }, clock.LocalZone, clock.Now, account.Folder);
var edited = AccountSettingsMapper.Apply(account, AccountSettingsMapper.ToDto(account, clock.LocalZone) with { KeepUpdated = body.Value }, clock.LocalZone, clock.Now, account.Folder);
await storage.Accounts.UpdateAsync(edited, ct).ConfigureAwait(false);
await engine.NotifyAccountsChangedAsync(ct).ConfigureAwait(false);
changes.Publish(new LibraryChange(clock.Now, id, "account"));
@@ -303,7 +303,7 @@ public static class AccountsApi
return new AccountDetailDto(
Row(account, summary, avatar, resumesTomorrow, now, zone),
new AccountStatsDto(stats.EntriesInLibrary, stats.Posts, stats.Stories, stats.HighlightItems, stats.Tagged, stats.ProfilePictures, stats.HighlightCollections, stats.Bytes, stats.PendingFiles),
AccountSettingsMapper.ToDto(account),
AccountSettingsMapper.ToDto(account, zone),
await PlanAsync(storage, account, now, ct).ConfigureAwait(false),
library.Layout.AccountFolder(account),
account.Folder is null,