mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
Fixed #4140
This commit is contained in:
parent
1d5b6f3c89
commit
5bd85a3aac
3 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
using Microsoft.Extensions.PlatformAbstractions;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Ombi.Helpers
|
namespace Ombi.Helpers
|
||||||
|
@ -8,7 +9,8 @@ namespace Ombi.Helpers
|
||||||
public static string GetRuntimeVersion()
|
public static string GetRuntimeVersion()
|
||||||
{
|
{
|
||||||
ApplicationEnvironment app = PlatformServices.Default.Application;
|
ApplicationEnvironment app = PlatformServices.Default.Application;
|
||||||
return app.ApplicationVersion;
|
var split = app.ApplicationVersion.Split('.');
|
||||||
|
return string.Join('.', split.Take(3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -49,7 +49,7 @@ namespace Ombi.Schedule.Processor
|
||||||
UpdateDate = DateTime.Now,
|
UpdateDate = DateTime.Now,
|
||||||
ChangeLogs = release.Description,
|
ChangeLogs = release.Description,
|
||||||
Downloads = new List<Downloads>(),
|
Downloads = new List<Downloads>(),
|
||||||
UpdateAvailable = release.Version != AssemblyHelper.GetRuntimeVersion()
|
UpdateAvailable = release.Version != "v" + AssemblyHelper.GetRuntimeVersion()
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var dl in release.Downloads)
|
foreach (var dl in release.Downloads)
|
||||||
|
|
|
@ -13,8 +13,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="mat-row">
|
<div class="mat-row">
|
||||||
<div class="mat-cell">Version</div>
|
<div class="mat-cell">Version</div>
|
||||||
<div class="mat-cell">{{about.version}} <a (click)="openUpdate()" *ngIf="newUpdate"
|
<div class="mat-cell">{{about.version}} <a (click)="openUpdate()" *ngIf="newUpdate"
|
||||||
style="color:#df691a; text-decoration: underline; cursor: pointer;"><b><i class="fas fa-code-branch"></i> (New Update Available)</b></a></div>
|
style="color:#df691a; text-decoration: underline; cursor: pointer;"><b><i class="fas fa-code-branch"></i> (New Update Available)</b></a>
|
||||||
|
<span *ngIf="!newUpdate"> <i class="far fa-thumbs-up" matTooltip="Nice work bro! Latest version FTW!"></i></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="mat-row">
|
<!-- <div class="mat-row">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue