diff --git a/BTCPayServer/Views/Server/ListPlugins.cshtml b/BTCPayServer/Views/Server/ListPlugins.cshtml index 1caa7ad07..6588587eb 100644 --- a/BTCPayServer/Views/Server/ListPlugins.cshtml +++ b/BTCPayServer/Views/Server/ListPlugins.cshtml @@ -5,7 +5,7 @@ @{ ViewData.SetActivePageAndTitle(ServerNavPages.Plugins); var installed = Model.Installed.ToDictionary(plugin => plugin.Identifier.ToLowerInvariant(), plugin => plugin.Version); - var availableAndNotInstalled = Model.Available.Where(plugin => !installed.ContainsKey(plugin.Identifier.ToLowerInvariant())).Select(plugin => (plugin, BTCPayServerOptions.RecommendedPlugins.Contains(plugin.Identifier.ToLowerInvariant()))).OrderBy(tuple => tuple.Item1); + var availableAndNotInstalled = Model.Available.Where(plugin => !installed.ContainsKey(plugin.Identifier.ToLowerInvariant())).Select(plugin => (plugin, BTCPayServerOptions.RecommendedPlugins.Contains(plugin.Identifier.ToLowerInvariant()))).OrderBy(tuple => tuple.Item1); bool DependentOn(string plugin) { @@ -83,15 +83,18 @@ { return false; } - ; } return true; } - } + + @if (Model.Commands.Any()) {
@@ -113,50 +116,44 @@ { var matchedAvailable = Model.Available.SingleOrDefault(availablePlugin => availablePlugin.Identifier == plugin.Identifier); var updateAvailable = !plugin.SystemPlugin && matchedAvailable != null && plugin.Version < matchedAvailable.Version; + var tabId = plugin.Identifier.ToLowerInvariant().Replace(".", "_");
-
-
-

@plugin.Name

-
- - @plugin.Version - @if (plugin.SystemPlugin) - { -
System plugin
- } - else if (updateAvailable) - { -
@matchedAvailable.Version available
- } -
-
+

@plugin.Name

+
+
+ @plugin.Version + @if (plugin.SystemPlugin) + { +
System plugin
+ } + else if (updateAvailable) + { +
+ @matchedAvailable.Version available +
+ } +
@if (updateAvailable) { - + + Show current version + Show update information + }
-
-
+

@plugin.Description

- @if (plugin.Dependencies.Any()) { -
Dependencies
+
Dependencies
    @foreach (var dependency in plugin.Dependencies) { -
  • +
  • @dependency @if (!DependencyMet(dependency)) { @@ -170,16 +167,15 @@ @if (updateAvailable) { -
    +

    @matchedAvailable.Description

    - @if (matchedAvailable.Dependencies.Any()) { -
    Dependencies
    +
    Dependencies
      @foreach (var dependency in matchedAvailable.Dependencies) { -
    • +
    • @dependency @if (!DependencyMet(dependency)) { @@ -241,23 +237,22 @@
      -

      @plugin.Name

      -
      - @plugin.Version +

      @plugin.Name

      +
      + @plugin.Version @if (pluginT.Item2) { - Recommended +
      Recommended
      }

      @plugin.Description

      @if (plugin.Dependencies?.Any() is true) { -
      Dependencies
      +
      Dependencies
        - @foreach (var dependency in plugin.Dependencies) { -
      • +
      • @dependency @if (!DependencyMet(dependency)) { @@ -286,9 +281,9 @@ } else { - - Cannot install until dependencies are met - +
        + Cannot install until dependencies are met. +
        }