@inject BTCPayServer.Services.ThemeSettings Theme @inject IWebHostEnvironment WebHostEnvironment @using BTCPayServer.Services.Apps @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.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}"; 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)}"; } } @Model.Title @if (Model.CustomCSSLink != null) { } @if (Model.ViewType == PosViewType.Cart) { } @if (Model.ViewType == PosViewType.Light) { } @if (!string.IsNullOrEmpty(Model.EmbeddedCSS)) { @Safe.Raw($""); } @RenderBody()