From d2e9ec9494a7b543d6ad92bc10bf2936037accdd Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Fri, 5 Apr 2024 17:43:38 +0200 Subject: [PATCH] Cleanup v2 leftovers --- BTCPayServer.Tests/BTCPayServer.Tests.csproj | 2 +- BTCPayServer.Tests/Checkoutv2Tests.cs | 16 +---------- BTCPayServer.Tests/SeleniumTester.cs | 1 + BTCPayServer.Tests/SeleniumTests.cs | 12 ++++---- BTCPayServer.Tests/UtilitiesTests.cs | 10 +------ BTCPayServer/Controllers/UIHomeController.cs | 4 +-- .../Controllers/UIInvoiceController.UI.cs | 9 +++--- .../BitcoinPaymentMethodViewExtension.cs | 2 +- BTCPayServer/Plugins/NFC/NFCPlugin.cs | 10 +++---- .../MoneroLikePaymentMethodHandler.cs | 2 +- .../Payments/ZcashLikePaymentMethodHandler.cs | 2 +- ...shtml => BitcoinLikeMethodCheckout.cshtml} | 4 +-- ...tml => LightningLikeMethodCheckout.cshtml} | 4 +-- .../Views/Shared/NFC/CheckoutEnd.cshtml | 26 ++++-------------- .../Shared/NFC/LNURLNFCPostContent-v2.cshtml | 1 - .../Shared/NFC/LNURLNFCPostContent.cshtml | 2 +- .../{CheckoutV2.cshtml => Checkout.cshtml} | 12 ++++---- .../Views/UIStores/CheckoutAppearance.cshtml | 2 +- .../{checkout-v2 => checkout}/checkout.css | 4 +-- .../{checkout-v2 => checkout}/checkout.js | 2 +- .../{checkout-v2 => checkout}/error.mp3 | Bin .../{checkout-v2 => checkout}/nfcread.mp3 | Bin .../{checkout-v2 => checkout}/payment.mp3 | Bin 23 files changed, 44 insertions(+), 83 deletions(-) rename BTCPayServer/Views/Shared/Bitcoin/{BitcoinLikeMethodCheckout-v2.cshtml => BitcoinLikeMethodCheckout.cshtml} (95%) rename BTCPayServer/Views/Shared/Lightning/{LightningLikeMethodCheckout-v2.cshtml => LightningLikeMethodCheckout.cshtml} (94%) delete mode 100644 BTCPayServer/Views/Shared/NFC/LNURLNFCPostContent-v2.cshtml rename BTCPayServer/Views/UIInvoice/{CheckoutV2.cshtml => Checkout.cshtml} (98%) rename BTCPayServer/wwwroot/{checkout-v2 => checkout}/checkout.css (98%) rename BTCPayServer/wwwroot/{checkout-v2 => checkout}/checkout.js (99%) rename BTCPayServer/wwwroot/{checkout-v2 => checkout}/error.mp3 (100%) rename BTCPayServer/wwwroot/{checkout-v2 => checkout}/nfcread.mp3 (100%) rename BTCPayServer/wwwroot/{checkout-v2 => checkout}/payment.mp3 (100%) diff --git a/BTCPayServer.Tests/BTCPayServer.Tests.csproj b/BTCPayServer.Tests/BTCPayServer.Tests.csproj index 2e344c545..7deb867df 100644 --- a/BTCPayServer.Tests/BTCPayServer.Tests.csproj +++ b/BTCPayServer.Tests/BTCPayServer.Tests.csproj @@ -32,7 +32,7 @@ - + all diff --git a/BTCPayServer.Tests/Checkoutv2Tests.cs b/BTCPayServer.Tests/Checkoutv2Tests.cs index 19026cd1a..ed7576914 100644 --- a/BTCPayServer.Tests/Checkoutv2Tests.cs +++ b/BTCPayServer.Tests/Checkoutv2Tests.cs @@ -53,9 +53,6 @@ namespace BTCPayServer.Tests // Top up/zero amount invoices var invoiceId = s.CreateInvoice(amount: null); s.GoToInvoiceCheckout(invoiceId); - - // Ensure we are seeing Checkout v2 - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Equal(2, s.Driver.FindElements(By.CssSelector(".payment-method")).Count); Assert.Contains("Bitcoin", s.Driver.FindElement(By.CssSelector(".payment-method.active")).Text); Assert.Contains("LNURL", s.Driver.FindElement(By.CssSelector(".payment-method:nth-child(2)")).Text); @@ -92,7 +89,6 @@ namespace BTCPayServer.Tests s.GoToHome(); invoiceId = s.CreateInvoice(21000, "SATS", defaultPaymentMethod: "BTC-LN"); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Equal(2, s.Driver.FindElements(By.CssSelector(".payment-method")).Count); Assert.Contains("Lightning", s.Driver.WaitForElement(By.CssSelector(".payment-method.active")).Text); Assert.Contains("Bitcoin", s.Driver.WaitForElement(By.CssSelector(".payment-method")).Text); @@ -113,7 +109,6 @@ namespace BTCPayServer.Tests s.Driver.FindElement(By.Id("save")).Click(); Assert.Contains("BTC Lightning settings successfully updated", s.FindAlertMessage().Text); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Contains("sats", s.Driver.FindElement(By.Id("AmountDue")).Text); // Details should not show exchange rate @@ -152,8 +147,6 @@ namespace BTCPayServer.Tests s.GoToHome(); invoiceId = s.CreateInvoice(2100, "EUR"); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); - await Task.Delay(200); address = s.Driver.FindElement(By.CssSelector("#Address_BTC-CHAIN .truncate-center-start")).Text; var amountFraction = "0.00001"; @@ -190,7 +183,6 @@ namespace BTCPayServer.Tests s.GoToHome(); invoiceId = s.CreateInvoice(); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); // Details s.Driver.ToggleCollapse("PaymentDetails"); @@ -265,7 +257,6 @@ namespace BTCPayServer.Tests invoiceId = s.CreateInvoice(); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Empty(s.Driver.FindElements(By.CssSelector(".payment-method"))); Assert.Contains("BTC", s.Driver.FindElement(By.Id("AmountDue")).Text); qrValue = s.Driver.FindElement(By.CssSelector(".qr-container")).GetAttribute("data-qr-value"); @@ -298,7 +289,6 @@ namespace BTCPayServer.Tests s.Driver.FindElement(By.Id("Save")).Click(); Assert.Contains("Store successfully updated", s.FindAlertMessage().Text); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Contains("sats", s.Driver.FindElement(By.Id("AmountDue")).Text); // Check details @@ -313,7 +303,6 @@ namespace BTCPayServer.Tests s.GoToHome(); invoiceId = s.CreateInvoice(defaultPaymentMethod: "BTC-LN"); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Empty(s.Driver.FindElements(By.CssSelector(".payment-method"))); payUrl = s.Driver.FindElement(By.Id("PayInWallet")).GetAttribute("href"); Assert.StartsWith("bitcoin:", payUrl); @@ -335,7 +324,6 @@ namespace BTCPayServer.Tests // BIP21 with top-up invoice invoiceId = s.CreateInvoice(amount: null); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Empty(s.Driver.FindElements(By.CssSelector(".payment-method"))); qrValue = s.Driver.FindElement(By.CssSelector(".qr-container")).GetAttribute("data-qr-value"); clipboard = s.Driver.FindElement(By.CssSelector(".qr-container")).GetAttribute("data-clipboard"); @@ -385,7 +373,6 @@ namespace BTCPayServer.Tests Assert.Contains("Store successfully updated", s.FindAlertMessage().Text); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); var paymentInfo = s.Driver.FindElement(By.Id("PaymentInfo")); Assert.False(paymentInfo.Displayed); Assert.DoesNotContain("This invoice will expire in", paymentInfo.Text); @@ -416,7 +403,6 @@ namespace BTCPayServer.Tests s.GoToHome(); invoiceId = s.CreateInvoice(defaultPaymentMethod: "BTC-LN"); s.GoToInvoiceCheckout(invoiceId); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); Assert.Empty(s.Driver.FindElements(By.CssSelector(".payment-method"))); payUrl = s.Driver.FindElement(By.Id("PayInWallet")).GetAttribute("href"); Assert.StartsWith("bitcoin:", payUrl); @@ -459,7 +445,7 @@ namespace BTCPayServer.Tests var frameElement = s.Driver.FindElement(By.Name("btcpay")); Assert.True(frameElement.Displayed); var iframe = s.Driver.SwitchTo().Frame(frameElement); - iframe.WaitUntilAvailable(By.Id("Checkout-v2")); + iframe.WaitUntilAvailable(By.Id("Checkout")); await s.Server.ExplorerNode.SendToAddressAsync(BitcoinAddress.Create(invoice .GetPaymentPrompt(PaymentTypes.CHAIN.GetPaymentMethodId("BTC")) diff --git a/BTCPayServer.Tests/SeleniumTester.cs b/BTCPayServer.Tests/SeleniumTester.cs index 814f8a42f..af39e462d 100644 --- a/BTCPayServer.Tests/SeleniumTester.cs +++ b/BTCPayServer.Tests/SeleniumTester.cs @@ -468,6 +468,7 @@ retry: Driver.FindElement(By.Id("StoreNav-Invoices")).Click(); Driver.FindElement(By.Id($"invoice-checkout-{invoiceId}")).Click(); CheckForJSErrors(); + Driver.WaitUntilAvailable(By.Id("Checkout")); } public void GoToInvoice(string id) diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index 526702f27..f34eb9d35 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -1301,7 +1301,7 @@ namespace BTCPayServer.Tests var frameElement = s.Driver.FindElement(By.Name("btcpay")); Assert.True(frameElement.Displayed); var iframe = s.Driver.SwitchTo().Frame(frameElement); - iframe.WaitUntilAvailable(By.Id("Checkout-v2")); + iframe.WaitUntilAvailable(By.Id("Checkout")); var closeButton = iframe.FindElement(By.Id("close")); Assert.True(closeButton.Displayed); @@ -1456,7 +1456,7 @@ namespace BTCPayServer.Tests var frameElement = s.Driver.FindElement(By.Name("btcpay")); Assert.True(frameElement.Displayed); var iframe = s.Driver.SwitchTo().Frame(frameElement); - iframe.WaitUntilAvailable(By.Id("Checkout-v2")); + iframe.WaitUntilAvailable(By.Id("Checkout")); IWebElement closebutton = null; TestUtils.Eventually(() => @@ -1498,7 +1498,7 @@ namespace BTCPayServer.Tests var frameElement = s.Driver.FindElement(By.Name("btcpay")); Assert.True(frameElement.Displayed); var iframe = s.Driver.SwitchTo().Frame(frameElement); - iframe.WaitUntilAvailable(By.Id("Checkout-v2")); + iframe.WaitUntilAvailable(By.Id("Checkout")); // Pay full amount s.PayInvoice(); @@ -2607,7 +2607,7 @@ namespace BTCPayServer.Tests // Pay s.Driver.FindElement(By.Id("pay-button")).Click(); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); + s.Driver.WaitUntilAvailable(By.Id("Checkout")); s.Driver.FindElement(By.Id("DetailsToggle")).Click(); s.Driver.WaitForElement(By.Id("PaymentDetails-TotalFiat")); Assert.Contains("1 222,21 €", s.Driver.FindElement(By.Id("PaymentDetails-TotalFiat")).Text); @@ -2662,7 +2662,7 @@ namespace BTCPayServer.Tests // Pay s.Driver.FindElement(By.Id("pay-button")).Click(); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); + s.Driver.WaitUntilAvailable(By.Id("Checkout")); s.Driver.FindElement(By.Id("DetailsToggle")).Click(); s.Driver.WaitForElement(By.Id("PaymentDetails-TotalFiat")); Assert.Contains("4,23 €", s.Driver.FindElement(By.Id("PaymentDetails-TotalFiat")).Text); @@ -2822,7 +2822,7 @@ namespace BTCPayServer.Tests // Check values on checkout page s.Driver.FindElement(By.Id("CartSubmit")).Click(); - s.Driver.WaitUntilAvailable(By.Id("Checkout-v2")); + s.Driver.WaitUntilAvailable(By.Id("Checkout")); s.Driver.FindElement(By.Id("DetailsToggle")).Click(); s.Driver.WaitForElement(By.Id("PaymentDetails-TotalFiat")); Assert.Contains("9,90 €", s.Driver.FindElement(By.Id("PaymentDetails-TotalFiat")).Text); diff --git a/BTCPayServer.Tests/UtilitiesTests.cs b/BTCPayServer.Tests/UtilitiesTests.cs index 402184e12..e7385f49a 100644 --- a/BTCPayServer.Tests/UtilitiesTests.cs +++ b/BTCPayServer.Tests/UtilitiesTests.cs @@ -522,15 +522,7 @@ retry: { var fullPath = Path.Combine(GetFolder(folder), $"{lang}.json"); var proj = "o:btcpayserver:p:btcpayserver"; - string resource; - if (folder == TranslationFolder.CheckoutV1) - { - resource = $"{proj}:r:enjson"; - } - else // file == v2 - { - resource = $"{proj}:r:checkout-v2"; - } + var resource = $"{proj}:r:checkout-v2"; var words = new Dictionary(); if (File.Exists(fullPath)) { diff --git a/BTCPayServer/Controllers/UIHomeController.cs b/BTCPayServer/Controllers/UIHomeController.cs index 14492d6b4..3b06cecab 100644 --- a/BTCPayServer/Controllers/UIHomeController.cs +++ b/BTCPayServer/Controllers/UIHomeController.cs @@ -108,9 +108,7 @@ namespace BTCPayServer.Controllers public IActionResult GetTranslations(string resource, string lang) { string path; - if (resource == "checkout-v1") - path = "locales"; - else if (resource == "checkout-v2") + if (resource.StartsWith("checkout")) path = "locales/checkout"; else return NotFound(); diff --git a/BTCPayServer/Controllers/UIInvoiceController.UI.cs b/BTCPayServer/Controllers/UIInvoiceController.UI.cs index 0c0e24a9a..f2396c1b7 100644 --- a/BTCPayServer/Controllers/UIInvoiceController.UI.cs +++ b/BTCPayServer/Controllers/UIInvoiceController.UI.cs @@ -686,7 +686,8 @@ namespace BTCPayServer.Controllers if (view == "modal") model.IsModal = true; - return View("CheckoutV2", model); + + return View(model); } [HttpGet("invoice-noscript")] @@ -963,10 +964,10 @@ namespace BTCPayServer.Controllers if (storeBlob.PlaySoundOnPayment) { model.PaymentSoundUrl = string.IsNullOrEmpty(storeBlob.SoundFileId) - ? string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout-v2/payment.mp3") + ? string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout/payment.mp3") : await _fileService.GetFileUrl(Request.GetAbsoluteRootUri(), storeBlob.SoundFileId); - model.ErrorSoundUrl = string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout-v2/error.mp3"); - model.NfcReadSoundUrl = string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout-v2/nfcread.mp3"); + model.ErrorSoundUrl = string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout/error.mp3"); + model.NfcReadSoundUrl = string.Concat(Request.GetAbsoluteRootUri().ToString(), "checkout/nfcread.mp3"); } var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds); diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodViewExtension.cs b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodViewExtension.cs index ae31e5dc2..bfcb6e07a 100644 --- a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodViewExtension.cs +++ b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodViewExtension.cs @@ -10,7 +10,7 @@ namespace BTCPayServer.Payments.Bitcoin public void RegisterViews(PaymentMethodViewContext context) { - context.RegisterCheckoutUI(new CheckoutUIPaymentMethodSettings() + context.RegisterCheckoutUI(new CheckoutUIPaymentMethodSettings { ExtensionPartial = "Bitcoin/BitcoinLikeMethodCheckout", CheckoutBodyVueComponentName = "BitcoinLikeMethodCheckout", diff --git a/BTCPayServer/Plugins/NFC/NFCPlugin.cs b/BTCPayServer/Plugins/NFC/NFCPlugin.cs index d632fa1fc..cdbcaa0cc 100644 --- a/BTCPayServer/Plugins/NFC/NFCPlugin.cs +++ b/BTCPayServer/Plugins/NFC/NFCPlugin.cs @@ -15,14 +15,12 @@ namespace BTCPayServer.Plugins.NFC public override void Execute(IServiceCollection applicationBuilder) { + applicationBuilder.AddSingleton(new UIExtension("NFC/CheckoutEnd", + "checkout-end")); applicationBuilder.AddSingleton(new UIExtension("NFC/LNURLNFCPostContent", "checkout-lightning-post-content")); - applicationBuilder.AddSingleton(new UIExtension("NFC/CheckoutEnd", - "checkout-v2-end")); - applicationBuilder.AddSingleton(new UIExtension("NFC/LNURLNFCPostContent-v2", - "checkout-v2-lightning-post-content")); - applicationBuilder.AddSingleton(new UIExtension("NFC/LNURLNFCPostContent-v2", - "checkout-v2-bitcoin-post-content")); + applicationBuilder.AddSingleton(new UIExtension("NFC/LNURLNFCPostContent", + "checkout-bitcoin-post-content")); base.Execute(applicationBuilder); } } diff --git a/BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs b/BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs index 828b545a9..137a32770 100644 --- a/BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs +++ b/BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs @@ -111,7 +111,7 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments public CheckoutUIPaymentMethodSettings GetCheckoutUISettings() { - return new CheckoutUIPaymentMethodSettings() + return new CheckoutUIPaymentMethodSettings { ExtensionPartial = "Bitcoin/BitcoinLikeMethodCheckout", CheckoutBodyVueComponentName = "BitcoinLikeMethodCheckout", diff --git a/BTCPayServer/Services/Altcoins/Zcash/Payments/ZcashLikePaymentMethodHandler.cs b/BTCPayServer/Services/Altcoins/Zcash/Payments/ZcashLikePaymentMethodHandler.cs index 4cc16f6cf..ca122da94 100644 --- a/BTCPayServer/Services/Altcoins/Zcash/Payments/ZcashLikePaymentMethodHandler.cs +++ b/BTCPayServer/Services/Altcoins/Zcash/Payments/ZcashLikePaymentMethodHandler.cs @@ -105,7 +105,7 @@ namespace BTCPayServer.Services.Altcoins.Zcash.Payments public CheckoutUIPaymentMethodSettings GetCheckoutUISettings() { - return new CheckoutUIPaymentMethodSettings() + return new CheckoutUIPaymentMethodSettings { ExtensionPartial = "Bitcoin/BitcoinLikeMethodCheckout", CheckoutBodyVueComponentName = "BitcoinLikeMethodCheckout", diff --git a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout-v2.cshtml b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml similarity index 95% rename from BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout-v2.cshtml rename to BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml index 7ff80626e..ad2e89e2f 100644 --- a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout-v2.cshtml +++ b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml @@ -4,7 +4,7 @@ @model BTCPayServer.Models.InvoicingModels.PaymentModel diff --git a/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout-v2.cshtml b/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout.cshtml similarity index 94% rename from BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout-v2.cshtml rename to BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout.cshtml index 6fa03ca7b..112901f7a 100644 --- a/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout-v2.cshtml +++ b/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckout.cshtml @@ -2,7 +2,7 @@ diff --git a/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml b/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml index 639ddec37..0bbdb46cf 100644 --- a/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml +++ b/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml @@ -1,21 +1,8 @@ - + @if (Env.CheatMode) { } @foreach (var extensionPartial in Model.ExtensionPartials) { - + } @await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-payment", model = Model }) - @await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-v2-end", model = Model }) + @await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-end", model = Model }) diff --git a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml index e43500c3a..eeaf9cc42 100644 --- a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml +++ b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml @@ -156,7 +156,7 @@ @{ var soundUrl = string.IsNullOrEmpty(Model.SoundFileId) - ? string.Concat(Context.Request.GetAbsoluteRootUri().ToString(), "checkout-v2/payment.mp3") + ? string.Concat(Context.Request.GetAbsoluteRootUri().ToString(), "checkout/payment.mp3") : await FileService.GetFileUrl(Context.Request.GetAbsoluteRootUri(), Model.SoundFileId); } diff --git a/BTCPayServer/wwwroot/checkout-v2/checkout.css b/BTCPayServer/wwwroot/checkout/checkout.css similarity index 98% rename from BTCPayServer/wwwroot/checkout-v2/checkout.css rename to BTCPayServer/wwwroot/checkout/checkout.css index c49e87a8e..aacb9abae 100644 --- a/BTCPayServer/wwwroot/checkout-v2/checkout.css +++ b/BTCPayServer/wwwroot/checkout/checkout.css @@ -1,4 +1,4 @@ -#Checkout-v2 { +#Checkout { --wrap-max-width: 400px; } body { @@ -178,7 +178,7 @@ section dl > div dd { @media (max-width: 400px) { /* Pull it up if there's no store header */ - #Checkout-v2 > main.tile:first-child { + #Checkout > main.tile:first-child { margin-top: calc(var(--wrap-padding-vertical) * -1); } } diff --git a/BTCPayServer/wwwroot/checkout-v2/checkout.js b/BTCPayServer/wwwroot/checkout/checkout.js similarity index 99% rename from BTCPayServer/wwwroot/checkout-v2/checkout.js rename to BTCPayServer/wwwroot/checkout/checkout.js index 0e0a60a1f..3c731cb51 100644 --- a/BTCPayServer/wwwroot/checkout-v2/checkout.js +++ b/BTCPayServer/wwwroot/checkout/checkout.js @@ -77,7 +77,7 @@ const PaymentDetails = { function initApp() { return new Vue({ i18n, - el: '#Checkout-v2', + el: '#Checkout', components: { 'payment-details': PaymentDetails, }, diff --git a/BTCPayServer/wwwroot/checkout-v2/error.mp3 b/BTCPayServer/wwwroot/checkout/error.mp3 similarity index 100% rename from BTCPayServer/wwwroot/checkout-v2/error.mp3 rename to BTCPayServer/wwwroot/checkout/error.mp3 diff --git a/BTCPayServer/wwwroot/checkout-v2/nfcread.mp3 b/BTCPayServer/wwwroot/checkout/nfcread.mp3 similarity index 100% rename from BTCPayServer/wwwroot/checkout-v2/nfcread.mp3 rename to BTCPayServer/wwwroot/checkout/nfcread.mp3 diff --git a/BTCPayServer/wwwroot/checkout-v2/payment.mp3 b/BTCPayServer/wwwroot/checkout/payment.mp3 similarity index 100% rename from BTCPayServer/wwwroot/checkout-v2/payment.mp3 rename to BTCPayServer/wwwroot/checkout/payment.mp3