diff --git a/scss/ionic.app.scss b/scss/ionic.app.scss index ec183040eaf33d0ea497a9c091e6da177b3af77c..85fd70c06ecc09f6a3f933513c34a2bf03145ceb 100644 --- a/scss/ionic.app.scss +++ b/scss/ionic.app.scss @@ -163,7 +163,7 @@ $screen-lg: 1200px; } // Small devices: Tablets (≥768px) @media screen and (max-width: $screen-sm-max) and (min-width: $screen-sm){ - .hidden-sm { + .hidden-sm, .row-header.hidden-sm { display: none !important; visibility: hidden !important; } @@ -177,7 +177,7 @@ $screen-lg: 1200px; .badge:empty { display: none !important; } -} + } @media screen and (min-width: $screen-md) { .hidden-sm { display: inherit; @@ -1638,3 +1638,35 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; margin-right: 0px; padding-right: 0px; } + +/********** + Item peer +**********/ + +.ion-es-user-api:before { + content: url('../img/logo.small.cs.dune.svg'); +} + +.row-header{ + border-bottom: solid 1px #ccc !important; + margin: 0px; + min-height: 28px !important; +} + +.col-header{ + text-align: center; + display: block !important; +} + +.col-15 { + -webkit-box-flex: 0; + -webkit-flex: 0 0 15%; + -moz-box-flex: 0; + -moz-flex: 0 0 15%; + -ms-flex: 0 0 15%; + flex: 0 0 15%; + max-width: 15%; +} + + + diff --git a/www/css/style.css b/www/css/style.css index 4c64ccf3389e99298ac53d0d98724c93100fa768..b3d9f3ac0c9c4f704673f3c7364d1a0e14caeb46 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -145,6 +145,7 @@ .peer-item .badge { top: 14px; + right: 6%; } .peer-item:hover .badge.badge-energized, diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index ad00fc2e23ffa1641a70b4e3ffc0b4ee2893382e..63858b1e6bef924225adb938ec8d43059f517216 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -170,7 +170,10 @@ "MIRRORS": "Mirror peers", "PEER_LIST" : "Peer's list", "MEMBERS" : "Member peers", - "ALL_PEERS" : "All peers" + "ALL_PEERS" : "All peers", + "DIFFICULTY" : "Difficulty", + "API" : "API", + "CURRENT_BLOCK" : "Current block" }, "WOT": { "SEARCH_HELP": "Search (member or public key)", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 4b8f44f56fbcb2e639754188e61d8e5cd865da8b..ddc16260d7dc3129c58f7e80b74353d5086ceeb5 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -166,11 +166,14 @@ "PEERS": "Nœuds", "KNOWN_PEERS": "Nœuds connus", "SIGNED_ON_BLOCK": "Signé sur le bloc", - "MIRROR": "mirroir", - "MIRRORS": "Nœuds mirroirs", + "MIRROR": "miroir", + "MIRRORS": "Nœuds miroirs", "PEER_LIST" : "Liste des nœuds", "MEMBERS" : "Nœuds membres", - "ALL_PEERS" : "Tous les nœuds" + "ALL_PEERS" : "Tous les nœuds", + "DIFFICULTY" : "Difficulté", + "API" : "API", + "CURRENT_BLOCK" : "Bloc courant" }, "WOT": { "SEARCH_HELP": "Recherche (pseudo ou clé publique)", diff --git a/www/img/logo.small.cs.dune.svg b/www/img/logo.small.cs.dune.svg new file mode 100644 index 0000000000000000000000000000000000000000..ece13e7657443e178248b75d5718772ad618d5a6 --- /dev/null +++ b/www/img/logo.small.cs.dune.svg @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg width="30px" height="30px" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com"> + <path d="M 390.992 122.276 C 418.209 157.183 434.924 200.278 441.202 248.24 C 441.187 276.711 435.71 305.292 425.308 333.282 C 371.101 416.727 274.951 449.213 167.669 434.279 C 136.406 416.036 109.009 390.076 86.272 358.016 C 67.778 323.794 57.942 284.4 56.489 242.062 C 62.206 199.766 79.617 161.912 106.301 129.617 C 162.524 85.439 239.03 70.181 321.968 82.52 C 345.508 92.535 368.657 105.883 390.992 122.276 Z" style="fill: rgb(255, 255, 255);" bx:origin="0 0"/> + <g transform="matrix(0.517848, 0, 0, 0.517848, -53.306625, -599.931213)" style="opacity: 1;"> + <g id="g-14" style="display: inline; opacity: 0.5;" transform="matrix(1, 0, 0, 1, 144.570724, 1007.099426)"> + <path style="display:inline;fill:#ffd086;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 585.16992,524.91211 C 447.41745,738.84015 285.93093,797.68142 93.347656,801.03711 158.66452,921.84083 287.20038,1003.1698 434.03906,1001.2559 607.56851,998.99446 752.51317,881.18488 796.65234,721.9668 c -2.6864,-6.57764 -6.20106,-13.62037 -10.8164,-21.13477 C 768.68987,677.03878 709.10478,568.47721 585.16992,524.91211 Z" id="path-102"/> + <path style="display:inline;fill:#270b0b;fill-opacity:0.99393939;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 586.254 524.115 C 564.682 650.453 477.974 754.472 498.584 835.602 C 524.648 938.199 419.458 961.515 333.973 989.342 C 365.923 997.545 399.475 1001.706 434.039 1001.256 C 634.052 998.649 796.093 842.536 809.561 646.439 C 793.197 641.777 777.425 634.689 766.723 622.746 C 734.035 586.272 650.117 546.564 586.254 524.115 Z" id="path-103" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(203, 137, 3); fill-opacity: 0.993939; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 586.254 524.115 C 564.682 650.453 477.974 754.472 498.584 835.602 C 524.648 938.199 419.458 961.515 333.973 989.342 C 365.923 997.545 399.475 1001.706 434.039 1001.256 C 634.052 998.649 796.093 842.536 809.561 646.439 C 793.197 641.777 777.425 634.689 766.723 622.746 C 734.035 586.272 650.117 546.564 586.254 524.115 Z" id="path-104" bx:origin="0.5 0.5"/> + </g> + <g id="g-15" style="display: inline; opacity: 0.5;" transform="matrix(1, 0, 0, 1, 144.570724, 1007.099426)"> + <rect x="504.265" y="500.287" width="23.492" height="25.527" style="display:inline;opacity:1;fill:#fabb37;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-105"/> + <rect x="369.174" y="415.429" width="22.384" height="24.419" style="display:inline;opacity:1;fill:#ffd086;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-106"/> + <rect x="418.995" y="433.019" width="30.524" height="30.524" style="display:inline;opacity:1;fill:#fabb37;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-107"/> + <rect x="417.34" y="652.556" width="46.803" height="46.803" style="display:inline;opacity:1;fill:#fbc14c;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-108"/> + <rect x="422.586" y="475.891" width="30.524" height="30.524" style="display:inline;opacity:1;fill:#fabb37;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-109"/> + <rect x="472.618" y="605.457" width="24.419" height="26.454" style="display:inline;opacity:1;fill:#cc8902;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-110"/> + <rect x="520.772" y="557.902" width="18.314" height="18.314" style="display:inline;opacity:1;fill:#fabb37;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-111"/> + <rect x="454.784" y="563.028" width="30.524" height="30.524" style="display:inline;opacity:1;fill:#fabb37;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-112"/> + <rect x="335.342" y="720.987" width="38.663" height="40.698" style="display:inline;opacity:1;fill:#fbc14c;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-113"/> + <rect x="371.97" y="661.975" width="26.454" height="30.524" style="display:inline;opacity:1;fill:#fbc14c;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-114"/> + <rect x="-427.93" y="610.085" width="24.507" height="24.419" style="display:inline;opacity:1;fill:#cc8902;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-115" transform="scale(-1,1)"/> + <rect x="480.411" y="523.469" width="20.349" height="22.384" style="display:inline;opacity:1;fill:#ffd086;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-116"/> + <rect x="-499.5" y="466.314" width="24.507" height="24.419" style="display:inline;opacity:1;fill:#cc8902;fill-opacity:1;stroke:none;stroke-width:34.90000153;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" id="path-117" transform="scale(-1,1)"/> + </g> + <g id="g-16" style="display: inline; opacity: 1;" transform="matrix(1.0000000700020495, 0, 0, 1.0000000700020495, 144.57072391079612, 1007.0994398715994)"> + <path style="display: inline; fill: none; fill-opacity: 1; fill-rule: evenodd; stroke: rgb(255, 122, 0); stroke-width: 2.34888; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 585.16992,524.91211 C 447.41745,738.84015 285.93093,797.68142 93.347656,801.03711 158.66452,921.84083 287.20038,1003.1698 434.03906,1001.2559 607.56851,998.99446 752.51317,881.18488 796.65234,721.9668 c -2.6864,-6.57764 -6.20106,-13.62037 -10.8164,-21.13477 C 768.68987,677.03878 709.10478,568.47721 585.16992,524.91211 Z" id="path-118"/> + <path style="display: inline; fill: none; fill-opacity: 0.993939; fill-rule: evenodd; stroke: rgb(255, 122, 0); stroke-width: 2.34888; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 586.254 524.115 C 564.682 650.453 477.974 754.472 498.584 835.602 C 524.648 938.199 419.458 961.515 333.973 989.342 C 365.923 997.545 399.475 1001.706 434.039 1001.256 C 634.052 998.649 796.093 842.536 809.561 646.439 C 793.197 641.777 777.425 634.689 766.723 622.746 C 734.035 586.272 650.117 546.564 586.254 524.115 Z" id="path-119" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: none; fill-opacity: 0.993939; fill-rule: evenodd; stroke: rgb(255, 122, 0); stroke-width: 2.34888; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 586.254 524.115 C 564.682 650.453 477.974 754.472 498.584 835.602 C 524.648 938.199 419.458 961.515 333.973 989.342 C 365.923 997.545 399.475 1001.706 434.039 1001.256 C 634.052 998.649 796.093 842.536 809.561 646.439 C 793.197 641.777 777.425 634.689 766.723 622.746 C 734.035 586.272 650.117 546.564 586.254 524.115 Z" id="path-120" bx:origin="0.5 0.5"/> + </g> + </g> + <g transform="matrix(0.608261, 0, 0, 0.608261, -20.084976, 3.255736)"> + <g> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.78;" id="path-10" d="M 419.133 85.738 C 417.295 85.739 415.455 85.754 413.611 85.778 C 354.852 86.561 299.023 99.174 248.358 121.32 C 584.121 13.206 796.175 211.26 831.7 508.773 L 846.383 507.124 C 815.586 235.801 652.477 85.588 419.133 85.738 Z" transform="matrix(0.96373, 0.266878, -0.266878, 0.96373, 89.505231, -136.615061)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 1;" id="path-3" d="M 146.037 194.065 C 144.201 194.066 142.361 194.081 140.517 194.104 C 81.76 194.888 25.931 207.503 -24.736 229.648 C 311.029 121.531 523.083 319.583 558.604 617.093 L 573.284 615.443 C 542.49 344.122 379.385 193.913 146.037 194.065 Z" transform="matrix(-0.180988, -0.983485, 0.983485, -0.180988, -39.298581, 705.897544)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.4;" id="path-11" d="M 487.744 193.084 C 485.906 193.085 484.067 193.1 482.223 193.123 C 423.464 193.907 367.635 206.52 316.975 228.668 C 652.726 120.552 864.775 318.605 900.299 616.109 L 914.979 614.46 C 884.184 343.144 721.081 192.935 487.744 193.084 Z" transform="matrix(0.619997, 0.784605, -0.784605, 0.619997, 523.067231, -343.331539)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.84;" id="path-12" d="M 295.969 432.757 C 294.131 432.758 292.293 432.773 290.449 432.797 C 231.688 433.58 175.86 446.194 125.198 468.341 C 460.957 360.226 673.005 558.28 708.526 855.786 L 723.207 854.139 C 692.412 582.819 529.31 432.609 295.969 432.757 Z" transform="matrix(-0.978849, 0.204584, -0.204584, -0.978849, 963.820796, 1116.367293)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.4;" id="path-13" d="M 158.036 148.83 C 156.2 148.833 154.36 148.846 152.516 148.872 C 93.759 149.653 37.93 162.267 -12.734 184.411 C 323.022 76.301 535.076 274.352 570.604 571.857 L 585.286 570.208 C 554.483 298.891 391.38 148.683 158.036 148.83 Z" transform="matrix(0.338614, -0.940926, 0.940926, 0.338614, -115.595158, 483.705984)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 1;" id="path-14" d="M 501.019 288.292 C 499.181 288.293 497.34 288.308 495.496 288.331 C 436.736 289.115 380.908 301.726 330.243 323.874 C 666.004 215.757 878.062 413.812 913.586 711.322 L 928.268 709.673 C 897.468 438.352 734.361 288.141 501.019 288.292 Z" transform="matrix(0.164656, 0.986351, -0.986351, 0.164656, 982.857266, -233.452063)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.4;" id="path-15" d="M 192.954 376.521 C 191.115 376.522 189.277 376.537 187.433 376.561 C 128.674 377.344 72.845 389.958 22.181 412.103 C 357.94 303.989 569.987 502.045 605.505 799.553 L 620.188 797.905 C 589.392 526.584 426.295 376.369 192.954 376.521 Z" transform="matrix(-0.931404, -0.363988, 0.363988, -0.931404, 419.499006, 1182.599809)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 1;" id="path-16" d="M 221.614 63.973 C 219.777 63.976 217.938 63.99 216.094 64.015 C 157.334 64.795 101.506 77.409 50.841 99.554 C 386.598 -8.559 598.651 189.497 634.173 487.001 L 648.854 485.354 C 618.058 214.037 454.954 63.824 221.614 63.973 Z" transform="matrix(0.750452, -0.660925, 0.660925, 0.750452, -70.803322, 290.920273)" bx:origin="0.5 0.5"/> + <path style="display: inline; fill: rgb(64, 178, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; opacity: 0.4;" id="path-17" d="M 441.888 342.098 C 440.047 342.098 438.207 342.114 436.362 342.138 C 377.601 342.922 321.765 355.535 271.103 377.681 C 606.886 269.567 818.944 467.615 854.462 765.133 L 869.142 763.483 C 838.354 492.154 675.242 341.948 441.888 342.098 Z" transform="matrix(-0.356582, 0.934264, -0.934264, -0.356582, 1256.759493, 169.182552)" bx:origin="0.5 0.5"/> + <g transform="matrix(0.762493, 0, 0, 0.762493, 19.294647, -716.322815)"> + <path d="M 566.466 1089.137 L 566.466 1148.222 C 565.867 1148.219 565.267 1148.217 564.667 1148.217 C 561.481 1148.217 558.31 1148.259 555.154 1148.341 L 555.154 1089.137 Z M 908.29 1477.146 L 956.987 1477.146 L 956.987 1488.458 L 908.569 1488.458 C 908.539 1484.693 908.447 1480.922 908.29 1477.146 Z M 566.466 1835.013 L 566.466 1876.467 L 555.154 1876.467 L 555.154 1834.886 C 558.318 1834.973 561.49 1835.017 564.667 1835.017 C 565.267 1835.017 565.867 1835.016 566.466 1835.013 Z M 220.775 1488.458 L 169.657 1488.458 L 169.657 1477.146 L 221.089 1477.146 C 220.921 1480.909 220.816 1484.68 220.775 1488.458 Z" style="fill: rgb(64, 40, 0); stroke: rgb(64, 40, 0); stroke-width: 10.7806;" bx:origin="0 0"/> + <path d="M 760.121 1143.311 L 717.336 1217.417 C 715.72 1216.518 714.096 1215.632 712.465 1214.761 L 755.318 1140.537 Z M 830.122 1324.203 L 900.424 1283.614 L 903.198 1288.417 L 833.04 1328.923 C 832.08 1327.339 831.107 1325.766 830.122 1324.203 Z M 840.599 1641.137 L 903.197 1677.278 L 900.424 1682.082 L 837.911 1645.99 C 838.821 1644.38 839.717 1642.762 840.599 1641.137 Z M 725.168 1761.843 L 760.122 1822.385 L 755.318 1825.158 L 720.379 1764.641 C 721.985 1763.722 723.582 1762.789 725.168 1761.843 Z M 403.538 1760.932 L 366.456 1825.159 L 361.653 1822.386 L 398.802 1758.042 C 400.372 1759.019 401.951 1759.982 403.538 1760.932 Z M 289.58 1642.689 L 221.35 1682.082 L 218.577 1677.279 L 286.944 1637.807 C 287.807 1639.437 288.685 1641.065 289.58 1642.689 Z M 294.354 1332.168 L 218.576 1288.417 L 221.35 1283.614 L 297.213 1327.414 C 296.246 1328.99 295.293 1330.575 294.354 1332.168 Z M 406.079 1220.259 L 361.653 1143.311 L 366.457 1140.537 L 410.889 1217.495 C 409.276 1218.403 407.673 1219.324 406.079 1220.259 Z" style="fill: rgb(64, 40, 0); stroke: rgb(64, 40, 0); stroke-width: 10.7806;" bx:origin="0 0"/> + </g> + </g> + <rect x="429.367" y="425.979" width="20.003" height="21.735" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-91" transform="matrix(1, 0, 0, 0.999999, -301.377075, -219.498434)"/> + <rect x="446.853" y="25.462" width="25.99" height="25.99" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-93"/> + <rect x="-135.956" y="605.141" width="39.851" height="39.851" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-94" transform="matrix(0.999999, 0, 0, 1, 846.176756, -394.956024)"/> + <rect x="225.779" y="689.836" width="25.99" height="25.99" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-95"/> + <rect x="594.013" y="737.142" width="20.792" height="22.525" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-96"/> + <rect x="387.235" y="479.397" width="25.99" height="25.99" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-98" transform="matrix(1.000001, 0, 0, 0.999999, 365.274966, 79.295241)"/> + <rect x="421.962" y="775.937" width="32.92" height="34.653" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-99"/> + <rect x="-66.939" y="-568.978" width="20.867" height="20.792" style="display: inline; opacity: 1; fill: rgb(80, 150, 200); fill-opacity: 1; stroke: none; stroke-width: 34.9; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: 0.996078;" id="path-101" transform="matrix(-1, 0, 0, 0.999997, 31.356928, 984.736306)"/> + </g> + <path d="M 213.903 186.772 C 195.856 186.772 181.61 192.782 171.163 204.802 C 160.723 216.815 155.503 233.269 155.503 254.162 C 155.503 275.649 160.536 292.249 170.603 303.962 C 180.676 315.682 195.033 321.542 213.673 321.542 C 225.126 321.542 238.193 319.482 252.873 315.362 L 252.873 332.092 C 241.493 336.365 227.453 338.502 210.753 338.502 C 186.573 338.502 167.913 331.162 154.773 316.482 C 141.633 301.809 135.063 280.959 135.063 253.932 C 135.063 237.012 138.226 222.189 144.553 209.462 C 150.88 196.735 160.013 186.925 171.953 180.032 C 183.893 173.145 197.95 169.702 214.123 169.702 C 231.343 169.702 246.393 172.849 259.273 179.142 L 251.183 195.532 C 238.756 189.692 226.33 186.772 213.903 186.772 Z M 365.156 302.672 C 365.156 314.125 360.886 322.959 352.346 329.172 C 343.812 335.392 331.832 338.502 316.406 338.502 C 300.086 338.502 287.359 335.919 278.226 330.752 L 278.226 313.452 C 284.139 316.445 290.486 318.805 297.266 320.532 C 304.039 322.252 310.569 323.112 316.856 323.112 C 326.589 323.112 334.076 321.559 339.316 318.452 C 344.562 315.345 347.186 310.609 347.186 304.242 C 347.186 299.455 345.106 295.359 340.946 291.952 C 336.792 288.545 328.689 284.519 316.636 279.872 C 305.182 275.605 297.039 271.882 292.206 268.702 C 287.379 265.522 283.786 261.909 281.426 257.862 C 279.066 253.822 277.886 248.992 277.886 243.372 C 277.886 233.345 281.969 225.429 290.136 219.622 C 298.296 213.822 309.486 210.922 323.706 210.922 C 336.959 210.922 349.912 213.615 362.566 219.002 L 355.946 234.172 C 343.592 229.079 332.399 226.532 322.366 226.532 C 313.532 226.532 306.869 227.915 302.376 230.682 C 297.882 233.455 295.636 237.275 295.636 242.142 C 295.636 245.435 296.479 248.242 298.166 250.562 C 299.846 252.882 302.559 255.092 306.306 257.192 C 310.046 259.285 317.232 262.315 327.866 266.282 C 342.466 271.602 352.329 276.955 357.456 282.342 C 362.589 287.735 365.156 294.512 365.156 302.672 Z" style="fill: rgb(64, 40, 0);" bx:origin="0.5 0.5"/> +</svg> diff --git a/www/js/components.js b/www/js/components.js index 703c0ec0f2bcdbebcde8e9db1172ba9ed0e92ef4..0dcf17ee82fcce0c9f67102a0a2c6278c046274b 100644 --- a/www/js/components.js +++ b/www/js/components.js @@ -18,4 +18,16 @@ angular.module('cesium') }, templateUrl: 'templates/common/badge_certification_count.html' }) + + .component('csSortIcon', { + bindings: { + asc: '=', + sort: '=', + toggle: '<' + }, + template: + '<i class="ion-chevron-up" ng-class="{gray: !$ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative;left : 5px; top:-5px; font-size: 9px;"></i>' + + '<i class="ion-chevron-down" ng-class="{gray : $ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative; left: -2.6px; top: 3px; font-size: 9px;"></i>' + }) + ; diff --git a/www/js/config.js b/www/js/config.js index e7bc63b592aa6ebd09bc8b808ede6ccd50464b9f..e2488deeb4ffa0889a554cf48c78db96ba6bc26e 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -48,4 +48,4 @@ angular.module("cesium.config", []) "newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug" }) -; \ No newline at end of file +; diff --git a/www/js/controllers/network-controllers.js b/www/js/controllers/network-controllers.js index 9d548e2f5a24c0c5eb6df78793fde778e44e09ee..d83b6386b3b5e31faa95c36dbfd48e991b486f84 100644 --- a/www/js/controllers/network-controllers.js +++ b/www/js/controllers/network-controllers.js @@ -37,7 +37,10 @@ function NetworkLookupController($scope, $timeout, $state, $ionicPopover, BMA, U text: '', loading: true, type: undefined, - results: [] + results: [], + endpointFilter: null, + sort : 'uid', + asc: true }; $scope.init = function() { @@ -66,7 +69,12 @@ function NetworkLookupController($scope, $timeout, $state, $ionicPopover, BMA, U csNetwork.start($scope.node, { filter: { member: (!$scope.search.type || $scope.search.type === 'member'), - mirror: (!$scope.search.type || $scope.search.type === 'mirror') + mirror: (!$scope.search.type || $scope.search.type === 'mirror'), + endpointFilter : (angular.isDefined($scope.search.endpointFilter) ? $scope.search.endpointFilter : null) + }, + sort: { + type : $scope.search.sort, + asc : $scope.search.asc } }); @@ -110,6 +118,28 @@ function NetworkLookupController($scope, $timeout, $state, $ionicPopover, BMA, U }; + $scope.toggleSearchEndpoint = function(endpoint){ + $scope.hideActionsPopover(); + if ($scope.search.endpointFilter === endpoint || endpoint === null) { + $scope.search.endpointFilter = null; + } + else { + $scope.search.endpointFilter = endpoint; + } + csNetwork.close(); + $scope.search.loading = true; + $scope.load(); + }; + + $scope.toggleSort = function(sort){ + $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true; + $scope.search.sort = sort; + + csNetwork.close(); + $scope.search.loading = true; + $scope.load(); + }; + $scope.selectPeer = function(peer) { $state.go('app.view_peer', {server: peer.server}); }; @@ -177,6 +207,7 @@ function NetworkLookupModalController($scope, $timeout, $state, $ionicPopover, B parameters = parameters || {}; $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : true; $scope.search.type = angular.isDefined(parameters.type) ? parameters.type : $scope.search.type; + $scope.search.endpointFilter = angular.isDefined(parameters.endpointFilter) ? parameters.endpointFilter : $scope.search.endpointFilter; $scope.ionItemClass = parameters.ionItemClass || 'item-border-large'; diff --git a/www/js/controllers/settings-controllers.js b/www/js/controllers/settings-controllers.js index a584d43f4df5e48ff0f692e0cedd70f8e14af467..5391f095a7a83a11d0a0ac87922a204f5b4bc45b 100644 --- a/www/js/controllers/settings-controllers.js +++ b/www/js/controllers/settings-controllers.js @@ -157,6 +157,7 @@ function SettingsController($scope, $q, $ionicPopup, $timeout, $translate, csHtt return; } var parts = node.split(':'); + parts[1] = parts[1] ? parts[1] : 80; resolve({ host: parts[0], port: parts[1] diff --git a/www/js/entities/peer.js b/www/js/entities/peer.js index fb825740176b2c0bef9e6c4a5552375009966acd..b1bbf882084ca89d8a1ed28d618dfeb9938b896e 100644 --- a/www/js/entities/peer.js +++ b/www/js/entities/peer.js @@ -60,16 +60,18 @@ function Peer(json) { that.getEndpoints = function(regex) { if (!regex) return that.endpoints; - // Use string regex - if (typeof regex === "string") { return that.endpoints.reduce(function(res, ep){ return ep.match(regex) ? res.concat(ep) : res; }, []); - } - // use Regex object - return that.endpoints.reduce(function(res, ep){ - return regex.test(regex) ? res.concat(ep) : res; - }, []); + }; + + that.hasEndpoint = function(endpoint){ + endpoint = '^' + endpoint; + var regExp = new RegExp(endpoint); + var endpoints = that.getEndpoints(regExp); + if (!endpoints.length) return false; + else return true; + }; that.getDns = function() { diff --git a/www/js/services/network-services.js b/www/js/services/network-services.js index a6519d954f817f391d4a9a18f731cb14fd813439..ed997f6c8e9b26aa8c457134511e208de215ae49 100644 --- a/www/js/services/network-services.js +++ b/www/js/services/network-services.js @@ -17,7 +17,11 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se filter: { member: true, mirror: true, - endpointRegex: null + endpointFilter: null + }, + sort:{ + type: null, + asc: true }, knownBlocks: [], mainBuid: null, @@ -36,8 +40,12 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se data.filter = { member: true, mirror: true, - endpointRegex: null + endpointFilter: null }; + data.sort = { + type: null, + asc: true + }, data.memberPeersCount = 0; data.knownBlocks = []; data.mainBuid = null; @@ -145,9 +153,8 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se } // Filter on endpoints - if (data.filter.endpointRegex) { - var endpoints = peer.getEndpoints(data.filter.endpointRegex); - if (!endpoints.length) return false; + if (data.filter.endpointFilter) { + return peer.hasEndpoint(data.filter.endpointFilter); } return true; @@ -347,11 +354,27 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se }); data.peers = _.sortBy(data.peers, function(peer) { var score = 1; + if (data.sort.type === 'api'){ + score += (1000000000 * (peer.hasEndpoint('ES_USER_API')? 1 : 0)); + } + else if (data.sort.type === 'difficulty'){ + score += (1000000000 * (peer.level ? peer.level : 0)); + } + else if (data.sort.type === 'current_block'){ + score += (1000000000 * (peer.currentNumber ? peer.currentNumber : 0)); + } + score += (100000000 * (peer.online ? 1 : 0)); score += (10000000 * (peer.hasMainConsensusBlock ? 1 : 0)); score += (1000 * (peer.hasConsensusBlock ? currents[peer.buid] : 0)); score += (-1 * (peer.uid ? peer.uid.charCodeAt(0) : 999)); // alphabetical order - return -score; + + if (!data.sort.asc) { + return score; + } + else { + return -score; + } }); // Raise event on new main block @@ -408,6 +431,7 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se close(); data.bma = bma ? bma : BMA; data.filter = options.filter; + data.sort = options.sort; console.info('[network] Starting network [{0}] filetered on [{1}]'.format(bma.node.server, data.filter ? data.filter : 'none')); var now = new Date(); diff --git a/www/plugins/es/js/controllers/settings-controllers.js b/www/plugins/es/js/controllers/settings-controllers.js index b50885a5e642e0d3dbe993fc3e95fc14f7e2abf8..be768c7f44034cf39a3065d5e4ea606f597b5689 100644 --- a/www/plugins/es/js/controllers/settings-controllers.js +++ b/www/plugins/es/js/controllers/settings-controllers.js @@ -135,6 +135,7 @@ function ESPluginSettingsController ($scope, $q, $translate, $ionicPopup, UIUti return; } var parts = node.split(':'); + parts[1] = parts[1] ? parts[1] : 80; resolve({ host: parts[0], port: parts[1] || 80 diff --git a/www/templates/network/items_peers.html b/www/templates/network/items_peers.html index 780b58bb34d506ab1545cd7d4a18d121d39c7ce2..ce215df55131f0b6d0e57d5b1fac94eff0d666c5 100644 --- a/www/templates/network/items_peers.html +++ b/www/templates/network/items_peers.html @@ -1,4 +1,22 @@ - + <div class="item row row-header hidden-xs hidden-sm"> + <a class="col col-header no-padding dark" ng-click="toggleSort('uid')"> + <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'uid'"></cs-sort-icon> + {{'COMMON.UID' | translate}} + </a> + <a class="col col-15 col-header no-padding dark" ng-click="toggleSort('api')"> + <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'api'"></cs-sort-icon> + {{'PEER.API' | translate}} + </a> + <a class="no-padding dark hidden-xs hidden-sm hidden-md col col-20 col-header" + ng-click="toggleSort('difficulty')" ng-if="settings.expertMode"> + <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'difficulty'"></cs-sort-icon> + {{'PEER.DIFFICULTY' | translate}} + </a> + <a class="col col-20 col-header no-padding dark" ng-click="toggleSort('current_block')"> + <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'current_block'"></cs-sort-icon> + {{'PEER.CURRENT_BLOCK' | translate}} + </a> + </div> <div ng-repeat="peer in search.results track by peer.id" class="item peer-item item-icon-left {{::ionItemClass}}" @@ -13,14 +31,18 @@ <h3><i ng-class="{'ion-person': peer.uid, 'ion-key': !peer.uid}"></i> <span>{{peer.uid || peer.pubkey.substr(0,8)}}</span> <span class="gray">{{peer.dns && ' | ' + peer.dns}}</span></h3> <h4>{{peer.server}}</h4> </div> - <div class="col col-10 no-padding" ng-if="settings.expertMode"> + <div class="col col-15 no-padding text-center" ng-if="peer.hasEndpoint('ES_USER_API')"> + <i class="ion-es-user-api"></i> + <b class="ion-plus gray" style="position: relative; left: -14px; top:-17px; font-size : 14px;"></b> + </div> + <div class="col col-20 no-padding text-center" ng-if="settings.expertMode"> <h3 class="hidden-sm hidden-xs hidden-md"> <span ng-if="peer.uid"><i class="ion-lock-combination"></i> {{peer.difficulty}}</span> <span ng-if="!peer.uid" translate>PEER.MIRROR</span> </h3> <h4 class="hidden-sm hidden-xs hidden-md gray">v{{peer.version}}</h4> </div> - <div class="col col-20 no-padding"> + <div class="col col-20 no-padding text-center"> <span id="helptip-currency-peer-{{$index}}-block" class="badge" ng-class="{ 'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock }">{{peer.currentNumber}}</span> </div>