Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/velopack
Browse files Browse the repository at this point in the history
  • Loading branch information
leMicin committed Dec 27, 2024
2 parents adce5d7 + 754e374 commit 8c19f09
Show file tree
Hide file tree
Showing 32 changed files with 535 additions and 96 deletions.
10 changes: 7 additions & 3 deletions src/Sidekick.Apis.Poe/Parser/Metadata/MetadataParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ public Task Initialize()
parsingBlock.Parsed = true;

var itemRarity = headerParser.ParseRarity(parsingItem);

var canBeVaalGem = itemRarity == Rarity.Gem && parsingItem.Blocks.Count > 7;
if (canBeVaalGem && data.NameAndTypeDictionary.TryGetValue(parsingItem.Blocks[5].Lines[0].Text, out var vaalGem))
if (canBeVaalGem && parsingItem.Blocks[5].Lines.Count > 0)
{
return vaalGem.First();
data.NameAndTypeDictionary.TryGetValue(parsingItem.Blocks[5].Lines[0].Text, out var vaalGem);
if (vaalGem != null)
{
return vaalGem.First();
}
}

// Get name and type text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<FormInput OnFocus="Focus"
OnBlur="Blur"
Label="@Label"
Value="@InputValue">
Value="@InputValue"
spellcheck="false">
<AdornmentContent>
<ButtonSecondary OnClick="Delete">@Resources["Reset"]</ButtonSecondary>
</AdornmentContent>
Expand Down
1 change: 1 addition & 0 deletions src/Sidekick.Common.Blazor/Settings/General/General.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<Fieldset Legend="@Resources["Other_Settings"]">
<RetainClipboardEditor />
<EscapeClosesOverlaysEditor />
<SaveWindowPositionsEditor />
<KeyFindItemsEditor />
</Fieldset>
</AppContainer>
Expand Down
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);
}
}
9 changes: 4 additions & 5 deletions src/Sidekick.Common.Blazor/Settings/SettingsResources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<value>Vérifier les prix</value>
</data>
<data name="PriceCheck_Prediction_Enable" xml:space="preserve">
<value>Afficher les prédictions de poeprices.info</value>
<value>Afficher les prédictions de poeprices.info (PoE1 seulement)</value>
</data>
<data name="Reset_Cache" xml:space="preserve">
<value>Réinitialiser la cache</value>
Expand Down Expand Up @@ -324,11 +324,10 @@
<data name="Official_Website" xml:space="preserve">
<value>Site officiel</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="GitHub_Repository" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="Open_Settings_Folder" xml:space="preserve">
<value>Ouvrir le répertoire des configurations</value>
</data>
<data name="SaveWindowPositions" xml:space="preserve">
<value>Conserver la position des fenêtres. Si désactivé, les fenêtres seront centrées.</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<value>가격 검색</value>
</data>
<data name="PriceCheck_Prediction_Enable" xml:space="preserve">
<value>poeprices.info에서 가져온 가격 예측 보여주기</value>
<value>poeprices.info에서 가져온 가격 예측 보여주기 (PoE1)</value>
</data>
<data name="Reset_Cache" xml:space="preserve">
<value>캐시 초기화</value>
Expand Down
7 changes: 5 additions & 2 deletions src/Sidekick.Common.Blazor/Settings/SettingsResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<value>Check Prices</value>
</data>
<data name="PriceCheck_Prediction_Enable" xml:space="preserve">
<value>Show price prediction from poeprices.info</value>
<value>Show price prediction from poeprices.info (PoE1 only)</value>
</data>
<data name="Reset_Cache" xml:space="preserve">
<value>Reset Cache</value>
Expand Down Expand Up @@ -342,4 +342,7 @@
<data name="poedb" xml:space="preserve">
<value>poedb.tw / poe2db.tw</value>
</data>
</root>
<data name="SaveWindowPositions" xml:space="preserve">
<value>Save the positions of the overlays. If unchecked, they will be centered.</value>
</data>
</root>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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");
}
}
}
Loading

0 comments on commit 8c19f09

Please sign in to comment.