diff --git a/Taskless.Applications.Web/Taskless.Applications.Web.csproj b/Taskless.Applications.Web/Taskless.Applications.Web.csproj index 6f83ae1..a5fb873 100644 --- a/Taskless.Applications.Web/Taskless.Applications.Web.csproj +++ b/Taskless.Applications.Web/Taskless.Applications.Web.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable false @@ -24,9 +24,9 @@ - - - + + + diff --git a/Taskless.Libraries.Components/TaskApp.razor.cs b/Taskless.Libraries.Components/TaskApp.razor.cs index ad4df00..a8115d5 100644 --- a/Taskless.Libraries.Components/TaskApp.razor.cs +++ b/Taskless.Libraries.Components/TaskApp.razor.cs @@ -52,23 +52,26 @@ protected async override Task OnInitializedAsync() if (this.HotKeys is not null) { this.HotkeyContext = this.HotKeys.CreateContext(); + var options = new HotKeyOptions(); + + this.HotkeyContext - .Add(ModCode.Shift, Code.ArrowUp, async () => { await MoveUp(); }) - .Add(ModCode.Shift, Code.ArrowDown, async () => { await MoveDown(); }) - .Add(ModCode.Shift, Code.PageUp, async () => { await MoveGroupUp(); }) - .Add(ModCode.Shift, Code.PageDown, async () => { await MoveGroupDown(); }) - .Add(ModCode.Shift, Code.X, async () => { await ToggleType(); }) - .Add(ModCode.Shift, Code.C, async () => { await ToggleChecked(); }) - .Add(ModCode.Shift, Code.E, async () => { await ToggleEdit(); }) - .Add(ModCode.Shift, Code.R, async () => { await RemoveItem(); }) - .Add(ModCode.Shift, Code.N, async () => { await NewItem(); }) - .Add(ModCode.Shift, Code.G, async () => { await NewGroup(); }) - .Add(ModCode.Shift, Code.T, async () => { await ToggleTheme(); }) - .Add(ModCode.Shift, Code.H, async () => { await ShowHelp(); }) - .Add(ModCode.Shift, Code.F, async () => { await RestartSelection(); }) - .Add(ModCode.Shift, Code.Home, async () => { await GoToFirstInGroup(); }) - .Add(ModCode.Shift, Code.End, async () => { await GoToLastInGroup(); }) - .Add(ModCode.Shift, Code.S, async () => { await SaveDataAsync(); }); + .Add(ModCode.Shift, Code.ArrowUp, MoveUp) + .Add(ModCode.Shift, Code.ArrowDown, MoveDown) + .Add(ModCode.Shift, Code.PageUp, MoveGroupUp) + .Add(ModCode.Shift, Code.PageDown, MoveGroupDown) + .Add(ModCode.Shift, Code.X, ToggleType) + .Add(ModCode.Shift, Code.C, ToggleChecked) + .Add(ModCode.Shift, Code.E, ToggleEdit) + .Add(ModCode.Shift, Code.R, RemoveItem) + .Add(ModCode.Shift, Code.N, NewItem) + .Add(ModCode.Shift, Code.G, NewGroup) + .Add(ModCode.Shift, Code.T, ToggleTheme) + .Add(ModCode.Shift, Code.H, ShowHelp) + .Add(ModCode.Shift, Code.F, RestartSelection) + .Add(ModCode.Shift, Code.Home, GoToFirstInGroup) + .Add(ModCode.Shift, Code.End, GoToLastInGroup) + .Add(ModCode.Shift, Code.S, SaveDataAsync); } } diff --git a/Taskless.Libraries.Components/Taskless.Libraries.Components.csproj b/Taskless.Libraries.Components/Taskless.Libraries.Components.csproj index e5795f7..5ec6ddb 100644 --- a/Taskless.Libraries.Components/Taskless.Libraries.Components.csproj +++ b/Taskless.Libraries.Components/Taskless.Libraries.Components.csproj @@ -1,7 +1,7 @@ - + - net7.0 + net8.0 enable enable @@ -12,10 +12,10 @@ - - - - + + + +