Skip to content

Commit

Permalink
updated to 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfds committed Jun 20, 2024
1 parent a55853c commit d6c287a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.12.0</Version>
<Version>0.13.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Core/Controls/DownloadsControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<DataGridTextColumn Header="Type" Binding="{Binding AddonType}" FontWeight="Bold" />
<DataGridTextColumn Header="Version" Binding="{Binding Version}" />
<DataGridTextColumn Header="Size" Binding="{Binding FileSizeString}" />
<DataGridTextColumn Header="Rating" Binding="{Binding Rating}" />
<DataGridTextColumn Header="Rating" Binding="{Binding RatingStr}" />
<DataGridTextColumn Header="Downloads" Binding="{Binding Installs}" />
<DataGridTextColumn Header="Updated" Binding="{Binding UpdateDateString}" SortMemberPath="UpdateDate" />
<DataGridTextColumn Header="Status" Binding="{Binding Status}" FontWeight="Bold" />
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Core/ViewModels/CampaignsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public ImmutableList<IAddon> CampaignsList

OnPropertyChanged(nameof(SelectedAddonDescription));
OnPropertyChanged(nameof(SelectedAddonPreview));
OnPropertyChanged(nameof(IsPreviewVisible));
OnPropertyChanged(nameof(SelectedAddonRating));
OnPropertyChanged(nameof(SelectedAddonPlaytime));
OnPropertyChanged(nameof(IsPreviewVisible));

StartCampaignCommand.NotifyCanExecuteChanged();
}
Expand Down
14 changes: 14 additions & 0 deletions src/Common/Entities/DownloadableAddonEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ public sealed class DownloadableAddonEntity : IDownloadableAddon
[JsonIgnore]
public bool HasNewerVersion { get; set; }

[JsonIgnore]
public string RatingStr
{
get
{
if (Rating == 0)
{
return "-";
}

return Rating.ToString("0.##");
}
}

[JsonIgnore]
public string Status
{
Expand Down
2 changes: 2 additions & 0 deletions src/Common/Interfaces/IDownloadableAddon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ public interface IDownloadableAddon
int Score { get; set; }
decimal Rating{ get; set; }
DateTime UpdateDate { get; set; }

string FileSizeString { get; }
string UpdateDateString { get; }
string RatingStr { get; }

string ToMarkdownString();
}
Expand Down

0 comments on commit d6c287a

Please sign in to comment.