Skip to content
Snippets Groups Projects
Commit c5993f8b authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

- Add animation on fab button (small device)

- Fix Settings title i18n
- Wallet: fix TX view on small screen (pu comment on a new line)
- Wallet: TX : remove pubkey if has uid
parent fc636c79
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,16 @@
"default": {
"APP_CONFIG": {
"DUNITER_NODE": "cgeek.fr:9330",
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug"
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug",
"TIMEOUT": 4000
}
},
"duniter-fr": {
"APP_CONFIG": {
"DUNITER_NODE": "cgeek.fr:9330",
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug"
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug",
"TIMEOUT": 4000
}
},
......@@ -17,14 +19,16 @@
"APP_CONFIG": {
"DUNITER_NODE": "test-net.duniter.fr:9201",
"DUNITER_NODE_ES": "data.duniter.fr",
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug&title=[ES]"
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug&title=[ES]",
"TIMEOUT": 4000
}
},
"dev": {
"APP_CONFIG": {
"DUNITER_NODE": "192.168.0.28:9201",
"DUNITER_NODE_ES": "192.168.0.5:9200"
"DUNITER_NODE": "192.168.0.5:9201",
"DUNITER_NODE_ES": "192.168.0.5:9200",
"TIMEOUT": 4000
}
}
......
......@@ -91,7 +91,7 @@
}
#wallet .list .item span {
display: inline !important;
display: inline;
}
.list .item-input {
......
......@@ -85,7 +85,8 @@
"REGISTERED_SINCE": "Registered since ",
"REGISTERED_SINCE_BLOCK": "Registered since block #",
"NO_CERTIFICATIONS": "No certification",
"CERTIFICATIONS": "Received certifications for {{uid}}",
"CERTIFICATIONS_RECEIVED": "Received certifications",
"CERTIFICATIONS_RECEIVED_BY": "Received certifications for {{uid}}",
"EXPIRE_IN": "Expires",
"BTN_SEND_MONEY": "Send money",
"BTN_CERTIFY": "Certify",
......
......@@ -82,10 +82,11 @@
},
"WOT": {
"SEARCH_HELP": "Recherche (pseudo ou clé publique)",
"REGISTERED_SINCE": "Inscrit depuis le ",
"REGISTERED_SINCE": "Inscription",
"REGISTERED_SINCE_BLOCK": "Inscrit au block #",
"NO_CERTIFICATIONS": "Aucune certification",
"CERTIFICATIONS": "Certifications recues par {{uid}}",
"CERTIFICATIONS_RECEIVED": "Certifications recues",
"CERTIFICATIONS_RECEIVED_BY": "Certifications recues par {{uid}}",
"EXPIRE_IN": "Expiration",
"BTN_SEND_MONEY": "Payer",
"BTN_CERTIFY": "Certifier",
......
......@@ -91,6 +91,15 @@ angular.module('cesium', ['ionic', 'ngCordova', 'ionic-material', 'ngMessages',
.useStorage('localStorage');
})
.config(['$httpProvider', 'APP_CONFIG', function($httpProvider, APP_CONFIG) {
if (APP_CONFIG.TIMEOUT) {
$httpProvider.defaults.timeout = APP_CONFIG.TIMEOUT;
}
else {
$httpProvider.defaults.timeout = 4000; // default timeout
}
}])
// Add new compare-to directive (need for form validation)
.directive("compareTo", function() {
return {
......
......@@ -11,8 +11,9 @@ angular.module("cesium.config", [])
.constant("APP_CONFIG", {
"DUNITER_NODE": "cgeek.fr:9330",
"NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug",
"TIMEOUT": 4000,
"VERSION": "0.0.1",
"BUILD_DATE": "2016-05-13T18:48:18.603Z"
"BUILD_DATE": "2016-05-14T18:14:39.378Z"
})
;
\ No newline at end of file
......@@ -26,12 +26,6 @@ function WalletController($scope, $state, $q, $ionicPopup, $ionicActionSheet, $t
$scope.convertedBalance = 0;
$scope.hasCredit = false;
$scope.isMember = false;
// Set Header
$scope.$parent.showHeader();
$scope.$parent.clearFabs();
$scope.isExpanded = false;
$scope.$parent.setExpanded(false);
$scope.$parent.setHeaderFab(false);
$scope.$on('$ionicView.enter', function(e, $state) {
$scope.loadWallet()
......@@ -290,10 +284,6 @@ function WalletController($scope, $state, $q, $ionicPopup, $ionicActionSheet, $t
});
};
// Set Header
$scope.$parent.showHeader();
$scope.$parent.clearFabs();
// TODO: remove auto add account when done
/*$timeout(function() {
......
......@@ -118,12 +118,12 @@ function WotIdentityViewController($scope, $state, BMA, Wallet, UIUtils, $q, $ti
$scope.loaded = true;
//UIUtils.loading.hide();
// Set Motion
$timeout(function() {
UIUtils.motion.fadeSlideIn({
selector: '.item'
UIUtils.motion.fadeSlideInRight({
selector: '.animate-fade-slide-in .item',
startVelocity: 3000
});
}, 10);
}, 100);
UIUtils.ink();
};
BMA.wot.lookup({ search: pub })
......@@ -228,8 +228,17 @@ function WotIdentityViewController($scope, $state, BMA, Wallet, UIUtils, $q, $ti
}
};
// Set Header
$scope.$parent.showHeader();
$scope.$parent.clearFabs();
UIUtils.ink();
$scope.isExpanded = false;
$scope.$parent.setExpanded(false);
$scope.$parent.setHeaderFab(false);
$timeout(function () {
document.getElementById('fab-transfer').classList.toggle('on');
}, 100);
}
function WotCertificationsViewController($scope, $state, BMA, Wallet, UIUtils, $q, $timeout, System) {
......@@ -258,10 +267,14 @@ function WotCertificationsViewController($scope, $state, BMA, Wallet, UIUtils, $
$scope.loaded = true;
// Set Motion
$timeout(function() {
UIUtils.motion.fadeSlideIn({
selector: '.item'
UIUtils.motion.fadeSlideInRight({
selector: '.animate-fade-slide-in-right .item',
startVelocity: 3000
});
}, 10);
$timeout(function () {
document.getElementById('fab-certify').classList.toggle('on');
}, 900);
UIUtils.ink();
};
var onLoadRequirementsFinish = function(certsFromRequirements) {
......@@ -372,4 +385,8 @@ function WotCertificationsViewController($scope, $state, BMA, Wallet, UIUtils, $
// Set Header
$scope.$parent.showHeader();
$scope.$parent.clearFabs();
$scope.isExpanded = false;
$scope.$parent.setExpanded(false);
$scope.$parent.setHeaderFab(false);
}
......@@ -5,9 +5,12 @@ angular.module('cesium.bma.services', ['ngResource',
.factory('BMA', function($http, $q, APP_CONFIG) {
function BMA(server) {
function BMA(server, timeout) {
var sockets = [];
if (!timeout) {
timeout=4000;
}
function processError(reject, data, uri) {
if (data && data.message) {
......@@ -44,7 +47,7 @@ angular.module('cesium.bma.services', ['ngResource',
return function(params) {
return $q(function(resolve, reject) {
var config = {
timeout: 4000
timeout: timeout
};
prepare(uri, params, config, function(uri, config) {
......@@ -64,7 +67,7 @@ angular.module('cesium.bma.services', ['ngResource',
return function(data, params) {
return $q(function(resolve, reject) {
var config = {
timeout: 4000,
timeout: timeout,
headers : {'Content-Type' : 'application/json'}
};
......@@ -162,7 +165,7 @@ angular.module('cesium.bma.services', ['ngResource',
};
}
var service = BMA(APP_CONFIG.DUNITER_NODE);
var service = BMA(APP_CONFIG.DUNITER_NODE, APP_CONFIG.TIMEOUT);
service.instance = BMA;
return service;
})
......
<ion-side-menus enable-menu-with-back-views="true">
<!-- HEADER -->
<ion-side-menu-content>
<ion-nav-bar class="bar-dark" ng-class="{expanded: isExpanded, 'has-header-fab-left': hasHeaderFabLeft, 'has-header-fab-right': hasHeaderFabRight}" title-align="left">
<ion-nav-back-button class="no-text">
</ion-nav-back-button>
<ion-nav-buttons side="left">
<button class="button button-icon button-clear icon ion-navicon visible-xs" menu-toggle="left" ></button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view name="fabContent"></ion-nav-view>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
<!-- MENU -->
<ion-side-menu side="left" id="menu" expose-aside-when="large" enable-menu-with-back-views="false">
......@@ -63,16 +76,5 @@
</ion-footer-bar>
</ion-side-menu>
<!-- HEADER -->
<ion-side-menu-content>
<ion-nav-bar class="bar-dark" title-align="left">
<ion-nav-back-button class="no-text">
</ion-nav-back-button>
<ion-nav-buttons side="left">
<button class="button button-icon button-clear icon ion-navicon visible-xs" menu-toggle="left" ></button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
</ion-side-menus>
<ion-view left-buttons="leftButtons"
view-title="Settings">
view-title="{{'MENU.SETTINGS' | translate}}">
<ion-content >
<div class="item item-content item-toggle dark">
......
......@@ -115,26 +115,26 @@
<h2><i class="icon ion-clock" ng-if="!tx.block_number"> </i>
<span class="positive" ng-if="tx.uid" ui-sref="app.view_identity({pub:tx.pubkey})">
<i class="icon ion-person"></i>
{{tx.uid}}
{{::tx.uid}}
</span>
<span class="positive" ng-if="!tx.uid" ui-sref="app.view_identity({pub:tx.pubkey})">
<i class="icon ion-key"></i>
{{tx.pubkey | formatPubkey}}
{{::tx.pubkey | formatPubkey}}
</span>
<span ng-if="tx.comment">&nbsp;
<span ng-if="tx.comment" class="hidden-xs">&nbsp;
<i class="icon ion-ios-chatbubble-outline"></i>
{{tx.comment}}
{{::tx.comment}}
</span>
</h2>
<h3 ng-if="tx.comment" class="visible-xs">
<i class="icon ion-ios-chatbubble-outline"></i>
{{::tx.comment}}<br/>
</h3>
<h3 class="dark">
{{tx.time | formatFromNow}}
{{::tx.time | formatFromNow}}
<span class="gray hidden-xs">|
<i class="icon ion-calendar"></i>
{{tx.time | formatDate}}
</span>
<span class="gray" ng-if="!tx.uid" ui-sref="app.view_identity({pub:tx.pubkey})">&nbsp;
<i class="icon ion-key"></i>
{{tx.pubkey | formatPubkey}}
{{::tx.time | formatDate}}
</span>
</h3>
<div class="badge item-note"
......
<ion-view view-title="Certifications" left-buttons="leftButtons">
<ion-view left-buttons="leftButtons">
<ion-nav-title>
<span class="visible-xs visible-sm">{{::identity.uid}}</span>
</ion-nav-title>
<ion-nav-buttons side="secondary">
<button class="button button-icon button-clear icon ion-loop" ng-click="doUpdate()">
</button>
</ion-nav-buttons>
<ion-content id="certifications">
<ion-content id="certifications" ng-class="{expanded:isExpanded}">
<div class="content scroll">
<div class="hidden-xs hidden-sm padding" style="text-align:center">
......@@ -24,13 +28,13 @@
<div class="col list animate-fade-slide-in-right">
<span class="item item-divider">
<span translate="WOT.CERTIFICATIONS" translate-values="{uid: identity.uid}"></span>
<span class="hidden-xs" translate="WOT.CERTIFICATIONS_RECEIVED_BY" translate-values="{uid: identity.uid}"></span>
<span class="visible-xs" translate="WOT.CERTIFICATIONS_RECEIVED" ></span>
<div class="badge item-note" translate>WOT.EXPIRE_IN</div>
</span>
<span class="item" ng-if="!certifications || certifications.length == 0">
<span class="item" ng-if="loaded && certifications.length == 0">
<h3 translate>WOT.NO_CERTIFICATIONS</h3>
</span>
......@@ -61,8 +65,10 @@
</div>
</ion-content>
<button class="button button-fab button-fab-bottom-right button-assertive icon ion-ribbon-b visible-xs visible-sm"
<!-- fab button -->
<div class="visible-xs visible-sm">
<button id="fab-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin"
ng-click="certifyIdentity()"
ng-if="hasSelf">
</button>
><i class="icon ion-ribbon-b"></i></button>
</div>
</ion-view>
<ion-view view-title="{{identity.uid}}" left-buttons="leftButtons">
<ion-view left-buttons="leftButtons">
<ion-nav-title>
</ion-nav-title>
<ion-content>
<div class="positive-900-bg hero">
<ion-content ng-class="{expanded:$scope.isExpanded}">
<div class="positive-900-bg hero animate-pan-in-left">
<div class="content">
<div class="avatar"
ng-if="!!identity.avatar"
......@@ -40,20 +40,21 @@
ui-sref="app.view_certifications({pub:identity.pub})">
<i class="icon ion-ribbon-b"></i>
<span>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</span>
<span class="badge" ng-class="{'badge-balanced': sigQty && certificationCount >= sigQty, 'badge-assertive': sigQty && certificationCount < sigQty}">{{certificationCount}}</span>
<span class="badge" ng-class="{'badge-balanced': sigQty && certificationCount >= sigQty, 'badge-assertive': sigQty && certificationCount < sigQty}">{{::certificationCount}}</span>
</a>
<span class="item item-icon-left" ng-if="identity.sigDate">
<ion-item class="item-icon-left" ng-if="identity.sigDate">
<i class="icon ion-calendar"></i>
<span>{{'WOT.REGISTERED_SINCE' | translate}} {{identity.sigDate | formatDate}}</span>
<span class="badge badge-balanced">{{identity.sigDate | formatFromNow}}</span>
</span>
<span>{{'WOT.REGISTERED_SINCE' | translate}}</span>
<h5 class="dark">{{::identity.sigDate | formatDate}}</h5>
<span class="badge badge-balanced">{{::identity.sigDate | formatFromNow}}</span>
</ion-item>
<ion-item class="item-icon-left ink"
<ion-item class="item-icon-left item-text-wrap ink"
on-hold="copy(identity.pub)"
copy-on-click>
<i class="icon ion-key"></i>
<span id="pubkey">{{identity.pub}}</span>
<span id="pubkey">{{::identity.pub}}</span>
</ion-item>
</div>
......@@ -65,13 +66,10 @@
</div>
</ion-content>
<button class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm"
<!-- fab button -->
<div class="visible-xs visible-sm">
<button id="fab-transfer" class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send expanded button-energized-900 drop"
ng-click="transfer(identity.pub, identity.uid)">
</button>
<button class="button button-fab button-fab-bottom-right button-assertive icon ion-ribbon-b visible-xs visible-sm"
ng-click="certifyIdentity()"
ng-if="hasSelf"
style="bottom:78px;">
</button>
</div>
</ion-view>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment