Commit cf057d93 authored by Benoit Lavenier's avatar Benoit Lavenier

[enh] Mobile: move logout button into last menu item

[fix] Home: fix locale flag path
[fix] Fix cleanCache when changing ES node
parent 67938716
Pipeline #8420 failed
Subproject commit 2667bc6efab8ae2393ab57f330c33f7dedf99fe2
Subproject commit d3566be2a5ef91861237252626305221bde1d7a8
......@@ -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`
......
......@@ -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`.
......
......@@ -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 '));
}
});
});
}
......
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-4.10.3-all.zip
......@@ -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 {
......
......@@ -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;
}
......
......@@ -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?",
......
......@@ -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 ?",
......
......@@ -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);
......
......@@ -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}}&nbsp;</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>
......
<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">
......
<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>
......@@ -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">&nbsp;</small>
{{:peer:$root.currency.node.host}}{{:peer:$root.currency.node.port != 80 && $root.currency.node.port != 443 ? ':'+$root.currency.node.port : ''}}
<small>&nbsp;</small>
<small class="ion-arrow-down-b"></small>
<span style="display: inline-flex;">
<small class="ion-locked" ng-if=":peer:$root.currency.node.useSsl">&nbsp;</small>
{{:peer:$root.currency.node.host}}{{:peer:$root.currency.node.port != 80 && $root.currency.node.port != 443 ? ':'+$root.currency.node.port : ''}}
<small>&nbsp;</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>
......
......@@ -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">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment