添加 页脚 编译时间显示
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<MSheet>
|
||||
<MCard Flat Href=@CONFIG_COPYRIGHT_URL Target="_blank">
|
||||
<MLabel Style="background-color:inherit;" Class="text-subtltie-2">@CONFIG_COPYRIGHT</MLabel>
|
||||
<MLabel Style="background-color:inherit;" Class="text-subtltie-2 ml-4">@Version</MLabel>
|
||||
<MLabel Style="background-color:inherit;white-space: pre;" Class="text-subtltie-2 ml-4">@Version</MLabel>
|
||||
</MCard>
|
||||
</MSheet>
|
||||
|
||||
|
@@ -14,6 +14,8 @@ using Microsoft.AspNetCore.Components;
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
using ThingsGateway.Admin.Core;
|
||||
|
||||
namespace ThingsGateway.Admin.Blazor.Core;
|
||||
/// <summary>
|
||||
/// Foter
|
||||
@@ -40,7 +42,12 @@ public partial class Foter
|
||||
/// <inheritdoc/>
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
Version = "v" + Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
var assembly = Assembly.GetEntryAssembly();
|
||||
if (assembly != null)
|
||||
{
|
||||
Version = $"v{assembly.GetName().Version} {new System.IO.FileInfo(assembly.Location).LastWriteTime.ToDefaultDateTimeFormat()}";
|
||||
}
|
||||
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user