added version display, fix #15

This commit is contained in:
Nicolas Constant 2020-12-28 00:17:06 -05:00
parent 9ff5707e92
commit 5d86ebf618
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688
3 changed files with 13 additions and 7 deletions

View file

@ -4,6 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<UserSecretsId>d21486de-a812-47eb-a419-05682bb68856</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<Version>0.1.0</Version>
</PropertyGroup>
<ItemGroup>

View file

@ -50,6 +50,8 @@ namespace BirdsiteLive.Controllers
[Route("/nodeinfo/{id}.json")]
public IActionResult NodeInfo(string id)
{
var version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(3);
if (id == "2.0")
{
var nodeInfo = new NodeInfoV20
@ -66,7 +68,7 @@ namespace BirdsiteLive.Controllers
software = new Software()
{
name = "birdsitelive",
version = "0.1.0"
version = version
},
protocols = new[]
{
@ -101,7 +103,7 @@ namespace BirdsiteLive.Controllers
software = new SoftwareV21()
{
name = "birdsitelive",
version = "0.1.0",
version = version,
repository = "https://github.com/NicolasConstant/BirdsiteLive"
},
protocols = new[]

View file

@ -36,11 +36,14 @@
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
<a href="https://github.com/NicolasConstant/BirdsiteLive">Github</a> @*<a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>*@
</div>
</footer>
<footer class="border-top footer text-muted">
<div class="container">
<a href="https://github.com/NicolasConstant/BirdsiteLive">Github</a> @*<a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>*@
<span style="float: right;">BirdsiteLIVE @System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(3)</span>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>