diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index 61a508eef..524524131 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -312,7 +312,7 @@ namespace BTCPayServer.Tests await s.StartAsync(); var alice = s.RegisterNewUser(); var storeData = s.CreateNewStore(); - var onchainHint = "A store requires a wallet to receive payments. Set up your wallet."; + var onchainHint = "Set up your wallet to receive payments at your store."; var offchainHint = "A connection to a Lightning node is required to receive Lightning payments."; // verify that hints are displayed on the store page @@ -324,12 +324,13 @@ namespace BTCPayServer.Tests "Warning hint on list not present"); s.GoToStore(storeData.storeId); + Assert.True(s.Driver.PageSource.Contains(onchainHint), "Wallet hint should be present at this point"); + Assert.True(s.Driver.PageSource.Contains(offchainHint), "Lightning hint should be present at this point"); + s.AddDerivationScheme(); // wallet hint should be dismissed s.Driver.AssertNoError(); Assert.False(s.Driver.PageSource.Contains(onchainHint), - "Wallet hint not dismissed on derivation scheme add"); - - s.Driver.FindElement(By.Id("dismissLightningHint")).Click(); // dismiss lightning hint + "Wallet hint not dismissed on derivation scheme add");// dismiss lightning hint Assert.Contains(storeData.storeName, s.Driver.PageSource); var storeUrl = s.Driver.Url; diff --git a/BTCPayServer/Controllers/StoresController.cs b/BTCPayServer/Controllers/StoresController.cs index 886233820..69d4406c5 100644 --- a/BTCPayServer/Controllers/StoresController.cs +++ b/BTCPayServer/Controllers/StoresController.cs @@ -996,29 +996,5 @@ namespace BTCPayServer.Controllers storeId = CurrentStore.Id }); } - - [HttpPost] - [Route("{storeId}/dismissHint")] - [IgnoreAntiforgeryToken] - public async Task DismissHint(string id) - { - var blob = CurrentStore.GetStoreBlob(); - if (id == "Wallet" || id == "Lightning") - { - try - { - var prop = blob.Hints.GetType().GetProperty(id); - prop.SetValue(blob.Hints, false); - } - // disregard parse errors - catch { } - - if (CurrentStore.SetStoreBlob(blob)) - { - await _Repo.UpdateStore(CurrentStore); - } - } - return Content("ack"); - } } } diff --git a/BTCPayServer/Views/Stores/UpdateStore.cshtml b/BTCPayServer/Views/Stores/UpdateStore.cshtml index 535a9426a..de452ee72 100644 --- a/BTCPayServer/Views/Stores/UpdateStore.cshtml +++ b/BTCPayServer/Views/Stores/UpdateStore.cshtml @@ -19,33 +19,21 @@
-

- Wallet - On-chain payments -

+

Wallet

@if (Model.HintWallet) { -
- -

- A store requires a wallet to receive payments. Set up your wallet. -

- -
+

Set up your wallet to receive payments at your store.

}
    @foreach (var scheme in Model.DerivationSchemes.OrderBy(scheme => scheme.Collapsed)) { -
  • -
    - - @scheme.Crypto +
  • +
    + + @scheme.Crypto @if (!string.IsNullOrWhiteSpace(scheme.Value)) { - | - + @scheme.Value @@ -59,7 +47,6 @@ @if (scheme.WalletSupported) { - | Wallet } } @@ -79,7 +66,11 @@ Disabled } - + @if (scheme.Enabled) + { + | + } + @(scheme.Enabled ? "Modify" : "Setup") @@ -102,33 +93,21 @@
    -

    - Lightning - Off-chain payments -

    +

    Lightning

    @if (Model.HintLightning) { -
    - -

    - A connection to a Lightning node is required to receive Lightning payments. -

    - -
    +

    A connection to a Lightning node is required to receive Lightning payments.

    }
      @foreach (var scheme in Model.LightningNodes) { -
    • -
      - - @scheme.CryptoCode +
    • +
      + + @scheme.CryptoCode @if (!string.IsNullOrWhiteSpace(scheme.Address)) { - | - @scheme.Address + @scheme.Address } @@ -146,7 +125,11 @@ Disabled } - + @if (scheme.Enabled) + { + | + } + @(scheme.Enabled ? "Modify" : "Setup") diff --git a/BTCPayServer/Views/Stores/_Nav.cshtml b/BTCPayServer/Views/Stores/_Nav.cshtml index 7c9416d4f..43ae7b24b 100644 --- a/BTCPayServer/Views/Stores/_Nav.cshtml +++ b/BTCPayServer/Views/Stores/_Nav.cshtml @@ -9,13 +9,3 @@ Webhooks
      - - diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 0655b58e0..c10cba36f 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -62,6 +62,10 @@ ul li { padding-bottom: .2em; } +.bg-tile { + background-color: var(--btcpay-bg-tile); +} + .navbar .onion { margin-right: auto; }