Files
AppKit/samples/Shared/SampleApp.cs
james.maesandCodex f58aac9987 feat(samples): add repository issue and community Help links
Refs #28. Align WinUI and WPF Help commands with gclo and add native menu acceptance without launching a browser.

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Signed-off-by: James Maes <james@kof22.com>
2026-10-11 16:33:13 -05:00

53 lines
1.8 KiB
C#

/*
* Copyright (c) 2026 James Maes (KofTwentyTwo)
* SPDX-License-Identifier: MIT
*/
using KofTwentyTwo.AppKit;
using KofTwentyTwo.AppKit.Settings;
namespace AppKit.Sample;
/// <summary>Identity and settings shared by both sample apps (linked into each project).</summary>
internal static class SampleApp
{
public static AppInfo Info { get; } = new()
{
Id = "appkit-sample",
DisplayName = "AppKit Sample",
Tagline = "Everything a KofTwentyTwo Windows app gets for free",
Description = "A minimal app wired to every AppKit service: splash, About, activity log, settings, theme, crash net, and Velopack self-update.",
RepositoryUrl = new Uri("https://github.com/KofTwentyTwo/AppKit"),
Author = "James Maes",
AuthorEmail = "james@kof22.com",
Website = new Uri("https://kof22.com"),
Copyright = "Copyright (c) 2026 James Maes",
Brand = new AppBrand { IconSvgPath = "Assets/Brand/app-icon.svg", IconIcoPath = "Assets/Brand/app.ico" },
Attributions =
[
new("KofTwentyTwo.AppKit", "MIT License"),
new("Velopack", "MIT License"),
new(".NET Runtime", "MIT License"),
],
};
public static AppPaths Paths { get; } = new(Info);
/// <summary>The app's bug/feature templates, independent of any upstream project credited in About.</summary>
public static Uri IssuesUrl { get; } = new(Info.RepositoryUrl!.AbsoluteUri.TrimEnd('/') + "/issues/new/choose");
/// <summary>Community questions and tips in the app's own repository.</summary>
public static Uri SupportUrl { get; } = new(Info.RepositoryUrl!.AbsoluteUri.TrimEnd('/') + "/discussions");
public static SettingsStore<SampleSettings> SettingsStore { get; } = new(Paths.SettingsFile, SampleSettingsContext.Default.SampleSettings);
}