mirror of
https://github.com/tonytins/amtkstat.git
synced 2025-03-15 12:21:21 +00:00
Version printed on the front-end using Gitinfo
- Version printed on the front-end using Gitinfo. It is possible to get the native one from Tauri itself, but I haven't got that working yet. - Added macOS and Android-style icons.
This commit is contained in:
parent
761a822e27
commit
3ed751de7c
5 changed files with 21 additions and 1 deletions
BIN
assets/icon-square.png
Normal file
BIN
assets/icon-square.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 218 KiB |
BIN
assets/icon.png
BIN
assets/icon.png
Binary file not shown.
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 181 KiB |
|
@ -7,6 +7,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="GitInfo" Version="3.3.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
1
src/Gitinfo.txt
Normal file
1
src/Gitinfo.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.1.104
|
|
@ -36,7 +36,7 @@
|
||||||
<footer>
|
<footer>
|
||||||
<sub>
|
<sub>
|
||||||
<i>
|
<i>
|
||||||
<p>Status Boards by Dixieland Software</p>
|
<p>@PrintVersion<br>Status Boards by Dixieland Software</p>
|
||||||
</i>
|
</i>
|
||||||
</sub>
|
</sub>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -47,6 +47,21 @@
|
||||||
|
|
||||||
private string? StationCode { get; set; }
|
private string? StationCode { get; set; }
|
||||||
|
|
||||||
|
// Bit of a workaround until I get native version from Tauri.
|
||||||
|
// Regardless, it's useful for printing the commit hash alone.
|
||||||
|
private string PrintVersion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var major = ThisAssembly.Git.SemVer.Major;
|
||||||
|
var minor = ThisAssembly.Git.SemVer.Minor;
|
||||||
|
var patch = ThisAssembly.Git.SemVer.Patch;
|
||||||
|
var commit = ThisAssembly.Git.Commit;
|
||||||
|
|
||||||
|
return $"v{major}.{minor}.{patch}-{commit}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async Task RedirectToStat(string code)
|
private async Task RedirectToStat(string code)
|
||||||
{
|
{
|
||||||
StationCode = await JsRuntime.InvokeAsync<string>("__TAURI__.tauri.invoke", "station", new { name = code });
|
StationCode = await JsRuntime.InvokeAsync<string>("__TAURI__.tauri.invoke", "station", new { name = code });
|
||||||
|
|
Loading…
Add table
Reference in a new issue