added community section and some icons

This commit is contained in:
Kadir Sekha 2018-02-16 16:20:22 +00:00
commit f15fd4a2de
7 changed files with 183 additions and 157 deletions

View file

@ -0,0 +1,23 @@
'use strict';
angular.module('copayApp.controllers').controller('communityController', function($scope, communityService, $ionicScrollDelegate, $timeout, platformInfo) {
$scope.hide = false;
$scope.services = communityService.get();
$scope.isCordova = platformInfo.isCordova;
$scope.toggle = function() {
$scope.hide = !$scope.hide;
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 10);
};
$scope.share = function() {
if (!$scope.isCordova) return;
var text = 'Visit Wallet.Bitcoin.com and get started using Bitcoin Cash today!';
window.plugins.socialsharing.share(text, null, null, null);
}
});

View file

@ -0,0 +1,56 @@
'use strict'
angular.module('copayApp.services').factory('communityService', function(configService, $log, lodash) {
var root = {};
var services = [];
root.register = function(serviceInfo) {
$log.info('Adding Services entry:' + serviceInfo.name);
if (!lodash.find(services, function(x) {
return x.name == serviceInfo.name;
})) {
services.push(serviceInfo);
}
}
root.unregister = function(serviceName) {
var newS = lodash.filter(services, function(x) {
return x.name != serviceName;
});
// Found?
if (newS.length == services.length) return;
$log.info('Removing Services entry:' + serviceName);
// This is to preserve services pointer
while (services.length)
services.pop();
while (newS.length)
services.push(newS.pop());
};
root.get = function() {
return services;
};
var bchRedditItem = {
name: 'bchreddit',
title: 'Bitcoin Cash Reddit',
icon: 'icon-reddit',
href: 'http://reddit.com/r/btc'
};
var bitcoincomTwitterItem = {
name: 'bitcoincomTwitter',
title: 'Bitcoin.com Twitter',
icon: 'icon-twitter',
href: 'https://twitter.com/BTCTN'
};
root.register(bchRedditItem);
root.register(bitcoincomTwitterItem);
return root;
});

View file

@ -1,49 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 514.24 514.24" style="enable-background:new 0 0 514.24 514.24;" xml:space="preserve" width="512px" height="512px">
<g>
<g>
<polygon points="176,289.089 176,289.121 192,289.121 " fill="#fab915"/>
</g>
</g>
<g>
<g>
<polygon points="336,289.089 336,289.121 352,289.121 " fill="#fab915"/>
</g>
</g>
<g>
<g>
<path d="M514.24,241.121c0-35.296-28.704-64-64-64c-14.112,0-27.52,4.608-38.464,12.96c-35.712-24.8-82.496-39.584-132.256-43.328 l26.848-62.976l78.112,18.24c2.496,24.16,22.72,43.104,47.52,43.104c26.464,0,48-21.536,48-48s-21.536-48-48-48 c-16.768,0-31.52,8.672-40.096,21.76l-91.296-21.344c-7.744-1.76-15.328,2.176-18.4,9.312l-37.12,87.04 c-53.728,1.856-104.928,16.992-143.584,43.36C90.976,181.441,77.92,177.121,64,177.121c-35.296,0-64,28.704-64,64 c0,23.392,12.768,44.544,32.352,55.392c-0.256,2.816-0.352,5.696-0.352,8.608c0,88.224,100.48,160,224,160 c123.488,0,224-71.776,224-160c0-2.496-0.096-4.96-0.256-7.424C500.608,287.073,514.24,265.409,514.24,241.121z M432,81.121 c8.8,0,16,7.168,16,16c0,8.832-7.2,16-16,16s-16-7.168-16-16C416,88.289,423.2,81.121,432,81.121z M144,289.121 c0-17.632,14.368-32,32-32s32,14.368,32,32c0,17.664-14.368,32-32,32S144,306.785,144,289.121z M329.888,395.265 c-22.08,15.968-48,23.968-73.888,23.968s-51.808-8-73.888-23.968c-7.168-5.184-8.768-15.2-3.584-22.336s15.2-8.736,22.336-3.584 c32.992,23.84,77.28,23.904,110.272,0c7.136-5.152,17.12-3.616,22.336,3.584C338.656,380.097,337.024,390.081,329.888,395.265z M336,321.121c-17.664,0-32-14.336-32-32c0-17.632,14.336-32,32-32s32,14.368,32,32C368,306.785,353.664,321.121,336,321.121z" fill="#fab915"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="400px" height="400px" viewBox="56 56 400 400" enable-background="new 56 56 400 400" xml:space="preserve">
<g>
<g>
<polygon fill="#FAB915" points="175.233,287.83 175.233,287.861 191.164,287.861 "/>
</g>
</g>
<g>
<g>
<polygon fill="#FAB915" points="334.536,287.83 334.536,287.861 350.467,287.861 "/>
</g>
</g>
<g>
<g>
<path fill="#FAB915" d="M406,246.696c0-20.638-16.778-37.337-37.348-37.337c-8.203,0-16.094,2.638-22.436,7.533
c-20.857-14.444-48.176-23.061-77.179-25.255l15.706-36.77l45.52,10.679c1.475,14.079,13.261,25.111,27.808,25.111
c15.376,0,27.916-12.54,27.916-28.02c0-15.388-12.54-27.985-27.916-27.985c-9.863,0-18.433,5.081-23.403,12.729l-53.325-12.452
c-4.454-1.028-8.899,1.235-10.716,5.437l-21.638,50.746c-31.342,1.112-61.202,9.902-83.748,25.279
c-6.142-4.537-13.759-7.031-21.917-7.031c-20.553,0-37.325,16.699-37.325,37.337c0,13.57,7.433,25.924,18.857,32.32
c-0.151,1.619-0.181,3.244-0.181,4.979c0,51.532,58.594,93.39,130.664,93.39c71.994,0,130.647-41.857,130.647-93.39
c0-1.463-0.06-2.93-0.06-4.363C398.018,273.447,406,260.852,406,246.696z M358.071,153.332c5.035,0,9.306,4.171,9.306,9.305
c0,5.17-4.271,9.37-9.306,9.37c-5.239,0-9.341-4.199-9.341-9.37C348.73,157.503,352.832,153.332,358.071,153.332z
M190.008,274.619c0-10.252,8.353-18.618,18.661-18.618c10.309,0,18.695,8.366,18.695,18.618c0,10.334-8.386,18.75-18.695,18.75
C198.361,293.369,190.008,284.953,190.008,274.619z M298.432,336.609c-12.875,9.273-27.93,13.926-43.092,13.926
c-15.085,0-30.195-4.652-43.07-13.926c-4.238-3.091-5.121-8.922-2.119-13.057c3.001-4.102,8.861-5.044,13.026-2.064
c19.272,13.879,45.061,13.942,64.317,0c4.134-2.979,9.961-2.071,13.057,2.064C303.608,327.719,302.638,333.519,298.432,336.609z
M302.032,293.369c-10.341,0-18.64-8.416-18.64-18.75c0-10.252,8.299-18.618,18.64-18.618s18.611,8.366,18.611,18.618
C320.644,284.953,312.373,293.369,302.032,293.369z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

View file

@ -1,69 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 473.932 473.932" style="enable-background:new 0 0 473.932 473.932;" xml:space="preserve" width="512px" height="512px">
<g>
<g>
<path d="M385.513,301.214c-27.438,0-51.64,13.072-67.452,33.09l-146.66-75.002 c1.92-7.161,3.3-14.56,3.3-22.347c0-8.477-1.639-16.458-3.926-24.224l146.013-74.656c15.725,20.924,40.553,34.6,68.746,34.6 c47.758,0,86.391-38.633,86.391-86.348C471.926,38.655,433.292,0,385.535,0c-47.65,0-86.326,38.655-86.326,86.326 c0,7.809,1.381,15.229,3.322,22.412L155.892,183.74c-15.833-20.039-40.079-33.154-67.56-33.154 c-47.715,0-86.326,38.676-86.326,86.369s38.612,86.348,86.326,86.348c28.236,0,53.043-13.719,68.832-34.664l145.948,74.656 c-2.287,7.744-3.947,15.79-3.947,24.289c0,47.693,38.676,86.348,86.326,86.348c47.758,0,86.391-38.655,86.391-86.348 C471.904,339.848,433.271,301.214,385.513,301.214z" fill="#fab915"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="400px" height="400px" viewBox="56 56 400 400" enable-background="new 56 56 400 400" xml:space="preserve">
<g>
<g>
<path fill="#FAB915" d="M350.833,297.017c-17.517,0-32.967,8.346-43.062,21.124l-93.629-47.881
c1.226-4.571,2.106-9.296,2.106-14.267c0-5.412-1.046-10.507-2.506-15.465l93.216-47.661
c10.039,13.358,25.889,22.089,43.888,22.089c30.489,0,55.153-24.664,55.153-55.125c0-30.435-24.664-55.112-55.152-55.112
c-30.42,0-55.111,24.677-55.111,55.111c0,4.985,0.882,9.723,2.12,14.308l-93.615,47.882
c-10.108-12.793-25.587-21.166-43.131-21.166c-30.462,0-55.111,24.691-55.111,55.139c0,30.447,24.65,55.125,55.111,55.125
c18.026,0,33.863-8.758,43.943-22.129l93.174,47.66c-1.46,4.943-2.52,10.081-2.52,15.507c0,30.447,24.691,55.125,55.111,55.125
c30.489,0,55.152-24.678,55.152-55.125C405.985,321.681,381.322,297.017,350.833,297.017z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

@ -1,39 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve" width="512px" height="512px">
<g>
<g>
<path d="M612,116.258c-22.525,9.981-46.694,16.75-72.088,19.772c25.929-15.527,45.777-40.155,55.184-69.411 c-24.322,14.379-51.169,24.82-79.775,30.48c-22.907-24.437-55.49-39.658-91.63-39.658c-69.334,0-125.551,56.217-125.551,125.513 c0,9.828,1.109,19.427,3.251,28.606C197.065,206.32,104.556,156.337,42.641,80.386c-10.823,18.51-16.98,40.078-16.98,63.101 c0,43.559,22.181,81.993,55.835,104.479c-20.575-0.688-39.926-6.348-56.867-15.756v1.568c0,60.806,43.291,111.554,100.693,123.104 c-10.517,2.83-21.607,4.398-33.08,4.398c-8.107,0-15.947-0.803-23.634-2.333c15.985,49.907,62.336,86.199,117.253,87.194 c-42.947,33.654-97.099,53.655-155.916,53.655c-10.134,0-20.116-0.612-29.944-1.721c55.567,35.681,121.536,56.485,192.438,56.485 c230.948,0,357.188-191.291,357.188-357.188l-0.421-16.253C573.872,163.526,595.211,141.422,612,116.258z" fill="#fab915"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="400px" height="400px" viewBox="56 56 400 400" enable-background="new 56 56 400 400" xml:space="preserve">
<g>
<g>
<path fill="#FAB915" d="M406,162.989c-11.041,4.893-22.89,8.211-35.336,9.692c12.708-7.611,22.438-19.685,27.05-34.025
c-11.923,7.049-25.083,12.167-39.104,14.941c-11.23-11.979-27.2-19.44-44.918-19.44c-33.987,0-61.545,27.558-61.545,61.526
c0,4.817,0.545,9.522,1.593,14.022c-51.139-2.568-96.487-27.07-126.838-64.301c-5.304,9.074-8.323,19.646-8.323,30.933
c0,21.352,10.873,40.191,27.37,51.215c-10.086-0.338-19.572-3.113-27.875-7.723v0.769c0,29.806,21.221,54.682,49.359,60.345
c-5.156,1.387-10.592,2.156-16.216,2.156c-3.974,0-7.817-0.394-11.585-1.146c7.836,24.466,30.558,42.255,57.478,42.745
c-21.053,16.495-47.598,26.301-76.43,26.301c-4.968,0-9.861-0.3-14.679-0.843c27.239,17.489,59.577,27.687,94.333,27.687
c113.211,0,175.092-93.771,175.092-175.092l-0.206-7.967C387.311,186.16,397.771,175.324,406,162.989z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

@ -0,0 +1,35 @@
<div ng-controller="communityController">
<div class="item item-icon-right item-heading" ng-click="toggle()" >
<span translate>Community</span>
<i class="icon bp-arrow-up" ng-show="!hide"></i>
<i class="icon bp-arrow-down" ng-show="hide"></i>
</div>
<div ng-show="!hide">
<div ng-repeat="service in services track by $index">
<a ng-if="service.sref" ui-sref="{{service.sref}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg {{service.icon}}"></div>
</i>
<span>{{service.title || service.name}}</span>
<i class="icon bp-arrow-right"></i>
</a>
<a ng-if="!service.sref" href="{{service.href}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg {{service.icon}}"></div>
</i>
<span>{{service.title || service.name}}</span>
<i class="icon bp-arrow-right"></i>
</a>
</div>
<div>
<a ng-click="share()" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-share"></div>
</i>
<span>Share the Wallet App</span>
<i class="icon bp-arrow-right"></i>
</a>
</div>
</div>
</div>

View file

@ -98,6 +98,7 @@
<div class="ng-hide list card" ng-show="homeIntegrations.length>0" ng-include="'views/includes/homeIntegrations.html'"></div>
<div class="ng-hide list card" ng-show="nextStepsItems.length>0 && !isWindowsPhoneApp" ng-include="'views/includes/nextSteps.html'"></div>
<div class="ng-hide list card" ng-show="showServices && (walletsBch[0] || walletsBtc[0])" ng-include="'views/includes/services.html'"></div>
<div class="ng-hide list card" ng-show="nextStepsItems.length>0 && !isWindowsPhoneApp" ng-include="'views/includes/community.html'"></div>
</ion-content>
</ion-view>