add past 20 commits releases just in case

This commit is contained in:
Asval 2024-10-06 03:13:03 +02:00
parent 0060635e66
commit 784704b645
4 changed files with 29 additions and 12 deletions

View File

@ -153,6 +153,7 @@ public class FModelApiEndpoint : AbstractApiProvider
if (args is { CurrentVersion: { } })
{
UserSettings.Default.LastUpdateCheck = DateTime.Now;
var qa = (CustomMandatory) args.Mandatory;
var currentVersion = new System.Version(args.CurrentVersion);
if ((qa.Value && qa.CommitHash == UserSettings.Default.CommitHash) || // qa branch : same commit id

View File

@ -24,6 +24,7 @@ public class GitHubAsset : ViewModel
[J("download_count")] public int DownloadCount { get; private set; }
[J("browser_download_url")] public string BrowserDownloadUrl { get; private set; }
[J("created_at")] public DateTime CreatedAt { get; private set; }
[J("uploader")] public Author Uploader { get; private set; }
private bool _isLatest;
public bool IsLatest
@ -48,8 +49,8 @@ public class GitHubCommit : ViewModel
}
}
[J("commit")] public Commit Commit { get; private set; }
[J("author")] public Author Author { get; private set; }
[J("commit")] public Commit Commit { get; set; }
[J("author")] public Author Author { get; set; }
private GitHubAsset _asset;
public GitHubAsset Asset
@ -107,6 +108,7 @@ public class Commit
public class Author
{
[J("name")] public string Name { get; set; }
[J("login")] public string Login { get; set; }
[J("date")] public DateTime Date { get; set; }
[J("avatar_url")] public string AvatarUrl { get; set; }
[J("html_url")] public string HtmlUrl { get; set; }

View File

@ -45,6 +45,20 @@ public class UpdateViewModel : ViewModel
{
commit.Asset = asset;
}
else
{
Commits.Add(new GitHubCommit
{
Sha = commitSha,
Commit = new Commit
{
Message = "No commit message",
Author = new Author { Name = asset.Uploader.Login, Date = asset.CreatedAt }
},
Author = asset.Uploader,
Asset = asset
});
}
}
}

View File

@ -42,16 +42,16 @@
<ColumnDefinition Width="5" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible" />
<Style.Triggers>
<DataTrigger Binding="{Binding Title, RelativeSource={RelativeSource AncestorType=adonisControls:AdonisWindow}}" Value="Releases">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<!-- <Grid.Style> -->
<!-- <Style TargetType="Grid"> -->
<!-- <Setter Property="Visibility" Value="Visible" /> -->
<!-- <Style.Triggers> -->
<!-- <DataTrigger Binding="{Binding Title, RelativeSource={RelativeSource AncestorType=adonisControls:AdonisWindow}}" Value="Releases"> -->
<!-- <Setter Property="Visibility" Value="Collapsed" /> -->
<!-- </DataTrigger> -->
<!-- </Style.Triggers> -->
<!-- </Style> -->
<!-- </Grid.Style> -->
<Button Grid.Column="0" Style="{DynamicResource {x:Static adonisUi:Styles.AccentButton}}"
VerticalAlignment="Top" Height="{Binding ActualHeight, ElementName=RemindButton}"