From f2f94568ff9a12195fd66b8dc8373d124a1df409 Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Wed, 20 Sep 2017 16:04:15 +0200
Subject: [PATCH] [enh] Network: display WS2P api

---
 www/js/services/bma-services.js              |  2 ++
 www/templates/network/item_content_peer.html | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js
index d641d2f33..e68ce2c21 100644
--- a/www/js/services/bma-services.js
+++ b/www/js/services/bma-services.js
@@ -29,6 +29,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.
         URI_WITH_PATH: "duniter://([a-zA-Z0-9-.]+.[a-zA-Z0-9-_:.]+)/([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})(?:/([A-Za-z0-9_-]+))?",
         BMA_ENDPOINT: "BASIC_MERKLED_API" + REGEX_ENDPOINT_PARAMS,
         BMAS_ENDPOINT: "BMAS" + REGEX_ENDPOINT_PARAMS,
+        WS2P_ENDPOINT: "WS2P ([0-9a-z]+)"+ REGEX_ENDPOINT_PARAMS,
         BMATOR_ENDPOINT: "BMATOR" + "( ([a-z0-9-_.]+.onion))( ([0-9]+))?"
       },
       errorCodes = {
@@ -349,6 +350,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.
         URI: exact(regexp.URI),
         BMA_ENDPOINT: exact(regexp.BMA_ENDPOINT),
         BMAS_ENDPOINT: exact(regexp.BMAS_ENDPOINT),
+        WS2P_ENDPOINT: exact(regexp.WS2P_ENDPOINT),
         BMATOR_ENDPOINT: exact(regexp.BMATOR_ENDPOINT),
         // TX output conditions
         TX_OUTPUT_SIG: exact(SIG),
diff --git a/www/templates/network/item_content_peer.html b/www/templates/network/item_content_peer.html
index 43663df04..157bd818d 100644
--- a/www/templates/network/item_content_peer.html
+++ b/www/templates/network/item_content_peer.html
@@ -24,12 +24,17 @@
         </h4>
       </div>
       <div class="col col-15 no-padding text-center hidden-xs hidden-sm" ng-if="::expertMode">
-        <div style="min-width: 50px; padding-top: 5px;" >
-          <span ng-if="peer.isSsl()">
-            <i class="ion-locked"></i> <small>SSL</small>
+        <div style="min-width: 50px; padding-top: 5px;" title="SSL">
+          <span ng-if=":rebind:peer.isSsl()">
+            <i class="ion-locked"></i><small class="hidden-md"> SSL</small>
+          </span>
+          <span ng-if=":rebind:peer.hasEndpoint('WS2P')" title="WS2P">
+            <i class="ion-arrow-swap"></i><small class="hidden-md"> WS2P</small>
           </span>
         </div>
-        <div ng-if=":rebind:peer.hasEndpoint('ES_USER_API')" ng-click="showEndpointsPopover($event, peer, 'ES_USER_API')">
+        <div ng-if=":rebind:peer.hasEndpoint('ES_USER_API')"
+             ng-click="showEndpointsPopover($event, peer, 'ES_USER_API')"
+             title="Cesium+">
           <i class="ion-es-user-api"></i>
           <b class="ion-plus dark" style="position: relative; left: -14px; top:-17px; font-size : 16px;"></b>
         </div>
-- 
GitLab