M6 Windows: composizione condivisa Febe.App per Server e Desktop; Febe per Windows (WPF) con l'interfaccia in WebView2, area di notifica, istanza unica, «Browser di Febe» su WebView2 con CDP filtrato (WebView2CdpSession) e ripieghi di S2 (composizione, Edge), guscio nativo, avvisi, spostamento verificato della cartella dei dati, icona del marchio; un solo Febe.exe, installatore NSIS e zip portabile; guida docs/windows.md e prove dal vivo S1–S3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
73 files changed
+7914
-699
No files matched your search
@@ -0,0 +1,54 @@
|
||||
using Febe.Core.Library;
|
||||
using Febe.Web.Connection;
|
||||
|
||||
namespace Febe.App;
|
||||
|
||||
/// <summary>The problems found at start-up; fixed for the life of the process (fixing one needs a restart).</summary>
|
||||
public sealed class StartupProblems(IReadOnlyList<ConfigurationProblem> problems) : IConfigurationProblems
|
||||
{
|
||||
public IReadOnlyList<ConfigurationProblem> Current { get; } = problems;
|
||||
}
|
||||
|
||||
/// <summary>Checks shared by both shells (spec §8.2): the Data folder is local and writable.</summary>
|
||||
public static class DataFolderProblems
|
||||
{
|
||||
public const string DataNotWritable = "dati-non-scrivibili";
|
||||
|
||||
public const string DataOnNetwork = "dati-in-rete";
|
||||
|
||||
/// <summary>The problem with the Data folder, or null when it is fine.</summary>
|
||||
public static ConfigurationProblem? Check(string dataFolder, DataFolderCheck? check = null)
|
||||
{
|
||||
if ((check ?? new DataFolderCheck()).Check(dataFolder) is not { } data)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ConfigurationProblem(
|
||||
data.Kind == DataFolderProblemKind.NetworkPath ? DataOnNetwork : DataNotWritable,
|
||||
data.Title,
|
||||
data.Explanation,
|
||||
data.Remedy);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The link to Instagram while a configuration problem keeps the browser from starting: always «browser non
|
||||
/// disponibile», and every command refused with the problem (the configuration gate refuses them earlier anyway).
|
||||
/// </summary>
|
||||
public sealed class ProblemConnectionService(IReadOnlyList<ConfigurationProblem> problems) : IConnectionService
|
||||
{
|
||||
public Task<ConnectionStatus> GetStatusAsync(CancellationToken ct) =>
|
||||
Task.FromResult(new ConnectionStatus(ConnectionState.BrowserUnavailable, null, null, false, null));
|
||||
|
||||
public Task BeginUserDrivingAsync(bool openLogin, CancellationToken ct) => throw Refused();
|
||||
|
||||
public Task<FinishResult> FinishAsync(CancellationToken ct) => throw Refused();
|
||||
|
||||
public Task CancelAsync(CancellationToken ct) => Task.CompletedTask;
|
||||
|
||||
public Task DisconnectAsync(CancellationToken ct) => throw Refused();
|
||||
|
||||
private Febe.Web.Api.BadRequestException Refused() =>
|
||||
new($"{(problems.Count > 0 ? problems[0].Title : "Configurazione da sistemare")}: il browser di Febe non è partito.");
|
||||
}
|
||||
Reference in new issue
Block a user