diff --git a/BTCPayServer/Controllers/AppsPublicController.cs b/BTCPayServer/Controllers/AppsPublicController.cs index be7dd71a2..cfd8b2f47 100644 --- a/BTCPayServer/Controllers/AppsPublicController.cs +++ b/BTCPayServer/Controllers/AppsPublicController.cs @@ -65,6 +65,8 @@ namespace BTCPayServer.Controllers var numberFormatInfo = _AppService.Currencies.GetNumberFormatInfo(settings.Currency) ?? _AppService.Currencies.GetNumberFormatInfo("USD"); double step = Math.Pow(10, -(numberFormatInfo.CurrencyDecimalDigits)); viewType ??= settings.EnableShoppingCart ? PosViewType.Cart : settings.DefaultView; + var store = await _AppService.GetStore(app); + var storeBlob = store.GetStoreBlob(); return View("PointOfSale/" + viewType, new ViewPointOfSaleViewModel() { @@ -91,6 +93,7 @@ namespace BTCPayServer.Controllers CustomTipText = settings.CustomTipText, CustomTipPercentages = settings.CustomTipPercentages, CustomCSSLink = settings.CustomCSSLink, + CustomLogoLink = storeBlob.CustomLogo, AppId = appId, Description = settings.Description, EmbeddedCSS = settings.EmbeddedCSS diff --git a/BTCPayServer/Models/AppViewModels/ViewPointOfSaleViewModel.cs b/BTCPayServer/Models/AppViewModels/ViewPointOfSaleViewModel.cs index 054309184..5ea82764a 100644 --- a/BTCPayServer/Models/AppViewModels/ViewPointOfSaleViewModel.cs +++ b/BTCPayServer/Models/AppViewModels/ViewPointOfSaleViewModel.cs @@ -49,6 +49,7 @@ namespace BTCPayServer.Models.AppViewModels public int[] CustomTipPercentages { get; set; } public string CustomCSSLink { get; set; } + public string CustomLogoLink { get; set; } public string Description { get; set; } public string EmbeddedCSS { get; set; } } diff --git a/BTCPayServer/Services/Apps/AppType.cs b/BTCPayServer/Services/Apps/AppType.cs index 350e8419c..15d14e4d9 100644 --- a/BTCPayServer/Services/Apps/AppType.cs +++ b/BTCPayServer/Services/Apps/AppType.cs @@ -9,6 +9,7 @@ namespace BTCPayServer.Services.Apps public enum PosViewType { Static, - Cart + Cart, + Light } } diff --git a/BTCPayServer/Views/AppsPublic/PointOfSale/Light.cshtml b/BTCPayServer/Views/AppsPublic/PointOfSale/Light.cshtml new file mode 100644 index 000000000..fef2e4329 --- /dev/null +++ b/BTCPayServer/Views/AppsPublic/PointOfSale/Light.cshtml @@ -0,0 +1,16 @@ +@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel +@{ + Layout = "_LayoutPos"; +} + +@if (Context.Request.Query.ContainsKey("simple")) +{ + @await Html.PartialAsync("/Views/AppsPublic/PointOfSale/MinimalLight.cshtml", Model) +} +else +{ + + @await Html.PartialAsync("/Views/AppsPublic/PointOfSale/VueLight.cshtml", Model) +} diff --git a/BTCPayServer/Views/AppsPublic/PointOfSale/MinimalLight.cshtml b/BTCPayServer/Views/AppsPublic/PointOfSale/MinimalLight.cshtml new file mode 100644 index 000000000..20d067280 --- /dev/null +++ b/BTCPayServer/Views/AppsPublic/PointOfSale/MinimalLight.cshtml @@ -0,0 +1,26 @@ +