diff --git a/app/config.json b/app/config.json index f85e095978d760cd99c9f8334eac3f9f42315970..7190395741b7a953d91fc9ff5a365e904c4ba1a5 100644 --- a/app/config.json +++ b/app/config.json @@ -1,6 +1,7 @@ { "default": { "cacheTimeMs": 300000, + "demo": false, "fallbackLanguage": "en", "rememberMe": true, "showUDHistory": true, @@ -13,11 +14,11 @@ "expertMode": false, "decimalCount": 2, "httpsMode": false, - "shareBaseUrl": "https://g1.duniter.fr", + "shareBaseUrl": "https://demo.cesium.app", "helptip": { "enable": true, "installDocUrl": { - "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/", + "fr-FR": "https://duniter.org/fr/miner-des-blocs/installer/", "en": "https://duniter.org/en/wiki/duniter/install/" } }, @@ -44,7 +45,19 @@ "port": 443 }, { - "host": "g1.monnaielibreoccitanie.org", + "host": "g1.librelois.fr", + "port": 443 + }, + { + "host": "g1.e-is.pro", + "port": 443 + }, + { + "host": "duniter.moul.re", + "port": 443 + }, + { + "host": "g1.presles.fr", "port": 443 }, { @@ -52,7 +65,11 @@ "port": 443 }, { - "host": "g1.duniter.fr", + "host": "duniter.normandie-libre.fr", + "port": 443 + }, + { + "host": "g1.duniter.org", "port": 443 } ], @@ -64,15 +81,19 @@ "enable": true, "askEnable": true, "useRemoteStorage": true, - "host": "g1.data.duniter.fr", + "host": "g1.data.e-is.pro", "port": 443, "fallbackNodes": [ + { + "host": "g1.data.presles.fr", + "port": 443 + }, { "host": "g1.data.le-sou.org", "port": 443 }, { - "host": "g1.data.duniter.fr", + "host": "g1.data.mithril.re", "port": 443 } ], @@ -89,6 +110,7 @@ "default_fr": { "cacheTimeMs": 300000, + "demo": false, "fallbackLanguage": "fr", "rememberMe": true, "showUDHistory": true, @@ -101,11 +123,11 @@ "expertMode": false, "decimalCount": 2, "httpsMode": false, - "shareBaseUrl": "https://g1.duniter.fr", + "shareBaseUrl": "https://demo.cesium.app", "helptip": { "enable": true, "installDocUrl": { - "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/", + "fr-FR": "https://duniter.org/fr/miner-des-blocs/installer/", "en": "https://duniter.org/en/wiki/duniter/install/" } }, @@ -123,16 +145,28 @@ "maxContentLength": 1300 }, "node": { - "host": "g1.duniter.fr", + "host": "g1.duniter.org", "port": 443 }, "fallbackNodes": [ { - "host": "g1.duniter.fr", + "host": "g1.cgeek.fr", + "port": 443 + }, + { + "host": "g1.librelois.fr", "port": 443 }, { - "host": "g1.monnaielibreoccitanie.org", + "host": "g1.e-is.pro", + "port": 443 + }, + { + "host": "duniter.moul.re", + "port": 443 + }, + { + "host": "g1.presles.fr", "port": 443 }, { @@ -153,15 +187,19 @@ "enable": true, "askEnable": true, "useRemoteStorage": true, - "host": "g1.data.duniter.fr", + "host": "g1.data.e-is.pro", "port": 443, "fallbackNodes": [ + { + "host": "g1.data.presles.fr", + "port": 443 + }, { "host": "g1.data.le-sou.org", "port": 443 }, { - "host": "g1.data.duniter.fr", + "host": "g1.data.mithril.re", "port": 443 } ], @@ -178,6 +216,7 @@ "g1-test": { "cacheTimeMs": 300000, + "demo": false, "fallbackLanguage": "en", "rememberMe": true, "timeout": 300000, @@ -187,16 +226,16 @@ "useRelative": false, "expertMode": true, "decimalCount": 2, - "shareBaseUrl": "https://g1.duniter.fr", + "shareBaseUrl": "https://g1-test.cesium.app", "helptip": { "enable": false, "installDocUrl": { - "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/", - "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md" + "fr-FR": "https://duniter.org/fr/miner-des-blocs/installer/", + "en": "https://duniter.org/en/wiki/duniter/install/" } }, "node": { - "host": "gtest.jytou.fr", + "host": "g1-test.duniter.org", "port": 443 }, "fallbackNodes": [ @@ -209,7 +248,7 @@ "port": 443 }, { - "host": "g1-test.duniter.org", + "host": "ts.gt.elo.tf", "port": 443 } ], @@ -218,7 +257,7 @@ "enable": true, "askEnable": true, "useRemoteStorage": true, - "host": "g1-test.data.duniter.fr", + "host": "g1-test.data.e-is.pro", "port": 443, "notifications": { "txSent": true, @@ -233,6 +272,7 @@ "dev": { "cacheTimeMs": 300000, + "demo": false, "fallbackLanguage": "fr-FR", "defaultLanguage": "fr-FR", "rememberMe": true, @@ -283,7 +323,7 @@ "port": 443 }, { - "host": "g1.data.duniter.fr", + "host": "g1.data.e-is.pro", "port": 443 } ], @@ -298,9 +338,6 @@ "graph": { "enable": true }, - "neo4j": { - "enable": true - }, "rml9": { "enable": true } @@ -309,6 +346,7 @@ "dev_g1": { "cacheTimeMs": 300000, + "demo": false, "fallbackLanguage": "en", "rememberMe": true, "showUDHistory": true, @@ -347,9 +385,6 @@ "graph": { "enable": true }, - "neo4j": { - "enable": true - }, "rml9": { "enable": true } diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 38990fa0f2dee4397bd28fe4d4b039ad447af863..a3a0ca536e964c01710ee53c2845f123154d47e2 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -796,6 +796,7 @@ "REVOCATION_SENT": "Revocation sent successfully", "REVOCATION_SENT_WAITING_PROCESS": "Revocation <b>has been sent successfully</b>. It is awaiting processing.", "FEATURES_NOT_IMPLEMENTED": "This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Functionality not available on this demonstration site.<br/>For <b>security reasons</b> we recommend <b>installing</b> your copy of the software.<br/> Visit the site <a href='https://cesium.app'>www.cesium.app</a> for help.", "EMPTY_TX_HISTORY": "No operations to export" }, "CONFIRM": { diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 458651b15896550cb63a83ff23df439c319a3dbc..e8caad172f8d0e74b387cd108f22bb869f7cfb14 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -796,6 +796,7 @@ "REVOCATION_SENT": "Revocation sent successfully", "REVOCATION_SENT_WAITING_PROCESS": "Revocation <b>has been sent successfully</b>. It is awaiting processing.", "FEATURES_NOT_IMPLEMENTED": "This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Functionality not available on this demonstration site.<br/>For <b>security reasons</b> we recommend <b>installing</b> your copy of the software.<br/> Visit the site <a href='https://cesium.app'>www.cesium.app</a> for help.", "EMPTY_TX_HISTORY": "No operations to export" }, "CONFIRM": { diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index 40f7d7ef817c2152adb3355e9485b143b043eb9f..0ea2c77f7230ee17e304071d94d84cae21bbd6d3 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -887,6 +887,7 @@ "REVOCATION_SENT": "Revocación enviada", "REVOCATION_SENT_WAITING_PROCESS": "La <b>revocación de esta identidad</b> fue solicitada y está en espera de ser procesada.", "FEATURES_NOT_IMPLEMENTED": "Esta funcionalidad todavÃa está en proceso de desarrollo.<br/><br/>¿Por qué no <b>contribuir a Cesium</b>, para obtenerla más rápido? ;)", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Funcionalidad no disponible en este sitio de demostración.<br/>Por <b>razones de seguridad</b> recomendamos <b>instalar</b> su copia del software.<br/>Visite el sitio de Internet <a href='https://cesium.app'> www.cesium.app </a> para obtener ayuda.", "EMPTY_TX_HISTORY": "Ninguna operación a exportar" }, "CONFIRM": { diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 327292f6682e1967af8a64f0c1249e7d8215a16c..a95b73ae72573c2d110699b5ad292ca1bf39960f 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -796,6 +796,7 @@ "REVOCATION_SENT": "Révocation envoyée", "REVOCATION_SENT_WAITING_PROCESS": "La <b>révocation de cette identité</b> a été demandée et est en attente de traitement.", "FEATURES_NOT_IMPLEMENTED": "Cette fonctionnalité est encore en cours de développement.<br/>Pourquoi ne pas <b>contribuer à Cesium</b>, pour l'obtenir plus rapidement ? ;)", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Fonctionnalité non disponible sur ce site de démonstration.<br/>Pour des <b>raisons de sécurité</b> nous vous recommandons <b>d'installer</b> votre copie du logiciel.<br/>Visitez le site <a href='https://cesium.app'>www.cesium.app</a> pour obtenir de l'aide.", "EMPTY_TX_HISTORY": "Aucune opération à exporter" }, "CONFIRM": { diff --git a/www/i18n/locale-it-IT.json b/www/i18n/locale-it-IT.json index a01ec2c4d9cfce9236ad224084ca9bda36a6b0ae..9b016290845c71dee5b6c8a80879cad2c37b7005 100644 --- a/www/i18n/locale-it-IT.json +++ b/www/i18n/locale-it-IT.json @@ -710,6 +710,7 @@ "REVOCATION_SENT": "Revoca dell'identità inviata", "REVOCATION_SENT_WAITING_PROCESS": "Cancellazione dell'identità <b>inviata con successo</b>. In attesa di validazione.", "FEATURES_NOT_IMPLEMENTED": "Questa funzionalità non è ancora disponibile.<br/><br/>Vuoi contribuire per velocizzarne la disponibilità ? ;)", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Funzionalità non disponibile su questo sito dimostrativo.<br/>Per <b>motivi di sicurezza</b> ti consigliamo di <b>installare</b> la tua copia del software.<br/>Visita il sito <a href='https://cesium.app'>www.cesium.app</a> per assistenza.", "EMPTY_TX_HISTORY": "Nessuna operazione da esportare" }, "CONFIRM": { diff --git a/www/i18n/locale-nl-NL.json b/www/i18n/locale-nl-NL.json index d82748ff86ccfe024300310ef103d34ade0ce05d..bc5a3a7131c5f6a54b8d605bf054bd850c22c585 100644 --- a/www/i18n/locale-nl-NL.json +++ b/www/i18n/locale-nl-NL.json @@ -486,7 +486,11 @@ "COPY_TO_CLIPBOARD_DONE": "Kopie geslaagd", "MEMBERSHIP_OUT_SENT": "Opzegging lidmaatschap succesvol verzonden", "NOT_NEED_MEMBERSHIP": "Je bent al lid.", - "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Deze identiteit heeft binnenkort onvoldoende certificaties (ten minste {{willNeedCertificationCount}} nodig)." + "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Deze identiteit heeft binnenkort onvoldoende certificaties (ten minste {{willNeedCertificationCount}} nodig).", + "REVOCATION_SENT": "Intrekking succesvol verzonden", + "REVOCATION_SENT_WAITING_PROCESS": "Intrekking <b>is succesvol verzonden</b>. Het wacht op verwerking.", + "FEATURE_NOT_AVAILABLE_ON_DEMO": "Functionaliteit niet beschikbaar op deze demonstratiesite.<br/>Om <b>veiligheidsredenen</b> raden we u aan uw kopie van de software te <b>installeren</b>.<br/>Bezoek de website <a href='https://cesium.app'>www.cesium.app</a> voor hulp.", + "EMPTY_TX_HISTORY": "Aucune operatie à exporteur" }, "CONFIRM": { "POPUP_TITLE": "<b>Bevestiging</b>", diff --git a/www/js/controllers/login-controllers.js b/www/js/controllers/login-controllers.js index de35b123d088f6dbafd62b28202afddc7993b5db..b6a6c3e91235de1dbfa71de09b0bddb59aca231d 100644 --- a/www/js/controllers/login-controllers.js +++ b/www/js/controllers/login-controllers.js @@ -44,11 +44,17 @@ function LoginController($scope, $timeout, $controller, csWallet) { } function LoginModalController($scope, $timeout, $q, $ionicPopover, $window, CryptoUtils, csCrypto, ionicReady, - UIUtils, BMA, Modals, csSettings, Device, parameters) { + UIUtils, BMA, Modals, csConfig, csSettings, Device, parameters) { 'ngInject'; parameters = parameters || {}; + // Demo mode (=readonly) + if (csConfig.demo === true || csConfig.demo === "true") { + parameters.method = 'PUBKEY'; + parameters.showMethods = false; + } + $scope.computing = false; $scope.pubkey = null; $scope.formData = {}; diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index e9e30024ed82ad774a3ccf74064cdb8022ee4ce4..de235988fde9b724251d176836872e7c5a9f15e5 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -289,6 +289,14 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se }); } + // Disable auth, if demo + if (csConfig.demo === true || csConfig.demo === "true") { + return UIUtils.alert.info('INFO.FEATURE_NOT_AVAILABLE_ON_DEMO') + .then(function() { + throw 'CANCELLED'; + }); + } + if (isAuth() && (!options || !options.forceAuth)) { return $q.when(data); } diff --git a/www/templates/join/modal_choose_account_type.html b/www/templates/join/modal_choose_account_type.html index 9b3056898c6fa1f57f45bfc803a7118c3022757a..c51d27a81b2b89daf0db421d6c1d77cab380681c 100644 --- a/www/templates/join/modal_choose_account_type.html +++ b/www/templates/join/modal_choose_account_type.html @@ -87,20 +87,22 @@ <i class="item-image icon dark ion-card"></i> <h2 translate>ACCOUNT.NEW.WALLET_ACCOUNT</h2> <h4 class="gray" translate>ACCOUNT.NEW.WALLET_ACCOUNT_HELP</h4> - <i class="icon dark ion-ios-arrow-right"></i> </div> + + <h4 ng-if="$root.config.demo" style="color: red !important;"><b class="ion-android-warning"></b> <span translate>INFO.FEATURE_NOT_AVAILABLE_ON_DEMO</span></h4> + <i class="icon dark ion-ios-arrow-right" ng-if="!$root.config.demo"></i> + </div> </button> <!-- member account --> <button class="item item-complex card stable-100-bg item-icon-left item-icon-right ink" ng-click="selectAccountTypeAndClose('member')" ng-disabled="$root.config.demo"> - <div class="item-content item-text-wrap dark"> + <div class="item-content item-text-wrap"> <i class="item-image icon dark ion-person"></i> <h2 translate>ACCOUNT.NEW.MEMBER_ACCOUNT</h2> - - <h4 ng-if="$root.config.demo" style="color: red !important;"><b class="ion-android-warning"></b> <span translate>Not available on this instance</span></h4> - <h4 class="gray" ng-bind-html="'ACCOUNT.NEW.MEMBER_ACCOUNT_HELP'|translate:currency"></h4> + + <h4 ng-if="$root.config.demo" style="color: red !important;"><b class="ion-android-warning"></b> <span translate>INFO.FEATURE_NOT_AVAILABLE_ON_DEMO</span></h4> <i class="icon dark ion-ios-arrow-right" ng-if="!$root.config.demo"></i> </div> </button>