版本提示
This commit is contained in:
parent
37bfc3db83
commit
eb0fcf5cac
@ -1,5 +1,7 @@
|
||||
using FastGithub.Models;
|
||||
using FastGithub.Configuration;
|
||||
using FastGithub.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace FastGithub.Controllers
|
||||
{
|
||||
@ -14,8 +16,12 @@ namespace FastGithub.Controllers
|
||||
/// <returns></returns>
|
||||
public IActionResult Index()
|
||||
{
|
||||
var model = new Home { Host = Request.Host.ToString() };
|
||||
var model = new Home
|
||||
{
|
||||
Version = ProductionVersion.Current?.ToString(),
|
||||
ProjectUri = "https://github.com/dotnetcore/FastGithub"
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,11 +8,11 @@
|
||||
/// <summary>
|
||||
/// 获取版本号
|
||||
/// </summary>
|
||||
public string? Version { get; } = ProductionVersion.Current?.ToString();
|
||||
public string? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求域名或ip
|
||||
/// </summary>
|
||||
public string? Host { get; set; }
|
||||
public string? ProjectUri { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ namespace FastGithub
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var version = ProductionVersion.Current;
|
||||
this.logger.LogInformation($"{nameof(FastGithub)}启动完成,当前版本为v{version}");
|
||||
this.logger.LogInformation($"{nameof(FastGithub)}启动完成,当前版本为v{version},访问https://github.com/dotnetcore/FastGithub关注新版本");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
@ -16,23 +16,29 @@
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>FastGithub</h1>
|
||||
<p>github加速神器,解决github打不开、用户头像无法加载、releases无法上传下载、git-clone、git-pull、git-push失败等问题</p>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<h3>软件信息</h3>
|
||||
<p>
|
||||
<span>软件版本:</span>
|
||||
<span>v@(Model?.Version)</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>项目地址:</span>
|
||||
<a target="_blank" href="https://github.com/dotnetcore/FastGithub">https://github.com/dotnetcore/FastGithub</a>
|
||||
</p>
|
||||
|
||||
<h3>CA证书</h3>
|
||||
<p>
|
||||
你可能需要在客户端设备下载FastGithub自颁发的CA证书<a target="_blank" href="/cert">FastGithub.cer</a>,导入到受信任的根证书颁发机构或浏览器
|
||||
</p>
|
||||
<h1>FastGithub</h1>
|
||||
<p>github加速神器,解决github打不开、用户头像无法加载、releases无法上传下载、git-clone、git-pull、git-push失败等问题</p>
|
||||
|
||||
<h3>软件信息</h3>
|
||||
<p>
|
||||
<span>安装版本:</span>
|
||||
<span>v@(Model?.Version)</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>项目地址:</span>
|
||||
<a target="_blank" href="@(Model?.ProjectUri)">@(Model?.ProjectUri)</a>
|
||||
</p>
|
||||
|
||||
<h3>CA证书</h3>
|
||||
<p>
|
||||
你可能需要在客户端设备下载FastGithub自颁发的CA证书<a target="_blank" href="/cert">FastGithub.cer</a>,导入到受信任的根证书颁发机构或浏览器
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user