diff --git a/dist/desktop b/dist/desktop index 2667bc6efab8ae2393ab57f330c33f7dedf99fe2..d3566be2a5ef91861237252626305221bde1d7a8 160000 --- a/dist/desktop +++ b/dist/desktop @@ -1 +1 @@ -Subproject commit 2667bc6efab8ae2393ab57f330c33f7dedf99fe2 +Subproject commit d3566be2a5ef91861237252626305221bde1d7a8 diff --git a/doc/development_guide.md b/doc/development_guide.md index 6f53040be77c209bb75ba4b0a0a68a83b3dbab3d..2eb3090581941910c6e68e44509ba64571ad31b1 100644 --- a/doc/development_guide.md +++ b/doc/development_guide.md @@ -39,7 +39,7 @@ If you are using fish shell, there is a [dedicated plugin](https://github.com/jo - Installing Cordova plugins (need for platforms specific builds) ``` - ionic state restore + ionic cordova preapre ``` - This should create a new directory `platforms/android` diff --git a/doc/fr/development_tutorial-03-android.md b/doc/fr/development_tutorial-03-android.md index 779fc0243404af2ad18ee5120786f1f8b9cde3a1..84e076ddb40b54664789d20a7e8f41eab5414e65 100644 --- a/doc/fr/development_tutorial-03-android.md +++ b/doc/fr/development_tutorial-03-android.md @@ -119,14 +119,14 @@ node --version Si vous n'êtes pas sur une v6, utilisez la commande ``` -nvm use 6 +nvm use 10 ``` Vous pouvez maintenant lancer l'instalaltion du projet Cesium pour Android : ``` -ionic state restore +ionic cordova prepare ``` Normalement, cette commande devrait initialiser (entre autre) un répertoire `platforms/android`. diff --git a/hooks/before_prepare/02_jshint.js b/hooks/before_prepare/02_jshint.js index bb78f76629ee162d366428147ecc61b0a110e8d7..e25f68753a5f3577072173b8562384a74647259f 100755 --- a/hooks/before_prepare/02_jshint.js +++ b/hooks/before_prepare/02_jshint.js @@ -15,20 +15,22 @@ const jsFolders = glob.sync("www/**/*.js", {nonull: true}) .map(file => file.substring(0, file.lastIndexOf('/'))) // Reduce to a map of folders .reduce((res, folder) => { - if (folder.indexOf('www/dist/') !== -1 || // Exclude dist js folder.indexOf('/plugins/rml') !== -1 || // Exclude plugin tutorial - folder.indexOf('/vendor') // exclude vendor libs - ) return res; + folder.indexOf('www/js/vendor') || // exclude vendor libs + folder.indexOf('www/lib') // exclude www/lib + ) { + return res; + } res[folder] = res[folder] || true; return res; }, {}); // Process each folder with Js file Object.keys(jsFolders).forEach(folder => processFiles(folder)); - function processFiles(dir) { let errorCount = 0; + log(colors.grey('Processing folder ' + folder + '...')); fs.readdir(dir, function(err, list) { if (err) { log(colors.red('processFiles err: ' + err)); @@ -36,6 +38,7 @@ function processFiles(dir) { } async.eachSeries(list, function(file, innercallback) { file = dir + '/' + file; + log(colors.grey('Processing file ' + file + '...')); fs.stat(file, function(err, stat) { if(!stat.isDirectory()) { if(path.extname(file) === ".js") { @@ -54,8 +57,12 @@ function processFiles(dir) { }); }, function(error) { if(errorCount > 0) { + log(colors.red('KO Error ')); process.exit(1); } + else { + log(colors.red('OK NO Error ')); + } }); }); } diff --git a/resources/android/build/gradle/wrapper/gradle-wrapper.properties b/resources/android/build/gradle/wrapper/gradle-wrapper.properties index 4cde7d5f5e5e29fef6e85ef10908e13cb1b43e19..ddb3e1024ce810a0ed5e3707cbcaf77801c61f17 100644 --- a/resources/android/build/gradle/wrapper/gradle-wrapper.properties +++ b/resources/android/build/gradle/wrapper/gradle-wrapper.properties @@ -1 +1 @@ -distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https://services.gradle.org/distributions/gradle-4.10.3-all.zip diff --git a/scss/ionic.app.scss b/scss/ionic.app.scss index c0761620bdf572fbb11bf41fd8a80f081267c4d7..823a5c7b64a2fc505b1c76d5eeea57f5e4649d6c 100644 --- a/scss/ionic.app.scss +++ b/scss/ionic.app.scss @@ -196,6 +196,9 @@ $screen-menu: $screen-sm; .button.hidden-sm { display: flex; } + .button.button-icon.hidden-sm { + display: inline-block; + } .pull-right, .pull-left { .button.hidden-sm { @@ -417,7 +420,7 @@ $screen-menu: $screen-sm; } .item-actions { - min-height: 47px !important; + min-height: 65px !important; } .item-closeable:hover { @@ -846,7 +849,7 @@ html, body { .bar.bar-header { padding-right: 5px !important; - .buttons-right span { + .buttons-right .right-buttons { margin-left: 0 !important; } } @@ -2195,7 +2198,7 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; height: 35px; width: 35px; position: relative; - left: 0; + left: 4px; top: 4px; border: solid 1px #D9D9D9; } @@ -2211,6 +2214,33 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; left: 0; top: 6px; } + +} + +.bar-header .button-clear.button-peer { + display: block; + height: 44px; + padding-top: 6px; + padding-bottom: 6px; + margin: 0; + + * { + height: 32px; + line-height: 32px; + } +} + +// Locale flags +.bar-header .button.flag { + height: 44px; + padding-top: 6px; + padding-bottom: 6px; + img { + position: relative; + bottom: 0; + width: 32px !important; + height: 32px !important; + } } .list { diff --git a/www/css/style.css b/www/css/style.css index 7f6bd56b27160896c2cd308486e67b15260b29c6..2f51cd6b878ccd899b51fb7d38300b2daf68021a 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -38,7 +38,9 @@ min-width: 44px !important; max-width: 90px !important; } -.bar .button.button-clear:first-child { + +.bar.bar-header .left-buttons > .button.button-clear:first-child, +.bar.bar-header > .button.button-clear:first-child { margin-left: 5px; } diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 3e9c1021c5846fce834136c8f88195e7371161c8..a9abc03c90e8c697fb976982d6844bbf6a3b2b53 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -146,6 +146,7 @@ "USE_WALLETS_ENCRYPTION": "Secure the list", "USE_WALLETS_ENCRYPTION_HELP": "Enables you to encrypt the list of your wallets. Authentication required to access it.", "ENABLE_HELPTIP": "Enable contextual help tips", + "DISABLE_HELPTIP": "Disable contextual help tips", "ENABLE_UI_EFFECTS": "Enable visual effects", "HISTORY_SETTINGS": "Account operations", "DISPLAY_UD_HISTORY": "Display produced dividends?", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index ba308cb36ceb7502daeae653fe4321b7be4fd164..7c541cba2f8c5583e924afbe284500d2f20799c2 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -146,6 +146,7 @@ "USE_WALLETS_ENCRYPTION": "Sécuriser la liste ?", "USE_WALLETS_ENCRYPTION_HELP": "Permet de sécuriser la liste de vos portefeuilles (par chiffrement), en exigeant une authentification pour y accéder.", "ENABLE_HELPTIP": "Activer les bulles d'aide contextuelles", + "DISABLE_HELPTIP": "Désactiver les bulles d'aide contextuelles", "ENABLE_UI_EFFECTS": "Activer les effets visuels", "HISTORY_SETTINGS": "Mes opérations", "DISPLAY_UD_HISTORY": "Afficher les dividendes produits ?", diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index 2513603e999138f7cb0b2a19e4e91d9dfdb72167..883138c6009745e3ca232eec29b57679242f87fd 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -296,7 +296,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic .then(function (confirm) { if (!confirm) return false; // stop the loop - that.clearAllCache(); + that.cleanCache(); that.init(fallbackNode.host, fallbackNode.port, fallbackNode.useSsl || fallbackNode.port == 443); diff --git a/www/templates/api/home.html b/www/templates/api/home.html index f838f5028aba086a5c82b683ac3ef536bd1067ac..017cf794a8d878d9fc3545b42d0a2a27d4abd899 100644 --- a/www/templates/api/home.html +++ b/www/templates/api/home.html @@ -5,12 +5,10 @@ <ion-nav-buttons side="right"> <!-- locales --> - <button class="button button-clear hidden-xs hidden-sm gray" + <button class="button button-clear hidden-xs hidden-sm flag" ng-click="showLocalesPopover($event)" style="align-content: center"> - <img ng-if="$root.settings.locale.country" - ng-src="https://www.countryflags.io/{{$root.settings.locale.country}}/shiny/32.png"> - <span ng-if="!$root.settings.locale.country">{{$root.settings.locale.label}} </span> - <small class="ion-arrow-down-b"></small> + <img ng-src="../img/flag-{{$root.settings.locale.flag}}.png"/> + <b class="icon-secondary ion-arrow-down-b gray"></b> </button> </ion-nav-buttons> diff --git a/www/templates/home/home.html b/www/templates/home/home.html index 8b9ae2a990ea8ab544b5f27829e7a1b54b7a7b7b..eef204bc4bd1c5a16baf477193d05c5c7cbbb840 100644 --- a/www/templates/home/home.html +++ b/www/templates/home/home.html @@ -1,13 +1,13 @@ -<ion-view id="home" class=""> +<ion-view id="home"> <!-- no title --> <ion-nav-title></ion-nav-title> <ion-nav-buttons side="secondary" > <!-- locales --> - <button class="button button-icon button-clear hidden-xs hidden-sm gray" + <button class="button button-clear hidden-xs hidden-sm flag" ng-click="showLocalesPopover($event)" style="align-content: center"> - <img ng-src="img/flag-{{:locale:$root.settings.locale.flag}}.png"/> - <small class="ion-arrow-down-b"></small> + <img ng-src="./img/flag-{{$root.settings.locale.flag}}.png"/> + <b class="ion-arrow-down-b gray"></b> </button> </ion-nav-buttons> @@ -82,7 +82,7 @@ <span ng-bind-html="'HOME.NOT_YOUR_ACCOUNT_QUESTION'|translate:{pubkey: walletData.pubkey}"></span> <br/> <b> - <a class="assertive hidden-xs hidden-sm" ng-click="logout()" translate> + <a class="assertive" ng-click="logout({askConfirm: true})" translate> HOME.BTN_CHANGE_ACCOUNT </a> </b> @@ -91,9 +91,6 @@ <button type="button" class="button button-block button-stable button-raised ink visible-xs visible-sm" ui-sref="app.view_wallet" ng-if="!login" translate>COMMON.BTN_LOGIN</button> - <button type="button" - class="button button-block button-assertive button-raised icon icon-left ion-log-out ink-dark visible-xs visible-sm" - ng-click="logout()" ng-if="login" translate>COMMON.BTN_LOGOUT</button> <div class="text-center no-padding visible-xs stable"> diff --git a/www/templates/home/locales_popover.html b/www/templates/home/locales_popover.html new file mode 100644 index 0000000000000000000000000000000000000000..bda9e04de75ee75e18846ea46512d1c357c481e8 --- /dev/null +++ b/www/templates/home/locales_popover.html @@ -0,0 +1,15 @@ +<ion-popover-view class="fit popover-locales" style="height: {{locales.length*48}}px;"> + <ion-content scroll="false"> + <div class="list item-text-wrap block"> + + <a ng-repeat="l in locales track by l.id" + class="item item-icon-left ink" + ng-click="changeLanguage(l.id)"> + <i class="item-image avatar" + style="background-image: url(./img/flag-{{l.flag}}.png)"></i> + {{l.label | translate}} + </a> + + </div> + </ion-content> +</ion-popover-view> diff --git a/www/templates/menu.html b/www/templates/menu.html index 1b0a5e771a16232fb89309174eb1f36d89738cbe..14b32cebced3da7c5633585ec6ed5a97c00d6a77 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -7,20 +7,24 @@ </ion-nav-back-button> <ion-nav-buttons side="left"> - <button class="button button-icon button-clear icon ion-navicon visible-nomenu" menu-toggle="left" ></button> + <button class="button button-clear visible-nomenu " menu-toggle="left" > + <i class="icon ion-navicon"></i> + </button> </ion-nav-buttons> <ion-nav-buttons side="right" > <!-- current node info --> - <button class="button button-clear hidden-xs hidden-sm gray icon-left" + <button class="button button-clear button-peer hidden-xs hidden-sm gray" ng-if="$root.settings.expertMode" style="max-width: 450px !important;" ng-click="showPeerInfoPopover($event)"> - <small class="ion-locked" ng-if=":peer:$root.currency.node.useSsl"> </small> - {{:peer:$root.currency.node.host}}{{:peer:$root.currency.node.port != 80 && $root.currency.node.port != 443 ? ':'+$root.currency.node.port : ''}} - <small> </small> - <small class="ion-arrow-down-b"></small> + <span style="display: inline-flex;"> + <small class="ion-locked" ng-if=":peer:$root.currency.node.useSsl"> </small> + {{:peer:$root.currency.node.host}}{{:peer:$root.currency.node.port != 80 && $root.currency.node.port != 443 ? ':'+$root.currency.node.port : ''}} + <small> </small> + <small class="ion-arrow-down-b"></small> + </span> </button> <!-- Allow extension here --> @@ -78,10 +82,6 @@ </h4> <cs-extension-point name="menu-profile-user"></cs-extension-point> </div> - <!-- logout --> - <a ng-if="login" class="button-icon" ng-click="logout({askConfirm: true})" style="position: absolute; top: 5px; left: 5px; z-index: 999;"> - <i class="icon light ion-android-exit"></i> - </a> <!-- removeIf(device) --> <!-- Fullscreen button --> @@ -191,13 +191,13 @@ <!-- Help tour (NOT ready yet for small device) --> <a class="item item-icon-left item-closeable hidden-xs hidden-sm" - ng-show="!login || $root.settings.helptip.enable" + ng-show="$root.settings.helptip.enable" + title="{{:locale:'SETTINGS.DISABLE_HELPTIP'|translate}}" ng-click="startHelpTour($event)"> <i class="icon ion-easel"></i> {{:locale:'COMMON.BTN_HELP_TOUR'|translate}} <span class="close" - ng-if="login" ng-click="disableHelpTour($event)"></span> </a> @@ -243,8 +243,7 @@ <div class="item item-divider visible-xs visible-sm"></div> - <a menu-close - class="item item-icon-left visible-xs visible-sm" + <a class="item item-icon-left visible-xs visible-sm" active-link="active" active-link-path-prefix="#/app/settings" ui-sref="app.settings"> @@ -254,6 +253,18 @@ <a id="helptip-menu-btn-settings"></a> + <!-- logout --> + <div class="item item-divider visible-xs visible-sm margin-top" ng-if="login"></div> + <a menu-close + ng-if="login" + class="item item-icon-left visible-xs visible-sm" + ng-click="logout({askConfirm: true})"> + <i class="icon ion-log-out assertive"></i> + <span class="assertive" translate> {{:locale:'COMMON.BTN_LOGOUT'|translate}}</span> + </a> +<!-- <a ng-if="login" class="button-icon" ng-click="logout({askConfirm: true})" style="position: absolute; top: 5px; left: 5px; z-index: 999;">--> +<!-- <i class="icon light ion-log-out"></i>--> +<!-- </a>--> </ion-list> diff --git a/www/templates/wallet/view_wallet.html b/www/templates/wallet/view_wallet.html index dc99fab90b4dd0e76e53257873c3307a390eda5f..cebf4049de5f7ff4a9d888e04fc36e381a39dd35 100644 --- a/www/templates/wallet/view_wallet.html +++ b/www/templates/wallet/view_wallet.html @@ -116,21 +116,12 @@ </div> </div> - <div class="visible-xs visible-sm padding text-center" ng-if="!loading"> - <button class="button button-assertive button-small-padding ink" - ng-if="isDefaultWallet" - ng-click="logout({askConfirm: true})"> - <i class="icon ion-log-out"></i> - {{'COMMON.BTN_LOGOUT' | translate}} + <div class="visible-xs visible-sm padding text-center" ng-if="!loading && formData.requirements.needRenew"> + <button class="button button-raised icon-left button-stable button-small-padding ink" + ng-click="renewMembership()"> + <i class="icon ion-loop assertive"></i> + <span class="assertive">{{:locale:'ACCOUNT.BTN_MEMBERSHIP_RENEW' | translate}}</span> </button> - <div ng-if="formData.requirements.needRenew"> - <br/> - <button class="button button-raised icon-left button-stable button-small-padding ink" - ng-click="renewMembership()"> - <i class="icon ion-loop assertive"></i> - <span class="assertive">{{:locale:'ACCOUNT.BTN_MEMBERSHIP_RENEW' | translate}}</span> - </button> - </div> </div> <div class="row no-padding">