From d3f5576570acfb54f48dba24132d7e271f0342e7 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Mon, 27 Mar 2023 16:40:50 +0200 Subject: [PATCH] Remove store integrations list page (#4816) Co-authored-by: d11n --- .../UIStoresController.Integrations.cs | 6 --- BTCPayServer/Hosting/BTCPayServerServices.cs | 2 - BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs | 2 - .../LNURL/LightningAddressOption.cshtml | 47 ------------------- .../Shopify/StoreIntegrationsList.cshtml | 45 ------------------ BTCPayServer/Views/UIStores/Plugins.cshtml | 32 ------------- BTCPayServer/Views/UIStores/StoreNavPages.cs | 1 + BTCPayServer/Views/UIStores/_Nav.cshtml | 1 - 8 files changed, 1 insertion(+), 135 deletions(-) delete mode 100644 BTCPayServer/Views/Shared/LNURL/LightningAddressOption.cshtml delete mode 100644 BTCPayServer/Views/Shared/Shopify/StoreIntegrationsList.cshtml delete mode 100644 BTCPayServer/Views/UIStores/Plugins.cshtml diff --git a/BTCPayServer/Controllers/UIStoresController.Integrations.cs b/BTCPayServer/Controllers/UIStoresController.Integrations.cs index b3338847c..dc5c6cbe6 100644 --- a/BTCPayServer/Controllers/UIStoresController.Integrations.cs +++ b/BTCPayServer/Controllers/UIStoresController.Integrations.cs @@ -16,12 +16,6 @@ namespace BTCPayServer.Controllers { public partial class UIStoresController { - [HttpGet("{storeId}/plugins")] - public IActionResult Plugins() - { - return View("Plugins", new PluginsViewModel()); - } - private async Task LastDeliveryForWebhook(string webhookId) { return (await _Repo.GetWebhookDeliveries(CurrentStore.Id, webhookId, 1)).ToList().FirstOrDefault(); diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index f40aed70f..33f3e22b2 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -380,8 +380,6 @@ namespace BTCPayServer.Hosting services.AddSingleton(provider => provider.GetService()); services.AddSingleton(new UIExtension("LNURL/LightningAddressNav", "store-integrations-nav")); - services.AddSingleton(new UIExtension("LNURL/LightningAddressOption", - "store-integrations-list")); services.AddSingleton(); services.AddSingleton(); diff --git a/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs b/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs index b34229faa..447082cc0 100644 --- a/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs +++ b/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs @@ -15,8 +15,6 @@ namespace BTCPayServer.Plugins.Shopify public override void Execute(IServiceCollection applicationBuilder) { applicationBuilder.AddSingleton(); - applicationBuilder.AddSingleton(new UIExtension("Shopify/StoreIntegrationsList", - "store-integrations-list")); base.Execute(applicationBuilder); } } diff --git a/BTCPayServer/Views/Shared/LNURL/LightningAddressOption.cshtml b/BTCPayServer/Views/Shared/LNURL/LightningAddressOption.cshtml deleted file mode 100644 index 89a695d7f..000000000 --- a/BTCPayServer/Views/Shared/LNURL/LightningAddressOption.cshtml +++ /dev/null @@ -1,47 +0,0 @@ -@inject BTCPayNetworkProvider BTCPayNetworkProvider -@{ - const string cryptoCode = "BTC"; - var store = Context.GetStoreData(); - var isLightningEnabled = store.IsLightningEnabled(BTCPayNetworkProvider, cryptoCode); - var isLNUrlEnabled = store.IsLNUrlEnabled(BTCPayNetworkProvider, cryptoCode); -} - -
  • -
    - - - Lightning Address - - - - - - - @switch (isLightningEnabled) - { - case true when isLNUrlEnabled: - - Setup - - break; - case false: - - - - You need to setup Lightning first - - - break; - default: - - - - You need LNURL configured first - - - break; - } - -
    -
  • - diff --git a/BTCPayServer/Views/Shared/Shopify/StoreIntegrationsList.cshtml b/BTCPayServer/Views/Shared/Shopify/StoreIntegrationsList.cshtml deleted file mode 100644 index 43b8b30d5..000000000 --- a/BTCPayServer/Views/Shared/Shopify/StoreIntegrationsList.cshtml +++ /dev/null @@ -1,45 +0,0 @@ -@using BTCPayServer.Plugins.Shopify -@{ - var shopify = Context.GetStoreData().GetStoreBlob().GetShopifySettings(); - - var shopifyCredsSet = shopify?.IntegratedAt.HasValue is true; - var shopifyUrl = shopify?.ShopifyUrl; -} -
  • -
    - - - Shopify - - - - - - @shopifyUrl - - - - @if (shopifyCredsSet) - { - - - Enabled - - | - - Modify - - } - else - { - - - Disabled - - - Setup - - } - -
    -
  • diff --git a/BTCPayServer/Views/UIStores/Plugins.cshtml b/BTCPayServer/Views/UIStores/Plugins.cshtml deleted file mode 100644 index 472560b1e..000000000 --- a/BTCPayServer/Views/UIStores/Plugins.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model PluginsViewModel -@{ - Layout = "../Shared/_NavLayout.cshtml"; - ViewData.SetActivePage(StoreNavPages.Plugins, "Plugins", Context.GetStoreData().Id); -} - -
    -
    -

    @ViewData["Title"]

    - @if (!ViewContext.ModelState.IsValid) - { -
    - } - -
      - -
    - -

    Integrations

    -

    Take a look at documentation for the list of integrations we support and the directions on how to enable them:

    - -
    -
    - -@section PageFootContent { - -} diff --git a/BTCPayServer/Views/UIStores/StoreNavPages.cs b/BTCPayServer/Views/UIStores/StoreNavPages.cs index 95a8f7bc3..e5f751958 100644 --- a/BTCPayServer/Views/UIStores/StoreNavPages.cs +++ b/BTCPayServer/Views/UIStores/StoreNavPages.cs @@ -15,6 +15,7 @@ namespace BTCPayServer.Views.Stores Tokens, Users, PayButton, + [Obsolete("Use custom categories for your plugin/integration instead")] Plugins, Webhooks, PullPayments, diff --git a/BTCPayServer/Views/UIStores/_Nav.cshtml b/BTCPayServer/Views/UIStores/_Nav.cshtml index 059db2938..f36fc6c7e 100644 --- a/BTCPayServer/Views/UIStores/_Nav.cshtml +++ b/BTCPayServer/Views/UIStores/_Nav.cshtml @@ -14,7 +14,6 @@ Checkout Appearance Access Tokens Users - Plugins Webhooks Payout Processors Emails