diff --git a/BTCPayServer/Views/Shared/PointOfSale/Public/_LayoutPos.cshtml b/BTCPayServer/Views/Shared/PointOfSale/Public/_LayoutPos.cshtml index 87f2fc82a..69a8ca7ee 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/Public/_LayoutPos.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/Public/_LayoutPos.cshtml @@ -1,12 +1,33 @@ @inject BTCPayServer.Services.ThemeSettings Theme - +@inject IWebHostEnvironment WebHostEnvironment @using BTCPayServer.Services.Apps @using BTCPayServer.Abstractions.Extensions +@using BTCPayServer.Abstractions.TagHelpers +@using BundlerMinifier.TagHelpers +@using Microsoft.AspNetCore.Hosting +@using Microsoft.AspNetCore.Mvc.TagHelpers +@using Newtonsoft.Json +@using Newtonsoft.Json.Linq +@using System.IO @model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel @{ ViewData["Title"] = Model.Title; Layout = null; + + async Task GetDynamicManifest(string title) + { + var manifest = WebHostEnvironment.WebRootFileProvider.GetFileInfo("manifest.json"); + if (!manifest.Exists) + { + return null; + } + using var reader = new StreamReader(manifest.CreateReadStream()); + var jObject = JObject.Parse(await reader.ReadToEndAsync()); + jObject["short_name"] = title; + jObject["name"] = $"BTCPay Server: {title}"; + return $"data:application/manifest+json, {jObject.ToString(Formatting.None)}"; + } } @@ -18,7 +39,7 @@ - + @if (Model.CustomCSSLink != null)