-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feature/velopack
- Loading branch information
Showing
32 changed files
with
535 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/Sidekick.Common.Blazor/Settings/Components/KeybindEditor.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Sidekick.Common.Blazor/Settings/General/SaveWindowPositionsEditor.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@using Sidekick.Common.Settings | ||
|
||
<FormCheckbox Value="@SaveWindowPositions" | ||
ValueChanged="@SaveWindowPositionsChanged"> | ||
@Resources["SaveWindowPositions"] | ||
</FormCheckbox> | ||
|
||
@inject IStringLocalizer<SettingsResources> Resources | ||
@inject ISettingsService SettingsService | ||
|
||
@code { | ||
|
||
private bool SaveWindowPositions { get; set; } | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
SaveWindowPositions = await SettingsService.GetBool(SettingKeys.SaveWindowPositions); | ||
await base.OnInitializedAsync(); | ||
} | ||
|
||
private async Task SaveWindowPositionsChanged(bool value) | ||
{ | ||
SaveWindowPositions = value; | ||
await SettingsService.Set(SettingKeys.SaveWindowPositions, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 195 additions & 0 deletions
195
src/Sidekick.Common.Database/Migrations/20241226161905_SaveWindowPositions.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
src/Sidekick.Common.Database/Migrations/20241226161905_SaveWindowPositions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Sidekick.Common.Database.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class SaveWindowPositions : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AlterColumn<int>( | ||
name: "Width", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: false, | ||
defaultValue: 0, | ||
oldClrType: typeof(int), | ||
oldType: "INTEGER", | ||
oldNullable: true); | ||
|
||
migrationBuilder.AlterColumn<int>( | ||
name: "Height", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: false, | ||
defaultValue: 0, | ||
oldClrType: typeof(int), | ||
oldType: "INTEGER", | ||
oldNullable: true); | ||
|
||
migrationBuilder.AddColumn<int>( | ||
name: "X", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: true); | ||
|
||
migrationBuilder.AddColumn<int>( | ||
name: "Y", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: true); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "X", | ||
table: "ViewPreferences"); | ||
|
||
migrationBuilder.DropColumn( | ||
name: "Y", | ||
table: "ViewPreferences"); | ||
|
||
migrationBuilder.AlterColumn<int>( | ||
name: "Width", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: true, | ||
oldClrType: typeof(int), | ||
oldType: "INTEGER"); | ||
|
||
migrationBuilder.AlterColumn<int>( | ||
name: "Height", | ||
table: "ViewPreferences", | ||
type: "INTEGER", | ||
nullable: true, | ||
oldClrType: typeof(int), | ||
oldType: "INTEGER"); | ||
} | ||
} | ||
} |
Oops, something went wrong.