18 lines
648 B
C#
18 lines
648 B
C#
using OwnChar.App.Desktop.Api.Parameters;
|
|
using OwnChar.App.Desktop.UI.MainTabs;
|
|
using Pilz.Plugins.Advanced;
|
|
|
|
namespace OwnChar.App.Desktop.Features.MainWindow.QuickAction;
|
|
|
|
internal class HomeFeature() : PluginFunction(FeatureCodes.QuickAction, "ownchar.home", "Home"), IPluginFeatureProvider<HomeFeature>
|
|
{
|
|
public static HomeFeature Instance { get; } = new();
|
|
|
|
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
|
|
{
|
|
if (@params is MainWindowParams p)
|
|
p.Api.OpenTab(new TabUserView(p.Api, p.Api.Manager?.CurrentUser), p.Api.Manager!.CurrentUser!.Username!);
|
|
return null;
|
|
}
|
|
}
|