diff --git a/Yavsc/Controllers/HomeController.cs b/Yavsc/Controllers/HomeController.cs index 5b839ed5..993d4a56 100644 --- a/Yavsc/Controllers/HomeController.cs +++ b/Yavsc/Controllers/HomeController.cs @@ -13,6 +13,7 @@ using System.Threading.Tasks; namespace Yavsc.Controllers { + using System.IO; using Models; using Yavsc; @@ -78,9 +79,11 @@ namespace Yavsc.Controllers .Where(a=> a.ParentCode==id).OrderByDescending(a=>a.Rate)); } } - public IActionResult About() + public async Task About() { - return View(); + // TODO show the version tag + FileInfo fi = new FileInfo("wwwroot/version"); + return View("About",fi.Exists ? _localizer["Version logicielle: "] + await fi.OpenText().ReadToEndAsync() : _localizer["Aucune information sur la version logicielle n'est publiée."]); } public IActionResult Privacy() { diff --git a/Yavsc/Views/Home/About.cshtml b/Yavsc/Views/Home/About.cshtml index 2e3bdea3..431fe42f 100755 --- a/Yavsc/Views/Home/About.cshtml +++ b/Yavsc/Views/Home/About.cshtml @@ -158,6 +158,9 @@ La "pré-production" affiche les sites suivants: * [Lua](https://lua.pschneider.fr) +

+@Model +

diff --git a/Yavsc/wwwroot/version b/Yavsc/wwwroot/version new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/Yavsc/wwwroot/version @@ -0,0 +1 @@ +test