@using BTCPayServer.Abstractions.Extensions @using Microsoft.AspNetCore.Hosting @using Microsoft.AspNetCore.Mvc.TagHelpers @using Newtonsoft.Json.Linq @using System.IO @inject IWebHostEnvironment WebHostEnvironment @inject BTCPayServer.Services.BTCPayServerEnvironment Env @model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel @{ ViewData["Title"] = string.IsNullOrEmpty(Model.Title) ? Model.StoreName : 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}"; foreach (var jToken in jObject["icons"]!) { var icon = (JObject)jToken; icon["src"] = $"{Context.Request.GetAbsoluteRoot()}/{icon["src"]}"; } return $"data:application/manifest+json,{Safe.Json(jObject)}"; } } @await RenderSectionAsync("PageHeadContent", false) @RenderBody() @await RenderSectionAsync("PageFootContent", false)