TASK 21: real logo + creator-hub About overlay — the About overlay is now the in-app creator hub: real logo (the creator's 'llama fortnite superman logo' copied to Assets/llama-logo.png, creator-owned art), hub links — llama chile shop on YouTube (MainViewModel.ChannelUrl, now public), Mastodon (https://mastodon.llamachile.tube/@gramps), Buy me a coffee (https://buymeacoffee.com/llamachiley, live), Unlock Premium (greyed 'coming soon'; IsPremiumAvailable flips on once the tabled itch.io PremiumUrl lands); a Licenses & legal sub-panel loads the full shipped THIRD-PARTY-NOTICES.txt in-app (ShowLicenses reads from the executable dir on first open, 'not found' fallback — never the OS viewer) with '← Back to About' (BackToAbout_Click) — the AboutHubTests integration test drives the real window + VM asserting the hub opens, link URLs are real, licensing loads the shipped notices text, and back returns to the hub — 174 tests passing, 0 warnings
This commit is contained in:
@@ -69,6 +69,7 @@ public class MainViewModel : ViewModelBase
|
||||
private bool _isBugOpen;
|
||||
private bool _isFeatureOpen;
|
||||
private bool _isAboutOpen;
|
||||
private bool _isLicensesOpen;
|
||||
private string _overlayTitle = string.Empty;
|
||||
private string _defaultStreamTitle = string.Empty;
|
||||
private string _defaultStreamDescription = string.Empty;
|
||||
@@ -128,9 +129,24 @@ public class MainViewModel : ViewModelBase
|
||||
private bool _brandFlashActive;
|
||||
|
||||
private const string SupportEmail = "gramps@llamachile.shop";
|
||||
private const string ChannelUrl = "https://youtube.com/@llamachileshop";
|
||||
// The creator-hub link targets (About overlay) — public so the hub's
|
||||
// integration test can assert they point at real destinations.
|
||||
public const string ChannelUrl = "https://youtube.com/@llamachileshop";
|
||||
public const string MastodonUrl = "https://mastodon.llamachile.tube/@gramps";
|
||||
// Tabled 2026-08-14: the itch.io account was just created — the product page
|
||||
// (premium unlock) lands here once set up. Coffee/thanks URL is live.
|
||||
public const string PremiumUrl = "";
|
||||
public const string CoffeeUrl = "https://buymeacoffee.com/llamachiley";
|
||||
public static string AppVersionLabel => $"Version {typeof(MainViewModel).Assembly.GetName().Version?.ToString(3)}";
|
||||
|
||||
/// <summary>The About hub's Unlock Premium button lights up only once the
|
||||
/// itch.io product URL is set (tabled 2026-08-14 — account in setup).</summary>
|
||||
public bool IsPremiumAvailable => PremiumUrl.Length > 0;
|
||||
|
||||
/// <summary>Full in-app licensing/legal text, loaded on demand from the
|
||||
/// shipped THIRD-PARTY-NOTICES.txt (never opens the OS viewer).</summary>
|
||||
public string LicensesText { get; private set; } = string.Empty;
|
||||
|
||||
public ObservableCollection<Scene> Scenes { get; } = new();
|
||||
public ObservableCollection<ChatMessage> ChatMessages { get; } = new();
|
||||
public ObservableCollection<DisplayInfo> Displays { get; } = new();
|
||||
@@ -743,6 +759,14 @@ public class MainViewModel : ViewModelBase
|
||||
private set => SetPanel(ref _isAboutOpen, value);
|
||||
}
|
||||
|
||||
/// <summary>About hub sub-view: the full licensing/legal texts panel
|
||||
/// (in-app scrolling — no Notepad, no browser tab).</summary>
|
||||
public bool IsLicensesOpen
|
||||
{
|
||||
get => _isLicensesOpen;
|
||||
set => SetProperty(ref _isLicensesOpen, value);
|
||||
}
|
||||
|
||||
public bool IsAnyOverlayOpen => IsSettingsOpen || IsBugOpen || IsFeatureOpen || IsAboutOpen;
|
||||
|
||||
public string OverlayTitle
|
||||
@@ -949,6 +973,10 @@ public class MainViewModel : ViewModelBase
|
||||
public ICommand SubmitBugCommand { get; }
|
||||
public ICommand SubmitFeatureCommand { get; }
|
||||
public ICommand OpenChannelCommand { get; }
|
||||
public ICommand OpenMastodonCommand { get; }
|
||||
public ICommand OpenCoffeeCommand { get; }
|
||||
public ICommand OpenPremiumCommand { get; }
|
||||
public ICommand OpenLicensesCommand { get; }
|
||||
public ICommand SaveLayoutCommand { get; }
|
||||
public ICommand SaveLayoutAsCommand { get; }
|
||||
public ICommand OpenLayoutCommand { get; }
|
||||
@@ -1010,6 +1038,10 @@ public class MainViewModel : ViewModelBase
|
||||
SubmitBugCommand = new RelayCommand(_ => SubmitBug());
|
||||
SubmitFeatureCommand = new RelayCommand(_ => SubmitFeature());
|
||||
OpenChannelCommand = new RelayCommand(_ => OpenUrl(ChannelUrl));
|
||||
OpenMastodonCommand = new RelayCommand(_ => OpenUrl(MastodonUrl));
|
||||
OpenCoffeeCommand = new RelayCommand(_ => OpenUrl(CoffeeUrl));
|
||||
OpenPremiumCommand = new RelayCommand(_ => OpenUrl(PremiumUrl), _ => IsPremiumAvailable);
|
||||
OpenLicensesCommand = new RelayCommand(_ => ShowLicenses());
|
||||
StartStreamCommand = new RelayCommand(_ => BeginGoLive());
|
||||
EndStreamCommand = new RelayCommand(_ => StopStream(), _ => IsLive);
|
||||
SaveLayoutCommand = new RelayCommand(_ => SaveLayoutNow());
|
||||
@@ -1869,6 +1901,31 @@ public class MainViewModel : ViewModelBase
|
||||
IsFeatureOpen = panel == nameof(IsFeatureOpen);
|
||||
IsAboutOpen = panel == nameof(IsAboutOpen);
|
||||
OverlayTitle = title;
|
||||
if (panel != nameof(IsAboutOpen))
|
||||
IsLicensesOpen = false;
|
||||
}
|
||||
|
||||
/// <summary>Shows the in-app licensing panel, loading the full texts from
|
||||
/// the shipped THIRD-PARTY-NOTICES.txt on first open (never the OS viewer).
|
||||
/// Falls back to a "not found" note if the file is missing so the panel
|
||||
/// never hangs on nothing.</summary>
|
||||
private void ShowLicenses()
|
||||
{
|
||||
if (string.IsNullOrEmpty(LicensesText))
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = Path.Combine(AppContext.BaseDirectory, "THIRD-PARTY-NOTICES.txt");
|
||||
LicensesText = File.Exists(path)
|
||||
? File.ReadAllText(path)
|
||||
: "THIRD-PARTY-NOTICES.txt not found next to the executable.";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LicensesText = $"Could not read THIRD-PARTY-NOTICES.txt: {ex.Message}";
|
||||
}
|
||||
}
|
||||
IsLicensesOpen = true;
|
||||
}
|
||||
|
||||
private void SubmitBug()
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user