Phase 1: versioning, menu bar, About dialog, right-click context menu
- Directory.Build.props sets Version=0.1.0 (semver pre-1.0 = beta) plus Authors / Product / RepositoryUrl, picked up by all three projects. - MainWindow gets a real menu bar (File / Server / Help) replacing the old toolbar. File: New endpoint / Import / Export / Backups (last three are stubs for the next phase) / Exit. Server: Settings / Restart service. Help: About. - Drop the Refresh button - the 3 s polling loop covers it. - DataGridRow gets a right-click context menu: Edit / Copy URL / toggle Enabled / Delete. - New About dialog reads AssemblyInformationalVersion at runtime and links jpaul.me + the GitHub repo via clickable hyperlinks. - Ctrl+N input binding for new-endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace WebhookServer.Gui.Views;
|
||||
|
||||
public partial class AboutDialog : Window
|
||||
{
|
||||
public AboutDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var asm = Assembly.GetExecutingAssembly();
|
||||
var info = asm.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion
|
||||
?? asm.GetName().Version?.ToString()
|
||||
?? "0.0.0";
|
||||
VersionText.Text = $"Version {info}";
|
||||
}
|
||||
|
||||
private void OnHyperlink(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnOk(object sender, RoutedEventArgs e) => Close();
|
||||
}
|
||||
Reference in New Issue
Block a user