Update content

This commit is contained in:
magmahindenburg 2017-06-12 18:41:11 +09:00
commit 7ca56b6ccf
5 changed files with 27 additions and 15 deletions

View file

@ -5,6 +5,21 @@ angular.module('copayApp.controllers').controller('buyandsellController', functi
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.services = buyAndSellService.get();
$scope.$on("$ionicView.enter", function(event, data) {
console.log("Enter buy page");
var r = new XMLHttpRequest();
r.open("GET", "https://www.bitcoin.com/api/rv/promoted-exchange", true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
console.log(r.responseText);
var adResponse = JSON.parse(r.responseText)
document.getElementById("exchange-logo").setAttribute('src', "https://www.bitcoin.com" + adResponse.image)
document.getElementById("exchange-name").textContent = adResponse.bannerName;
document.getElementById("exchange-text").textContent = adResponse.description;
};
r.send("defaultpromotion=360");
});
if (lodash.isEmpty($scope.services))
$ionicHistory.goBack();
});

View file

@ -2,24 +2,21 @@
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>Buy or Sell Bitcoin</ion-nav-title>
<ion-nav-title>Buy Bitcoin</ion-nav-title>
</ion-nav-bar>
<ion-content>
<div class="list">
<div class="explain">
<i class="icon buy-and-sell-icon">
<img src="img/icon-bitcoin.svg"/>
</i>
<div class="explain-heading">Connect an Exchange</div>
<div class="explain-description">Buy or sell bitcoin directly from your wallet by connecting your exchange accounts.</div>
<div class="explain-heading">Choose an Exchange</div>
<div class="explain-description">We recommend the following exchange:</div>
<div class="item item-divider"></div>
<div>
<img src="" id="exchange-logo" style="max-width: 50%;" />
<p id="exchange-name" style="font-size: 32px;"></p>
<p id="exchange-text"></p>
</div>
</div>
<div class="item item-divider"></div>
<div ng-repeat="service in services">
<div class="item item-icon-right" ui-sref="{{service.sref}}">
<img ng-src="{{service.logo}}" width="90">
<span class="item-note">{{service.location}}</span>
<i class="icon bp-arrow-right"></i>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -1,7 +1,7 @@
<div class="list card" ng-controller="buyAndSellCardController">
<div class="item item-sub item-icon-right item-heading">
<span translate>Buy &amp; Sell Bitcoin</span>
<span translate>Buy bitcoin</span>
<a ui-sref="tabs.buyandsell"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
</div>
<div ng-repeat="service in services">

View file

@ -1,7 +1,7 @@
<ion-view id="onboard-welcome" class="onboarding">
<ion-content ng-controller="welcomeController" ng-init="createProfile()" scroll="false">
<div id="logo-tagline">
<img src='img/app/logo-negative.svg' id="logo" />
<img src='img/app/logo-negative.png' id="logo" />
<p id="lead" translate>Take control of your money,<br />get started with bitcoin.</p>
</div>
<div id="cta-buttons">

View file

@ -1,6 +1,6 @@
<ion-view id="tab-home">
<ion-nav-bar class="bar-royal">
<ion-nav-title><img class="tab-home__logo" src="img/app/logo-negative.png"></ion-nav-title>
<ion-nav-title><img class="tab-home__logo" style="height: 48px; top: 0px;" src="img/app/logo-negative.png"></ion-nav-title>
</ion-nav-bar>
<ion-content>