69 references to PanelActionKind
Aspire.Tray.Tests (69)
src\Aspire.Tray\Common\TrayPanel.cs (17)
253/// missing on Start. Confirming returns <see cref="PanelActionKind.RemoveRecent"/>. 442return new(false, new PanelAction(PanelActionKind.Close)); 674return new(PanelActionKind.OpenDashboard, host, target.Bounds) { Recent = recent }; 679return new(PanelActionKind.Stop, host, target.Bounds) { Recent = recent }; 681return new(PanelActionKind.Start, host, target.Bounds) { Recent = recent }; 690return new(PanelActionKind.OpenIn, host, target.Bounds) 697return new(PanelActionKind.ShowInFolder, host, target.Bounds) { Recent = recent }; 700return new(PanelActionKind.CopyPath, host, target.Bounds) { Recent = recent }; 703return new(PanelActionKind.TogglePin, host, target.Bounds) { Recent = recent }; 706return new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true }; 710return new(PanelActionKind.ToggleRecent, Anchor: target.Bounds); 722PanelConfirmKind.ClearRecent => new(PanelActionKind.ClearRecent, Anchor: target.Bounds), 723_ => new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true } 730return new(PanelActionKind.SetLaunchAtSignIn, Anchor: target.Bounds) { Enabled = _settings?.Startup?.Enabled != true }; 732return new(PanelActionKind.Documentation, Anchor: target.Bounds); 734return new(PanelActionKind.Settings, Anchor: target.Bounds); 736return new(PanelActionKind.Quit, Anchor: target.Bounds);
src\Aspire.Tray\Common\TrayPanelScene.cs (2)
313internal sealed record PanelAction(PanelActionKind Kind, AppHostMenuItem? Host = null, PanelRect Anchor = default) 321/// <summary>For <see cref="PanelActionKind.OpenIn"/>: the title of the application to open the folder in.</summary>
src\Aspire.Tray\Linux\LinuxTrayApplication.cs (24)
619case PanelActionKind.Settings: 622case PanelActionKind.SetLaunchAtSignIn: 625case PanelActionKind.ClearRecent: 628case PanelActionKind.Close: 631case PanelActionKind.ToggleRecent: 634if (action.Kind is PanelActionKind.Start or PanelActionKind.OpenIn or PanelActionKind.ShowInFolder 648if (action.Kind is PanelActionKind.OpenDashboard or PanelActionKind.Documentation or PanelActionKind.OpenIn 649or PanelActionKind.ShowInFolder or PanelActionKind.Quit) 655PanelActionKind.OpenDashboard => LinuxTrayAction.Dashboard, 656PanelActionKind.Stop => LinuxTrayAction.Stop, 657PanelActionKind.Start => LinuxTrayAction.Start, 658PanelActionKind.OpenIn => LinuxTrayAction.OpenIn, 659PanelActionKind.ShowInFolder => LinuxTrayAction.Folder, 660PanelActionKind.CopyPath => LinuxTrayAction.CopyPath, 661PanelActionKind.TogglePin => LinuxTrayAction.TogglePin, 662PanelActionKind.RemoveRecent => LinuxTrayAction.RemoveRecent, 663PanelActionKind.Documentation => LinuxTrayAction.Documentation, 664PanelActionKind.Quit => LinuxTrayAction.Quit, 669Application = action.Kind == PanelActionKind.OpenIn
src\Aspire.Tray\Linux\LinuxTrayPanel.cs (1)
581_execute(new(PanelActionKind.Settings));
TrayPanelTests.cs (25)
149Assert.Equal(PanelActionKind.ToggleRecent, response.Action?.Kind); 230Assert.Equal(new PanelAction(PanelActionKind.OpenIn, host, default) { Application = "Terminal" }, 232Assert.Equal(PanelActionKind.ShowInFolder, Pick(PanelTargetKind.ShowInFolder)?.Kind); 233Assert.Equal(PanelActionKind.CopyPath, Pick(PanelTargetKind.CopyPath)?.Kind); 235Assert.Equal(PanelActionKind.TogglePin, pin?.Kind); 257Assert.Equal(new PanelAction(PanelActionKind.RemoveRecent, recent, remove.Bounds) { Recent = true }, action); 277Assert.Equal(PanelActionKind.Stop, stop.Action?.Kind); 308Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 393Assert.Equal(PanelActionKind.Stop, Click(panel, Target(panel, PanelTargetKind.Stop, state.AppHosts[0]).HitBounds).Action?.Kind); 394Assert.Equal(PanelActionKind.OpenDashboard, Click(panel, Target(panel, PanelTargetKind.Dashboard, state.AppHosts[0]).HitBounds).Action?.Kind); 396Assert.Equal(PanelActionKind.Start, start?.Kind); 398Assert.Equal(PanelActionKind.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind); 399Assert.Equal(PanelActionKind.Quit, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Quit).HitBounds).Action?.Kind); 400Assert.Equal(PanelActionKind.Documentation, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Documentation).HitBounds).Action?.Kind); 440Assert.Equal(PanelActionKind.Stop, response.Action?.Kind); 545Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 557Assert.Equal(new PanelAction(PanelActionKind.Stop, state.AppHosts[1], Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).Bounds), action); 586Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 610Assert.Equal(PanelActionKind.Documentation, action?.Kind); 642Assert.Equal(PanelActionKind.ClearRecent, Click(panel, accept.HitBounds).Action?.Kind); 659Assert.Equal(PanelActionKind.RemoveRecent, action?.Kind); 668Assert.Equal(PanelActionKind.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind); 681Assert.Equal(PanelActionKind.SetLaunchAtSignIn, setLaunch?.Kind); 1357Assert.Equal(PanelActionKind.ClearRecent, clear?.Kind); 1444Assert.Equal(PanelActionKind.Quit, panel.Invoke(quit.Target.Key).Action?.Kind);