Skip to content

Commit

Permalink
Merge pull request #283 from liangran/dev
Browse files Browse the repository at this point in the history
v4.2 ready
  • Loading branch information
stellarchat committed Oct 1, 2018
2 parents fcd9de3 + 2cd9021 commit 442bb3b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/js/controllers.js
Expand Up @@ -23,10 +23,10 @@ myApp.controller("FooterCtrl", [ '$scope', '$translate', 'SettingFactory', 'Remo
SettingFactory.setLang(key);
};

$scope.version = '4.1';
$scope.version = '4.2';
$scope.new_version = false;
$scope.diff = false;
RemoteFactory.getClientVersion(function(err, data){
RemoteFactory.getNwjsClientVersion(function(err, data){
if (err) {
console.warn('Can not get the version from github.', err);
} else {
Expand Down
6 changes: 6 additions & 0 deletions src/js/factory.js
Expand Up @@ -268,6 +268,12 @@ myApp.factory('RemoteFactory', function($http) {
var url = "https://raw.githubusercontent.com/stellarchat/desktop-client/master/src/package.json";
getResource(url, callback);
}

remote.getNwjsClientVersion = function(callback) {
var url = "https://raw.githubusercontent.com/stellarchat/desktop-client/nwjs/src/package.json";
getResource(url, callback);
}

return remote;
});

Expand Down
6 changes: 3 additions & 3 deletions src/js/stellar/api.factory.js
Expand Up @@ -545,9 +545,9 @@ myApp.factory('StellarApi', ['$rootScope', 'StellarHistory', 'StellarOrderbook',
return server.resolveAccountId(address);
})
.then((data) => {
if(data.stellarthis.address) {
const index = data.stellarthis.address.indexOf("*");
const fed_name = data.stellarthis.address.substring(0, index);
if(data.stellar_address) {
const index = data.stellar_address.indexOf("*");
const fed_name = data.stellar_address.substring(0, index);
return callback(null, fed_name);
}
}).catch((err) => {
Expand Down
1 change: 1 addition & 0 deletions src/js/stellar/history.factory.js
Expand Up @@ -25,6 +25,7 @@ myApp.factory('StellarHistory', ['$rootScope', 'SettingFactory', function($rootS
for(const r of data.records) {
const t = {
id: r.id,
hash : r.transaction_hash,
type: r.type,
transaction: r.transaction,
};
Expand Down
25 changes: 15 additions & 10 deletions src/pages/history_payments.html
Expand Up @@ -24,16 +24,21 @@
</tr>
</thead>
<tbody>
<tr class="HistoryTable-row" ng-repeat="tx in payments">
<td>{{tx.date | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="address"><span ng-hide="tx.nick">{{tx.counterparty}}</span><span ng-show="tx.nick" title="{{tx.counterparty}}">{{tx.nick}}</span></td>
<td class="amount">
<span class="debit" ng-if="!tx.isInbound"><span class="bold">-</span>{{tx.amount}}</span>
<span class="credit" ng-if="tx.isInbound"><span class="bold">+</span>{{tx.amount}}</span>
<strong>{{tx.asset.code}}</strong>
</td>
<td>{{tx.memo}}<br><span class="timestamp" ng-show="tx.memo_type && tx.memo_type!='none'">memo-{{tx.memo_type}}</span></td>
<td>{{tx.id}}<br>{{tx.type}}</td>
<tr class="HistoryTable-row" ng-repeat-start="tx in payments">
<td colspan=2>{{tx.date | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="amount" rowspan=2>
<span class="debit" ng-if="!tx.isInbound"><span class="bold">-</span>{{tx.amount}}</span>
<span class="credit" ng-if="tx.isInbound"><span class="bold">+</span>{{tx.amount}}</span>
<strong>{{tx.asset.code}}</strong>
</td>
<td colspan=2>
<a href="https://stellarchain.io/tx/{{tx.hash}}" target="_blank">{{tx.hash}}</a>
</td>
</tr>
<tr class="HistoryTable-row" style="border-top:none;" ng-repeat-end>
<td colspan=2 class="address"><span ng-hide="tx.nick">{{tx.counterparty}}</span><span ng-show="tx.nick" title="{{tx.counterparty}}">{{tx.nick}}</span></td>
<td><span class="timestamp" ng-show="tx.memo_type && tx.memo_type!='none'">memo-{{tx.memo_type}}:</span> {{tx.memo}}</td>
<td style="text-align: center;">{{tx.type}}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 442bb3b

Please sign in to comment.