From 3ecef220edde15104bd0ac3f855b92e2bbb824c8 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 14 Jul 2014 12:53:48 -0300 Subject: [PATCH 01/58] Cleaning html tags --- css/mobile.css | 6 ++++++ css/tpl-clean.css | 6 ++++++ index.html | 39 ++++++++++++++++++++++----------------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/css/mobile.css b/css/mobile.css index 1662fa149..ffbccfcda 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -1,3 +1,9 @@ +/* + * + * Copay mobile CSS + * + */ + @media (max-width: 1024px) { .logo { background-size: 90px 44px !important; diff --git a/css/tpl-clean.css b/css/tpl-clean.css index a6b2c3581..dd7e6da1e 100644 --- a/css/tpl-clean.css +++ b/css/tpl-clean.css @@ -1,3 +1,9 @@ +/* + * + * Copay Clean Template + * + */ + .logo { background: transparent url('../img/logo.png') no-repeat; } diff --git a/index.html b/index.html index 7e1d39cba..58a9e6342 100644 --- a/index.html +++ b/index.html @@ -114,18 +114,22 @@ ng-class="($root.wallet.getOnlinePeerIDs().indexOf(c.peerId) != -1) ? 'online' : 'offline'" ng-src="{{getVideoURL(c.peerId)}}" > - +
{{c}} - - -

you{{c.nick}} - Backup ready

+
+
+ you + {{c.nick}} + + Backup ready + [ID: {{c.peerId}}] - +
@@ -161,7 +165,6 @@ ng-show="$root.wallet.publicKeyRing.isBackupReady()"> {{ $root.wallet.publicKeyRing.remainingBackups() }} people have - One person has @@ -218,12 +221,13 @@ [LIVENET] [TESTNET]
-
- Copay v{{version}} -
- -
@@ -239,8 +243,9 @@ avatar peer="{{c}}" ng-class="($root.wallet.getOnlinePeerIDs().indexOf(c.peerId) != -1) ? 'online' : 'offline'" src="./img/satoshi.gif" + alt="{{c}}" /> -
+
{{c.nick}}
@@ -468,7 +473,7 @@ {{balanceByAddr[selectedAddr.address] || 0 | noFractionNumber}} - + {{selectedAddr.address}}
{{selectedAddr.balance || 0|noFractionNumber}} {{$root.unitName}}
@@ -542,7 +547,7 @@
-
+
{{$root.wallet.publicKeyRing.nicknameForCopayer(cId)}}
@@ -808,7 +813,7 @@ {{addr}} {{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}} - {{info.hidden ? + {{info.hidden ? 'Enable' : 'Disable'}} From 6bad4ae59d3ae26beee5653a1e9701d6bc23faeb Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 14 Jul 2014 12:56:23 -0300 Subject: [PATCH 02/58] update gitignore (for generated files with firefox add ons) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0a7848506..fb26abc57 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,8 @@ webapp browser-extensions/chrome/copay-chrome-extension browser-extensions/chrome/copay-chrome-extension.zip browser-extensions/firefox/firefox-addon +browser-extensions/firefox/data +browser-extensions/firefox/copay.xpi version.js android/package From 0a027360a85237d7e7551b5ee67b0cfedf0f3526 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 16 Jul 2014 17:59:28 -0300 Subject: [PATCH 03/58] Split index.html in many files smaller. New right column when the wallet is ready. Removed templates selector. --- app.js | 5 + config.js | 2 - css/main.css | 550 +++++++---- css/mobile.css | 49 - css/tpl-clean.css | 20 - css/tpl-default.css | 349 ------- index.html | 1098 ++-------------------- js/controllers/backup.js | 12 +- js/controllers/footer.js | 37 - js/controllers/send.js | 2 +- js/controllers/{header.js => sidebar.js} | 117 +-- js/controllers/video.js | 25 + js/routes.js | 29 +- views/addresses.html | 60 ++ views/backup.html | 18 + views/errors/404.html | 4 + views/import.html | 35 + views/includes/copayers.html | 70 ++ views/includes/sidebar.html | 63 ++ views/includes/video.html | 28 + views/modals/addressbook.html | 20 + views/send.html | 146 +++ views/settings.html | 71 ++ views/setup.html | 74 ++ views/signin.html | 60 ++ views/transactions.html | 181 ++++ views/unsupported.html | 13 + views/uri_payment.html | 11 + 28 files changed, 1397 insertions(+), 1752 deletions(-) delete mode 100644 css/tpl-clean.css delete mode 100644 css/tpl-default.css delete mode 100644 js/controllers/footer.js rename js/controllers/{header.js => sidebar.js} (56%) create mode 100644 js/controllers/video.js create mode 100644 views/addresses.html create mode 100644 views/backup.html create mode 100644 views/errors/404.html create mode 100644 views/import.html create mode 100644 views/includes/copayers.html create mode 100644 views/includes/sidebar.html create mode 100644 views/includes/video.html create mode 100644 views/modals/addressbook.html create mode 100644 views/send.html create mode 100644 views/settings.html create mode 100644 views/setup.html create mode 100644 views/signin.html create mode 100644 views/transactions.html create mode 100644 views/unsupported.html create mode 100644 views/uri_payment.html diff --git a/app.js b/app.js index 2c514a2fa..ebc3b7826 100644 --- a/app.js +++ b/app.js @@ -2,6 +2,11 @@ var express = require('express'); var http = require('http'); var app = express(); +app.use('/', express.static(__dirname + '/')); +app.get('*', function(req, res) { + return res.sendfile('index.html'); +}); + app.start = function(port, callback) { app.set('port', port); diff --git a/config.js b/config.js index 9b24dbf01..da543f5d9 100644 --- a/config.js +++ b/config.js @@ -120,8 +120,6 @@ var defaultConfig = { storageSalt: 'mjuBtGybi/4=', }, - // theme list - themes: ['default'], disableVideo: true, verbose: 1, }; diff --git a/css/main.css b/css/main.css index f968bcfcf..571353bd2 100644 --- a/css/main.css +++ b/css/main.css @@ -9,18 +9,72 @@ padding:0; } -html, body {height: 100%;} - -#wrap {min-height: 100%;} - -#main { - overflow:auto; - padding-bottom: 80px;} /* must be same height as the footer */ - -.main-home { - padding-bottom: 28px !important; +body, html{ + height:100%; + width:100%; + background: #F8F8FB; } +.page, .main, .sidebar { + height:100%; +} + +.sidebar { + position: fixed; + width: 250px; + padding: 15px; + background-color: #2C3E50; + color: #fff; +} + +.sidebar a { + color: #fff; +} + +.main { + margin-left: 250px; +} + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { + display: none !important; +} + +.dn {display: none;} +.pr {position: relative;} +.m0 {margin: 0;} +.db {display: block;} +.size-12 { font-size: 12px; } +.size-14 { font-size: 14px; } +.size-16 { font-size: 16px; } +.size-18 { font-size: 18px; } +.size-21 { font-size: 21px; } +.size-24 { font-size: 24px; } +.size-36 { font-size: 36px; } +.size-48 { font-size: 48px; } +.size-60 { font-size: 60px; } +.size-72 { font-size: 72px; } +.m5t {margin-top: 5px;} +.m10t {margin-top: 10px;} +.m5b {margin-bottom: 5px;} +.m10b {margin-bottom: 10px;} +.m15b {margin-bottom: 20px;} +.m10r {margin-right: 10px;} +.m10 {margin: 10px;} +.m15 {margin: 15px;} +.p10t {padding-top: 10px;} +.p0r {padding-right: 0;} +.p70r {padding-right: 70px;} +.p70l {padding-left: 70px;} +.p5h {padding: 0 5px;} +.p20h {padding: 0 20px;} +.m30v {margin: 30px 0;} +.m10h {margin:0 10px;} +.m30a {margin: 30px auto;} +.br100 {border-radius: 100%;} +.lh {line-height: 0;} +.oh {overflow:hidden;} +.lh {line-height: 0;} + .panel.input { padding: 0.7rem 1rem; margin-bottom: 0; @@ -31,98 +85,15 @@ html, body {height: 100%;} } .text-gray.active { - color: #111 !important; + color: #111; font-weight: 700; } -#footer { - position: fixed; - margin-top: -80px; /* negative value of footer height */ - height: 70px; - clear:both; - padding: 5px 2rem; - bottom: 0; - width: 100%; - z-index: 100; -} - -.footer-home { - position: relative !important; - margin-top: -28px !important; - height: 28px !important; -} - -.bottom-copay { - width: 50px; - text-align: center; - position: relative; - float: right; - margin-left: 20px; - /* height: 551px; */ -} - .logo { display: block; height: 51px; } -.top-bar-section li:not(.has-form) a:not(.button) { - line-height: 60px; -} - -.top-bar-section li.active:not(.has-form) a:not(.button) { - line-height: 60px; - font-weight: 700; -} - -.top-bar-section ul li>a { - text-transform: uppercase; - font-weight: 100; - font-size: 0.9rem; -} - -.top-bar-section ul li { - width: 25%; -} - -.top-bar-section .label.alert { - vertical-align: super; - margin-left: 5px; -} - -.header { - margin-bottom: 30px; -} - -.header-content { - padding: 2rem; - overflow: hidden; -} - -.header a.button.small-icon { - padding: 0.1rem 0.3rem; - font-size: 0.9rem; - margin-left: 5px; -} - -.header h1, h5, p { - font-weight: 100; - margin-bottom: 0; -} - -.header button, .button { - margin-bottom: 0; -} - -.header h6 { - font-weight: 100; -} - -.top-bar { - height: auto; - width: 100%; -} - .panel { border:0; } @@ -148,31 +119,11 @@ html, body {height: 100%;} border: none; } -.box-backup { - margin: 0.6rem 0; - padding: 2rem 1rem; -} - -a.box-backup { - display: block; -} - -.box-backup i { - margin-bottom: 2rem; -/* display: block; -*/} - -h3 { - font-weight: 100; - font-size: 25px; -} - .line-dashed-v { border-right: 2px dashed #E3E3E3; } .line-dashed-h { - margin: 1rem 0; border-bottom: 1px dashed #E3E3E3; } @@ -203,7 +154,6 @@ span.panel-res { overflow: hidden; } - small.is-valid { font-weight: bold; } @@ -225,7 +175,6 @@ input[type=number]::-webkit-outer-spin-button { margin: 0; } - .small { font-size: 60%; line-height: inherit; @@ -241,45 +190,6 @@ input[type=number]::-webkit-outer-spin-button { hr { margin: 2.25rem 0;} -[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { - display: none !important; -} -.dn {display: none;} -.pr {position: relative;} -.m0 {margin: 0 !important;} -.db {display: block;} -.size-12 { font-size: 12px; } -.size-14 { font-size: 14px; } -.size-16 { font-size: 16px; } -.size-18 { font-size: 18px; } -.size-21 { font-size: 21px; } -.size-24 { font-size: 24px; } -.size-36 { font-size: 36px; } -.size-48 { font-size: 48px; } -.size-60 { font-size: 60px; } -.size-72 { font-size: 72px; } -.m5t {margin-top: 5px;} -.m10t {margin-top: 10px;} -.m5b {margin-bottom: 5px;} -.m10b {margin-bottom: 10px;} -.m15b {margin-bottom: 20px !important;} -.m10r {margin-right: 10px;} -.m10 {margin: 10px !important;} -.m15 {margin: 15px !important;} -.p10t {padding-top: 10px;} -.p0r {padding-right: 0;} -.p70r {padding-right: 70px;} -.p70l {padding-left: 70px;} -.p5h {padding: 0 5px;} -.p20h {padding: 0 20px;} -.m30v {/* margin: 30px 0; */} -.m10h {margin:0 10px;} -.m30a {margin: 30px auto;} -.br100 {border-radius: 100%;} -.lh {line-height: 0;} -.oh {overflow:hidden;} -.lh {line-height: 0;} - .video-small { width: 50px; height: 50px; @@ -487,31 +397,29 @@ a.loading { } @-webkit-keyframes yellow-flash { - 0% { - background-color: #FFFFE0; - opacity:1; - } - 22% { - background-color: #FFFFE0; - } - 100% { - background-color: none; - } + 0% { + background-color: #FFFFE0; + opacity:1; + } + 22% { + background-color: #FFFFE0; + } + 100% { + background-color: none; + } } .highlight{ -webkit-animation-name: yellow-flash; - -webkit-animation-duration: 400ms; - -webkit-animation-iteration-count: 1; - -webkit-animation-timing-function: linear; + -webkit-animation-duration: 400ms; + -webkit-animation-iteration-count: 1; + -webkit-animation-timing-function: linear; -moz-animation-name: yellow-flash; - -moz-animation-duration: 400ms; - -moz-animation-iteration-count: 1; - -moz-animation-timing-function: linear; + -moz-animation-duration: 400ms; + -moz-animation-iteration-count: 1; + -moz-animation-timing-function: linear; } - - /* notifications */ .dr-notification-container { @@ -660,3 +568,299 @@ ul.pagination li.current a:hover, ul.pagination li.current a:focus { float: left; } +/* + * + * Copay Default Template + * + */ + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 300; + src: local('Ubuntu Light'), local('Ubuntu-Light'), url(../font/ubuntu-light.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 400; + src: local('Ubuntu'), url(../font/ubuntu.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 700; + src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(../font/ubuntu-bold.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 700; + src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(../font/ubuntu-bold-italic.woff) format('woff'); +} + +* { + font-family: 'Ubuntu', Helvetica, sans-serif !important; +} + +.logo { + background: transparent url('../img/logo-negative-beta.svg') no-repeat; + background-size: 130px 51px; +} + +.panel { + color: #333; + background: #FFFFFF; + border: 1px solid #EFEFEF; +} + +.transactions .panel { + background: #f5f5f5; +} + +.transactions .panel.pending { + background-color: #fff; +} + +.btransactions .panel { + background: #fff; +} + +.addresses .panel:hover, .addresses .panel.selected { + background: #efefef; +} + +a.box-backup { + color: #111; +} + +a.box-backup:hover { + background-color: #16A085; +} + +a.box-backup:hover i, a.box-backup:hover p { + color: #fff; +} + +.panel-sign { + color: #111; + background: #FAE448; +} + +.panel-ignore { + color: #fff; + background: #111; +} + +.share-wallet.panel { + background-color: #111; + color: #FBE500; +} + +.alert-box.success { + background-color: #CDEFE6; + color: #16A085; + border:none; +} +.alert-box.info { + background-color: #DEE6EF; + border:none; + color: #2C3E50; +} + +.alert-box.error { + background-color: #E8D7D7; + border:none; + color: #C0392B; +} + +.text-warning { + color:#C0392A; +} + +small.is-valid { + color: #04B404; +} + +small.has-error { + color: #f04124; +} + +.radius { + -webkit-border-radius: 10px; + border-radius: 10px; +} + +button.radius, .button.radius { + -webkit-border-radius: 5px; + border-radius: 5px; +} + +/* SECONDARY */ +button.secondary, +.button.secondary { + background-color: #1ABC9C; + color: #fff; +} +button.secondary:hover, +button.secondary:focus, +.button.secondary:hover, +.button.secondary:focus { + background-color: #16A085; + color: #e6e6e6; +} +button.disabled.secondary, +button[disabled].secondary, +.button.disabled.secondary, +.button[disabled].secondary, +button.disabled.secondary:hover, +button.disabled.secondary:focus, +button[disabled].secondary:hover, +button[disabled].secondary:focus, +.button.disabled.secondary:hover, +.button.disabled.secondary:focus, +.button[disabled].secondary:hover, +.button[disabled].secondary:focus { + background-color: #1ABC9C; + color: #E6E6E6; +} + +/* PRIMARY */ +button.primary, +.button.primary { + background-color: #E67E22; + color: #fff; +} +button.primary:hover, +button.primary:focus, +.button.primary:hover, +.button.primary:focus { + background-color: #D86601; + color: #e6e6e6; +} +button.disabled.primary, +button[disabled].primary, +.button.disabled.primary, +.button[disabled].primary, +button.disabled.primary:hover, +button.disabled.primary:focus, +button[disabled].primary:hover, +button[disabled].primary:focus, +.button.disabled.primary:hover, +.button.disabled.primary:focus, +.button[disabled].primary:hover, +.button[disabled].primary:focus { + background-color: #E67E22; + color: #E6E6E6; +} + +/* WARNING */ +button.warning, +.button.warning { + background-color: #C0392A; + color: #fff; +} +button.warning:hover, +button.warning:focus, +.button.warning:hover, +.button.warning:focus { + background-color: #82251A; + color: #e6e6e6; +} +button.disabled.warning, +button[disabled].warning, +.button.disabled.warning, +.button[disabled].warning, +button.disabled.warning:hover, +button.disabled.warning:focus, +button[disabled].warning:hover, +button[disabled].warning:focus, +.button.disabled.warning:hover, +.button.disabled.warning:focus, +.button[disabled].warning:hover, +.button[disabled].warning:focus { + background-color: #C0392A; + color: #E6E6E6; +} + +.text-gray { color: #999 !important;} + +#footer { + background: #2C3E50; + color: #fff; +} + +fieldset legend { + background: #F8F8FB; +} + +input.ng-invalid-wallet-secret { + background: #FFB6C1; +} + +.dr-notification { + background-color: #2C3E50; + color: #bfe2de; + border: 1px solid rgba(4, 94, 123, 0.85); + opacity: 0.9; +} +.dr-notification-close-btn { + background-color: #2C3E50; + color: #fff; + border: 1px solid rgba(4, 94, 123, 0.85); +} + +.dr-notification-image.dr-notification-type-info { + color: #FFF; +} + +.dr-notification-image.dr-notification-type-warning { + color: #FFA226; +} + +.dr-notification-image.dr-notification-type-error { + color: #FF4B4F; +} + +.dr-notification-image.dr-notification-type-success { + color: #B4D455; +} + +.dr-notification-image.success { + color: #B4D455; +} + +.success { + color: #3FBC9C; +} + +.box-setup fieldset { + background: #fff; +} + +.tooltip { + background: #16A085; + color: #fff; + font-weight: normal; + font-size: 14px; + padding: 3px 5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #16A085; +} + +.tooltip>.nub { + border-color:transparent transparent #16A085 transparent; +} +.tooltip.tip-top>.nub { + border-color:#16A085 transparent transparent transparent; +} +.tooltip.tip-right>.nub { + border-color:transparent #16A085 transparent transparent; +} +.tooltip.tip-left>.nub { + border-color:transparent transparent transparent #16A085; +} + + diff --git a/css/mobile.css b/css/mobile.css index ffbccfcda..54d34b3dc 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -4,53 +4,4 @@ * */ -@media (max-width: 1024px) { - .logo { - background-size: 90px 44px !important; - height: 41px; - } - - .header-content { - font-size: 70%; - line-height: 120%; - font-weight: normal; - } - - .line-dashed-v { - border: none !important; - } - .top-bar-section ul li>a { - font-size: 70%; - } -} - -@media (max-width: 640px) { - .hide_menu { - display: none; - } - .show_menu { - display: block; - } - .top-bar-section ul li { - width: 100%; - } - .top-bar-section ul li>a { - padding: 0 0 0 15px; - } - - .top-bar { - background: #1ABC9C; - } - - .header-content .small-7 { - text-align: right !important; - padding-top: 0; - } - - .box-copayers figure { - height: 71px; - width: 71px; - } - -} diff --git a/css/tpl-clean.css b/css/tpl-clean.css deleted file mode 100644 index dd7e6da1e..000000000 --- a/css/tpl-clean.css +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copay Clean Template - * - */ - -.logo { - background: transparent url('../img/logo.png') no-repeat; -} - -#footer { - background: #333; - color: #fff; -} - -.dr-notification { - background-color: #000; - color: #fff; - border: 1px solid #eee; -} diff --git a/css/tpl-default.css b/css/tpl-default.css deleted file mode 100644 index e6cb2e01e..000000000 --- a/css/tpl-default.css +++ /dev/null @@ -1,349 +0,0 @@ -/* - * - * Copay Default Template - * - */ - -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 300; - src: local('Ubuntu Light'), local('Ubuntu-Light'), url(../font/ubuntu-light.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 400; - src: local('Ubuntu'), url(../font/ubuntu.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 700; - src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(../font/ubuntu-bold.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: italic; - font-weight: 700; - src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(../font/ubuntu-bold-italic.woff) format('woff'); -} - -* { - font-family: 'Ubuntu', Helvetica, sans-serif !important; -} - -body { - background: #F8F8FB; -} - -.logo { - background: transparent url('../img/logo-negative-beta.svg') no-repeat; - background-size: 130px 51px; -} - -.top-bar-section li:not(.has-form) a:not(.button) { - background: #1ABC9C; - color: #fff; -} - -.top-bar-section li.active:not(.has-form) a:not(.button) { - background: #F8F8FB; - color: #111; -} - -.top-bar-section li.active:not(.has-form) a:not(.button):hover, .top-bar-section li:not(.has-form) a:not(.button):hover { - background: #16A085; - color: white; -} - -.top-bar-section ul li>a { - color: #111; -} - -.header { - background: #2C3E50; - color: white; -} - -.header h1, h5, p { - color: #93A9BD; -} - -.header h6 { - color: #fff; -} - -.header .line-dashed-v { - border-right: 1px dashed #5A6B7D; -} - -.header a.button.small-icon { - background: white; - color: #2C3E50; -} - -.header a.button.small-icon:hover { - background: #16A085; - color: #fff; -} - -.header-content a { - color: #fff; -} - -.panel { - color: #333; - background: #FFFFFF; - border: 1px solid #EFEFEF; -} - -.transactions .panel { - background: #f5f5f5; -} - -.transactions .panel.pending { - background-color: #fff; -} - -.btransactions .panel { - background: #fff; -} - -.addresses .panel:hover, .addresses .panel.selected { - background: #efefef; -} - -a.box-backup { - color: #111; -} - -a.box-backup:hover { - background-color: #16A085; -} - -a.box-backup:hover i, a.box-backup:hover p { - color: #fff; -} - -.panel-sign { - color: #111; - background: #FAE448; -} - -.panel-ignore { - color: #fff; - background: #111; -} - -.share-wallet.panel { - background-color: #111; - color: #FBE500; -} - -.alert-box.success { - background-color: #CDEFE6; - color: #16A085; - border:none; -} -.alert-box.info { - background-color: #DEE6EF; - border:none; - color: #2C3E50; -} - -.alert-box.error { - background-color: #E8D7D7; - border:none; - color: #C0392B; -} - -.text-warning { - color:#C0392A; -} - -small.is-valid { - color: #04B404; -} - -small.has-error { - color: #f04124; -} - -.radius { - -webkit-border-radius: 10px; - border-radius: 10px; -} - -button.radius, .button.radius { - -webkit-border-radius: 5px; - border-radius: 5px; -} - -/* SECONDARY */ -button.secondary, -.button.secondary { - background-color: #1ABC9C; - color: #fff; -} -button.secondary:hover, -button.secondary:focus, -.button.secondary:hover, -.button.secondary:focus { - background-color: #16A085; - color: #e6e6e6; -} -button.disabled.secondary, -button[disabled].secondary, -.button.disabled.secondary, -.button[disabled].secondary, -button.disabled.secondary:hover, -button.disabled.secondary:focus, -button[disabled].secondary:hover, -button[disabled].secondary:focus, -.button.disabled.secondary:hover, -.button.disabled.secondary:focus, -.button[disabled].secondary:hover, -.button[disabled].secondary:focus { - background-color: #1ABC9C; - color: #E6E6E6; -} - -/* PRIMARY */ -button.primary, -.button.primary { - background-color: #E67E22; - color: #fff; -} -button.primary:hover, -button.primary:focus, -.button.primary:hover, -.button.primary:focus { - background-color: #D86601; - color: #e6e6e6; -} -button.disabled.primary, -button[disabled].primary, -.button.disabled.primary, -.button[disabled].primary, -button.disabled.primary:hover, -button.disabled.primary:focus, -button[disabled].primary:hover, -button[disabled].primary:focus, -.button.disabled.primary:hover, -.button.disabled.primary:focus, -.button[disabled].primary:hover, -.button[disabled].primary:focus { - background-color: #E67E22; - color: #E6E6E6; -} - -/* WARNING */ -button.warning, -.button.warning { - background-color: #C0392A; - color: #fff; -} -button.warning:hover, -button.warning:focus, -.button.warning:hover, -.button.warning:focus { - background-color: #82251A; - color: #e6e6e6; -} -button.disabled.warning, -button[disabled].warning, -.button.disabled.warning, -.button[disabled].warning, -button.disabled.warning:hover, -button.disabled.warning:focus, -button[disabled].warning:hover, -button[disabled].warning:focus, -.button.disabled.warning:hover, -.button.disabled.warning:focus, -.button[disabled].warning:hover, -.button[disabled].warning:focus { - background-color: #C0392A; - color: #E6E6E6; -} - -.text-gray { color: #999 !important;} - -#footer { - background: #2C3E50; - color: #fff; -} - -fieldset legend { - background: #F8F8FB; -} - -input.ng-invalid-wallet-secret { - background: #FFB6C1; -} - -.dr-notification { - background-color: #2C3E50; - color: #bfe2de; - border: 1px solid rgba(4, 94, 123, 0.85); - opacity: 0.9; -} -.dr-notification-close-btn { - background-color: #2C3E50; - color: #fff; - border: 1px solid rgba(4, 94, 123, 0.85); -} - -.dr-notification-image.dr-notification-type-info { - color: #FFF; -} - -.dr-notification-image.dr-notification-type-warning { - color: #FFA226; -} - -.dr-notification-image.dr-notification-type-error { - color: #FF4B4F; -} - -.dr-notification-image.dr-notification-type-success { - color: #B4D455; -} - -.dr-notification-image.success { - color: #B4D455; -} - -.success { - color: #3FBC9C; -} - -.box-setup fieldset { - background: #fff; -} - -.tooltip { - background: #16A085; - color: #fff; - font-weight: normal; - font-size: 14px; - padding: 3px 5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border: 1px solid #16A085; -} - -.tooltip>.nub { - border-color:transparent transparent #16A085 transparent; -} -.tooltip.tip-top>.nub { - border-color:#16A085 transparent transparent transparent; -} -.tooltip.tip-right>.nub { - border-color:transparent #16A085 transparent transparent; -} -.tooltip.tip-left>.nub { - border-color:transparent transparent transparent #16A085; -} - diff --git a/index.html b/index.html index 58a9e6342..e337dfde1 100644 --- a/index.html +++ b/index.html @@ -1,1036 +1,84 @@ - - - - - Copay - Multisignature Wallet - - - - - - - - -
-
-
-
-
- -
-
- -
- Balance
- - - - {{totalBalance || 0 - |noFractionNumber}} {{$root.unitName}} - -
-
- Available to Spend
- - - - {{availableBalance || 0|noFractionNumber}} {{$root.unitName}} - -
- -
-
- - - -
- -
-
-
-
-

Share this secret with your other copayers -

-
-
-
-

{{$root.wallet.getSecret()}}

-
-
-
-
{{$root.wallet.getName()}}
-

{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet

-
-
-
-
-
-
-
-
-
-
People on this wallet
- -
- -
- {{c}} -
-
- you - {{c.nick}} - - Backup ready - - [ID: {{c.peerId}}] -
-
- -
-

Waiting for other copayers to join

-
- -
-
-
-
-
- Download seed backup - - -
-
-
-
- -
- + + + + + Copay - Multisignature Wallet + + + + + + + + +
-
-
-
+
+ +
+ +
- + + + - - + + + + + + + + + + + + + + + + + + -

- Copay is a free, open-source, multisignature bitcoin wallet. A single-owner bitcoin wallet's security depends on carefully securing the private keys. With copay you can have multiple people controlling the funds, using bitcoin's multisignature functionality, requiring no trust in any third party. -

- Create -
- - -
- -
- + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/js/controllers/backup.js b/js/controllers/backup.js index f6fa34ad1..445c8e4a9 100644 --- a/js/controllers/backup.js +++ b/js/controllers/backup.js @@ -2,10 +2,18 @@ angular.module('copayApp.controllers').controller('BackupController', function($scope, $rootScope, $location, $window, $timeout, $modal, backupService, walletFactory, controllerUtils) { - $scope.download = function() { - backupService.download($rootScope.wallet); + + $scope.backup = function() { + var w = $rootScope.wallet; + w.setBackupReady(); + backupService.download(w); }; + $scope.dowloadBackup = function() { + var w = $rootScope.wallet; + backupService.download(w); + } + $scope.deleteWallet = function() { var w = $rootScope.wallet; w.disconnect(); diff --git a/js/controllers/footer.js b/js/controllers/footer.js deleted file mode 100644 index 491958f64..000000000 --- a/js/controllers/footer.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('FooterController', function($rootScope, $sce, $scope, $http) { - - $scope.networkName = config.networkName; - - if (config.themes && Array.isArray(config.themes) && config.themes[0]) { - $scope.themes = config.themes; - } else { - $scope.themes = ['default']; - } - - $scope.theme = 'css/tpl-' + $scope.themes[0] + '.css'; - - $scope.change_theme = function(name) { - $scope.theme = 'css/tpl-' + name + '.css'; - }; - $scope.version = copay.version; - - $scope.getVideoURL = function(copayer) { - if (config.disableVideo) return; - - var vi = $rootScope.videoInfo[copayer] - if (!vi) return; - - if ($rootScope.wallet.getOnlinePeerIDs().indexOf(copayer) === -1) { - // peer disconnected, remove his video - delete $rootScope.videoInfo[copayer] - return; - } - - var encoded = vi.url; - var url = decodeURI(encoded); - var trusted = $sce.trustAsResourceUrl(url); - return trusted; - }; -}); diff --git a/js/controllers/send.js b/js/controllers/send.js index e9f3d92ec..7b7c87ce9 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -206,7 +206,7 @@ angular.module('copayApp.controllers').controller('SendController', $scope.openAddressBookModal = function() { var modalInstance = $modal.open({ - templateUrl: 'addressBookModal.html', + templateUrl: 'views/modals/addressbook.html', windowClass: 'tiny', controller: function($scope, $modalInstance) { diff --git a/js/controllers/header.js b/js/controllers/sidebar.js similarity index 56% rename from js/controllers/header.js rename to js/controllers/sidebar.js index 3da4cc23e..38b8540c4 100644 --- a/js/controllers/header.js +++ b/js/controllers/sidebar.js @@ -1,27 +1,56 @@ 'use strict'; -angular.module('copayApp.controllers').controller('HeaderController', - function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService) { +angular.module('copayApp.controllers').controller('SidebarController', + function($scope, $rootScope, $sce, $location, $http, notification, controllerUtils) { + + $scope.version = copay.version; + $scope.networkName = config.networkName; $scope.menu = [{ 'title': 'Addresses', 'icon': 'fi-address-book', - 'link': '#/addresses' + 'link': 'addresses' }, { 'title': 'Transactions', 'icon': 'fi-clipboard-pencil', - 'link': '#/transactions' + 'link': 'transactions' }, { 'title': 'Send', 'icon': 'fi-arrow-right', - 'link': '#/send' + 'link': 'send' }, { 'title': 'More...', 'icon': 'fi-download', - 'link': '#/backup' + 'link': 'backup' }]; - $scope.getNumber = function(num) { - return new Array(num); + $scope.signout = function() { + logout(); + }; + + // Ensures a graceful disconnect + window.onbeforeunload = logout; + + $scope.$on('$destroy', function() { + window.onbeforeunload = undefined; + }); + + + $scope.refresh = function() { + var w = $rootScope.wallet; + w.connectToAll(); + if ($rootScope.addrInfos.length > 0) { + controllerUtils.updateBalance(function() { + $rootScope.$digest(); + }); + } + }; + + function logout() { + var w = $rootScope.wallet; + if (w) { + w.disconnect(); + controllerUtils.logout(); + } } $http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) { @@ -41,79 +70,7 @@ angular.module('copayApp.controllers').controller('HeaderController', } }); - // Init socket handlers (with no wallet yet) controllerUtils.setSocketHandlers(); - $scope.isActive = function(item) { - if (item.link && item.link.replace('#', '') == $location.path()) { - return true; - } - return false; - }; - - $scope.signout = function() { - logout(); - }; - - $scope.refresh = function() { - var w = $rootScope.wallet; - w.connectToAll(); - if ($rootScope.addrInfos.length > 0) { - controllerUtils.updateBalance(function() { - $rootScope.$digest(); - }); - } - }; - - $rootScope.isCollapsed = true; - - $scope.toggleCollapse = function() { - $rootScope.isCollapsed = !$rootScope.isCollapsed; - }; - - function logout() { - var w = $rootScope.wallet; - if (w) { - w.disconnect(); - controllerUtils.logout(); - } - } - - // Ensures a graceful disconnect - window.onbeforeunload = logout; - - $scope.$on('$destroy', function() { - window.onbeforeunload = undefined; - }); - - $scope.backup = function() { - var w = $rootScope.wallet; - w.setBackupReady(); - backupService.download(w); - }; - - $scope.dowloadBackup = function() { - var w = $rootScope.wallet; - backupService.download(w); - } - - $scope.getVideoURL = function(copayer) { - if (config.disableVideo) return; - - var vi = $rootScope.videoInfo[copayer] - if (!vi) return; - - if ($rootScope.wallet.getOnlinePeerIDs().indexOf(copayer) === -1) { - // peer disconnected, remove his video - delete $rootScope.videoInfo[copayer] - return; - } - - var encoded = vi.url; - var url = decodeURI(encoded); - var trusted = $sce.trustAsResourceUrl(url); - return trusted; - }; - }); diff --git a/js/controllers/video.js b/js/controllers/video.js new file mode 100644 index 000000000..159fcc277 --- /dev/null +++ b/js/controllers/video.js @@ -0,0 +1,25 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('VideoController', + function($scope, $rootScope, $sce) { + + $scope.getVideoURL = function(copayer) { + if (config.disableVideo) return; + + var vi = $rootScope.videoInfo[copayer] + if (!vi) return; + + if ($rootScope.wallet.getOnlinePeerIDs().indexOf(copayer) === -1) { + // peer disconnected, remove his video + delete $rootScope.videoInfo[copayer] + return; + } + + var encoded = vi.url; + var url = decodeURI(encoded); + var trusted = $sce.trustAsResourceUrl(url); + return trusted; + }; + +}); + diff --git a/js/routes.js b/js/routes.js index e4fe14cff..910fac48d 100644 --- a/js/routes.js +++ b/js/routes.js @@ -7,49 +7,50 @@ angular $routeProvider .when('/', { - templateUrl: 'signin.html', + templateUrl: 'views/signin.html', validate: false }) .when('/signin', { - templateUrl: 'signin.html', + templateUrl: 'views/signin.html', validate: false }) .when('/import', { - templateUrl: 'import.html', + templateUrl: 'views/import.html', validate: false }) .when('/setup', { - templateUrl: 'setup.html', + templateUrl: 'views/setup.html', validate: false }) .when('/addresses', { - templateUrl: 'addresses.html', + templateUrl: 'views/addresses.html', validate: true }) .when('/transactions', { - templateUrl: 'transactions.html', + templateUrl: 'views/transactions.html', validate: true }) .when('/send', { - templateUrl: 'send.html', + templateUrl: 'views/send.html', validate: true }) .when('/backup', { - templateUrl: 'backup.html', + templateUrl: 'views/backup.html', validate: true }) .when('/settings', { - templateUrl: 'settings.html', + templateUrl: 'views/settings.html', validate: false }) .when('/unsupported', { - templateUrl: 'unsupported.html' + templateUrl: 'views/unsupported.html' }) .when('/uri_payment/:data', { - templateUrl: 'uri_payment.html' + templateUrl: 'views/uri_payment.html' }) .otherwise({ - templateUrl: '404.html' + templateUrl: 'views/errors/404.html', + title: 'Error' }); }); @@ -58,8 +59,8 @@ angular .module('copayApp') .config(function($locationProvider) { $locationProvider - .html5Mode(false); - //.hashPrefix('!'); + .html5Mode(true) + .hashPrefix('!'); }) .run(function($rootScope, $location) { $rootScope.$on('$routeChangeStart', function(event, next, current) { diff --git a/views/addresses.html b/views/addresses.html new file mode 100644 index 000000000..b9407f29b --- /dev/null +++ b/views/addresses.html @@ -0,0 +1,60 @@ +
+
+
+
+ +
+ +

+ + + + + + {{balanceByAddr[selectedAddr.address] || 0 | noFractionNumber}} + + + + {{selectedAddr.address}}
+ {{selectedAddr.balance || 0|noFractionNumber}} {{$root.unitName}} +
+
+

+
+
+
+

Create a New Address

+ +
+
+
+
+ diff --git a/views/backup.html b/views/backup.html new file mode 100644 index 000000000..7f0760e91 --- /dev/null +++ b/views/backup.html @@ -0,0 +1,18 @@ +
+
+

Backup

+

Its important to back up your wallet so that you can recover your wallet in case of disaster

+ +
+
+
+

Delete Wallet

+

If all funds have been removed from your wallet and you do not wish to have the wallet data stored on your computer anymore, you can delete your wallet.

+
+ Delete +
+
+
+ diff --git a/views/errors/404.html b/views/errors/404.html new file mode 100644 index 000000000..a171f16e8 --- /dev/null +++ b/views/errors/404.html @@ -0,0 +1,4 @@ +

404

+

Page not found

+

go back...

+ diff --git a/views/import.html b/views/import.html new file mode 100644 index 000000000..14edf580c --- /dev/null +++ b/views/import.html @@ -0,0 +1,35 @@ +
+
+ + {{ importStatus }} +
+
+
+
+
+

{{title}}

+
+ Choose backup file from your computer + +
+
+ +
+ + +
+
+
+
+
+ « Back + +
+
+
+
+
+
+ diff --git a/views/includes/copayers.html b/views/includes/copayers.html new file mode 100644 index 000000000..c1961c164 --- /dev/null +++ b/views/includes/copayers.html @@ -0,0 +1,70 @@ +
+
+
+
+

Share this secret with your other copayers +

+
+
+
+

{{$root.wallet.getSecret()}}

+
+
+
+
{{$root.wallet.getName()}}
+

{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet

+
+
+
+
+
+
+
+
+
+
People on this wallet
+
+
+

Waiting for other copayers to join

+
+ +
+
+
+
+
+ Download seed backup + + +
+
+
+
+ diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html new file mode 100644 index 000000000..dda9d5d1f --- /dev/null +++ b/views/includes/sidebar.html @@ -0,0 +1,63 @@ +
+ + Copay v{{version}} + + Project Homapage + +
+ {{$root.wallet.getName()}} +
+
+ {{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet + [LIVENET] + [TESTNET] +
+ + +
+ Balance
+ + + + {{totalBalance || 0 + |noFractionNumber}} {{$root.unitName}} + +
+
+ Available to Spend
+ + + + {{availableBalance || 0|noFractionNumber}} {{$root.unitName}} + +
+ + + +
+ +
+ diff --git a/views/includes/video.html b/views/includes/video.html new file mode 100644 index 000000000..651181d9c --- /dev/null +++ b/views/includes/video.html @@ -0,0 +1,28 @@ +
+ + {{c}} +
+ you + {{c.nick}} + + Backup ready + + [ID: {{c.peerId}}] +
+
+ diff --git a/views/modals/addressbook.html b/views/modals/addressbook.html new file mode 100644 index 000000000..8dc679230 --- /dev/null +++ b/views/modals/addressbook.html @@ -0,0 +1,20 @@ +

Add Address Book Entry

+
+ + + Cancel + +
+× + diff --git a/views/send.html b/views/send.html new file mode 100644 index 000000000..abf12a60b --- /dev/null +++ b/views/send.html @@ -0,0 +1,146 @@ +
+
+
+

{{title}}

+
+
+
+
+ +
+ +
+
+ +
+
+ Cancel +
+
+
+
+ +
+
+ + + Get QR code + + +
+
+
+ +
+
+
+
+
+ +
+
+
+ + +
+ {{$root.unitName}} +
+
+
+
+ + Total amount for this transaction: + +
+ {{amount + defaultFee |noFractionNumber}} {{$root.unitName}} + + {{ ((amount + defaultFee) * unitToBtc)|noFractionNumber:8}} BTC + +
+ + Including fee of {{defaultFee|noFractionNumber}} {{$root.unitName}} + +
+
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+

Address Book

+

Empty. Create an alias for your addresses

+ + + + + + + + + + + + + + + + + + + +
LabelAddressCreatorDate 
{{info.label}}{{addr}}{{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}}{{info.hidden ? + 'Enable' : 'Disable'}}
+ +
+
+
+ diff --git a/views/settings.html b/views/settings.html new file mode 100644 index 000000000..7496b40a1 --- /dev/null +++ b/views/settings.html @@ -0,0 +1,71 @@ +
+
+
+
+

{{title}}

+
+ Bitcoin Network + + +
+ Network has been fixed to + {{networkName}} in this setup. See copay.io + for options to use Copay on both livenet and testnet. +
+
+
+ Wallet Unit + +
+
+ Videoconferencing + + +
+
+ Insight API server + + + + + + + +

+ Insight API server is open-source software. You can run your own instance, check Insight API Homepage + +

+
+ PeerJS server + + + + + + + + + + +

+ PeerJS Server is open-source software. You can run your own instance, or use PeerJS Server cloud. Check PeerJS Server +

+
+
+
+
+
+ « Back + +
+
+
+
+
+ diff --git a/views/setup.html b/views/setup.html new file mode 100644 index 000000000..b8c83f8fa --- /dev/null +++ b/views/setup.html @@ -0,0 +1,74 @@ +
+
+ + Creating wallet... +
+
+
+
+
+

Create new wallet

+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ « Back + +
+
+
+
+
+
+ diff --git a/views/signin.html b/views/signin.html new file mode 100644 index 000000000..e420e2b52 --- /dev/null +++ b/views/signin.html @@ -0,0 +1,60 @@ + + + diff --git a/views/transactions.html b/views/transactions.html new file mode 100644 index 000000000..a1e809356 --- /dev/null +++ b/views/transactions.html @@ -0,0 +1,181 @@ +
+
+
+

Transaction proposals ({{txs.length}})

+ + +
+
+
+
+
+ {{out.value | noFractionNumber}} {{$root.unitName}}
+
+
+ +
+
+
+
+
{{tx.createdTs | amCalendar}}
+
+
+ +
+
+ "{{tx.comment}}" - {{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}} +
+ +
+
+ + {{cId}} + +
+ + +
+ {{$root.wallet.publicKeyRing.nicknameForCopayer(cId)}} +
+
+
+ +
+
+
+ + +
+
+ +
+
+ +
+
+ Transaction finally rejected +
+
+
+ Sent +
+
+ Transaction ID: + + {{tx.sentTxid}} + +
+
+

+ One signature missing +

+

+ {{tx.missingSignatures}} signatures missing

+
+ Fee: {{tx.fee|noFractionNumber}} {{$root.unitName}} + Proposal ID: {{tx.ntxid}} +
+
+
+
+

No pending transactions proposals.

+

No transactions proposals yet.

+ +
+
+
+

+ Last transactions + + + +

+ + +
+
+ No transactions yet. +
+
+
+
+ +
+
+ first seen at + +
+
+ mined at + +
+
+
+
+
+
+
+
+ {{vin.value| noFractionNumber}} {{$root.unitName}} +

+ +

+
+
+
+ +
+
+
+ {{vout.value| noFractionNumber}} {{$root.unitName}} +

+ +

+
+
+
+
+
+
+
Fees: {{btx.fees | noFractionNumber}} {{$root.unitName}}
+
Confirmations: {{btx.confirmations || 0}}
+
Total: {{btx.valueOut| noFractionNumber}} {{$root.unitName}}
+
+
+
+
+
+
+
+ diff --git a/views/unsupported.html b/views/unsupported.html new file mode 100644 index 000000000..75f043ef0 --- /dev/null +++ b/views/unsupported.html @@ -0,0 +1,13 @@ +

Browser unsupported

+

+ Copay uses webRTC for peer-to-peer communications, + but your browser does not support it. + Please use + a current version of Google Chrome, Mozilla Firefox, or Opera. +

+ + For more information + on supported browsers please check http://www.webrtc.org/ +

+ + diff --git a/views/uri_payment.html b/views/uri_payment.html new file mode 100644 index 000000000..6c488ee8d --- /dev/null +++ b/views/uri_payment.html @@ -0,0 +1,11 @@ +

+Preparing payment... +

+
+

Protocol: {{protocol}}

+

To: {{address}}

+

Amount: {{amount}}

+

Message:

+
{{message}}
+
+ From 91c7ab100df5f145c2a4a465c0cc39ee915a30b8 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 16 Jul 2014 19:00:34 -0300 Subject: [PATCH 04/58] Fixes karma tests --- js/controllers/backup.js | 2 +- js/controllers/sidebar.js | 5 +++++ test/unit/controllers/controllersSpec.js | 6 +++--- views/backup.html | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/js/controllers/backup.js b/js/controllers/backup.js index 445c8e4a9..6a986f21a 100644 --- a/js/controllers/backup.js +++ b/js/controllers/backup.js @@ -9,7 +9,7 @@ angular.module('copayApp.controllers').controller('BackupController', backupService.download(w); }; - $scope.dowloadBackup = function() { + $scope.downloadBackup = function() { var w = $rootScope.wallet; backupService.download(w); } diff --git a/js/controllers/sidebar.js b/js/controllers/sidebar.js index 38b8540c4..82b8cf191 100644 --- a/js/controllers/sidebar.js +++ b/js/controllers/sidebar.js @@ -53,6 +53,11 @@ angular.module('copayApp.controllers').controller('SidebarController', } } + // ng-repeat defined number of times instead of repeating over array? + $scope.getNumber = function(num) { + return new Array(num); + } + $http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) { var toInt = function(s) { return parseInt(s); diff --git a/test/unit/controllers/controllersSpec.js b/test/unit/controllers/controllersSpec.js index 58ef7cc73..91ac09904 100644 --- a/test/unit/controllers/controllersSpec.js +++ b/test/unit/controllers/controllersSpec.js @@ -44,7 +44,7 @@ describe("Unit: Controllers", function() { it('Backup controller #download', function() { scope.wallet.setEnc('1234567'); expect(saveAsLastCall).equal(null); - scope.download(); + scope.downloadBackup(); expect(saveAsLastCall.size).equal(7); expect(saveAsLastCall.type).equal('text/plain;charset=utf-8'); }); @@ -220,7 +220,7 @@ describe("Unit: Controllers", function() { }); - describe("Unit: Header Controller", function() { + describe("Unit: Sidebar Controller", function() { var scope, $httpBackendOut; var GH = 'https://api.github.com/repos/bitpay/copay/tags'; beforeEach(inject(function($controller, $injector) { @@ -241,7 +241,7 @@ describe("Unit: Controllers", function() { beforeEach(inject(function($controller, $rootScope) { rootScope = $rootScope; scope = $rootScope.$new(); - headerCtrl = $controller('HeaderController', { + headerCtrl = $controller('SidebarController', { $scope: scope, }); })); diff --git a/views/backup.html b/views/backup.html index 7f0760e91..4a9a48bba 100644 --- a/views/backup.html +++ b/views/backup.html @@ -3,7 +3,7 @@

Backup

Its important to back up your wallet so that you can recover your wallet in case of disaster

From 4469cf1f0a0185a863556fc70e2769a969d29c12 Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 17 Jul 2014 12:22:55 -0300 Subject: [PATCH 05/58] clean css --- css/main.css | 619 ++++++++++----------------------------------------- 1 file changed, 112 insertions(+), 507 deletions(-) diff --git a/css/main.css b/css/main.css index 571353bd2..1563a9f4f 100644 --- a/css/main.css +++ b/css/main.css @@ -4,9 +4,62 @@ * */ +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 300; + src: local('Ubuntu Light'), local('Ubuntu-Light'), url(../font/ubuntu-light.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 400; + src: local('Ubuntu'), url(../font/ubuntu.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 700; + src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(../font/ubuntu-bold.woff) format('woff'); +} +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 700; + src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(../font/ubuntu-bold-italic.woff) format('woff'); +} + +@keyframes rotateThis { + from { transform: scale( 1 ) rotate( 0deg ); } + to { transform: scale( 1 ) rotate( 360deg ); } +} + +@-webkit-keyframes rotateThis { + from { -webkit-transform: scale( 1 ) rotate( 0deg ); } + to { -webkit-transform: scale( 1 ) rotate( 360deg ); } +} + +@-webkit-keyframes yellow-flash { + 0% { + background-color: #FFFFE0; + opacity:1; + } + 22% { + background-color: #FFFFE0; + } + 100% { + background-color: none; + } +} + +#qr-canvas { display: none; } +#qrcode-scanner-video { + display: block; + margin: 0 auto; +} + * { - margin:0; - padding:0; + font-family: 'Ubuntu', Helvetica, sans-serif !important; } body, html{ @@ -75,50 +128,6 @@ body, html{ .oh {overflow:hidden;} .lh {line-height: 0;} -.panel.input { - padding: 0.7rem 1rem; - margin-bottom: 0; - border-radius: 5px; - background: #F8F8F8; - -moz-box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.10); - box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.10); -} - -.text-gray.active { - color: #111; - font-weight: 700; -} - -.logo { - display: block; - height: 51px; -} - -.panel { - border:0; -} - -.panel.status { - margin: 0; -} - -.addresses .panel { - font-size: 0.9rem; -} - -.transactions .panel { - border: 1px solid #eee; -} - -.transactions .panel { - padding: 0; -} - -.pending table { - width: 100%; - border: none; -} - .line-dashed-v { border-right: 2px dashed #E3E3E3; } @@ -127,21 +136,6 @@ body, html{ border-bottom: 1px dashed #E3E3E3; } -.panel p { - margin-bottom: 0; -} - -span.panel-res { - float: right; - padding: 0.4rem 0.55rem; - margin: 0 1rem; - border-radius: 1rem; -} - -.pending button { - margin: 0 10px 0 0; -} - .line { border-top: 1px solid #f2f2f2; margin: 0.5rem 0 1rem; @@ -154,20 +148,6 @@ span.panel-res { overflow: hidden; } -small.is-valid { - font-weight: bold; -} - -small.has-error { - font-weight: bold; -} - -.totalAmount { - line-height: 120%; - margin-top:2px; -} - - /* Turn Off Number Input Spinners */ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { @@ -175,214 +155,12 @@ input[type=number]::-webkit-outer-spin-button { margin: 0; } -.small { - font-size: 60%; - line-height: inherit; -} - -.new-address { - width: 220px; -} - -.transactions button, .transactions .button { - padding: 0.5rem 2rem; -} - -hr { margin: 2.25rem 0;} - -.video-small { - width: 50px; - height: 50px; - border-radius: 0.3rem; - display: inline; - float: right; -} - -.setup .video-small { - float: none !important; -} - -.online { - background-color: black; - border: 3px solid #1ABC9C; -} -.online:hover { - border-color: #16A085; -} -.offline { - border: 3px solid gray; - opacity: 0.4; -} - -.tx-copayers { - overflow: hidden; - padding: 10px; -} - -.box-copayers { - padding: 0.5rem 2rem 0.5rem 1rem; - float: left; -} - -.box-copayers figure { - width: 51px; - height: 63px; - border-top-left-radius: 4px 4px; - border-bottom-left-radius: 4px 4px; - overflow: hidden; - margin-right: 0.8px; -} - -.box-status { - width: 16px; - height: 55px; - border-top-right-radius: 4px 4px; - border-bottom-right-radius: 4px 4px; - float: left; - overflow: hidden; -} - -.icon-status { - background: #2C3E50; - width: 16px; - float: left; - text-align: center; - display: block; - margin: 0.8px; - padding: 2.7px; -} - -.box-setup { - margin-bottom: 25px; -} - -.box-setup-copayers { - position: relative; - background: #ffffff; - border: 2px solid #eee; -} - -.box-setup-copayers:after, .box-setup-copayers:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} - -.box-setup-copayers:after { - border-color: rgba(255, 255, 255, 0); - border-bottom-color: #ffffff; - border-width: 20px; - margin-left: -20px; -} - -.box-setup-copayers:before { - border-color: rgba(238, 238, 238, 0); - border-bottom-color: #eee; - border-width: 23px; - margin-left: -23px; -} - -.box-setup-copayers-fix { - overflow: hidden; - padding: 10px 10px 0 10px; -} - -.box-setup-copay { - width: 60px; - height: 60px; - float: left; - margin-right: 10px; - margin-bottom: 10px; - border: 3px solid #eee; - opacity: 0.3; - border-radius: 0.3rem; -} - -.box-setup-copay-required { - border: 3px solid #1ABC9C; - opacity: 1; -} - -.tx-copayers { - background: #F8F8F8; - -moz-box-shadow: inset 0px 0px 4px 0px rgba(0,0,0,0.05), inset 0px 1px 1px 0px rgba(0,0,0,0.05); - box-shadow: inset 0px 0px 4px 0px rgba(0,0,0,0.05), inset 0px 1px 1px 0px rgba(0,0,0,0.05); -} - -.box-copayers .icon-inactive { - color: #4C5B69; -} - -.box-copayers .icon-active { - color: #fff; -} - -.box-copayers .icon-active-check { - color: #fff; - background: #3FBC9C; -} - -.box-copayers .icon-active-x { - color: #fff; - background: #C0392B; -} - -.box-note { - text-align: center; - clear: both; - font-style: italic; - color: gray; - margin-bottom: 10px; -} - -.box-signin { - padding: 20px 40px; - border: 1px solid #eee; - background-color: #fff; - text-align: center; - margin-bottom: 20px; -} - -.box-signin h3 { - margin-bottom: 20px; -} - -.box-signin .button { - margin: 20px 0; - width: 200px; -} - -a.loading { - background: #fff; -} - -#qr-canvas { display: none; } -#qrcode-scanner-video { - display: block; - margin: 0 auto; -} - -@keyframes rotateThis { - from { transform: scale( 1 ) rotate( 0deg ); } - to { transform: scale( 1 ) rotate( 360deg ); } -} - -@-webkit-keyframes rotateThis { - from { -webkit-transform: scale( 1 ) rotate( 0deg ); } - to { -webkit-transform: scale( 1 ) rotate( 360deg ); } -} - .icon-rotate { - animation-name: rotateThis; - animation-duration: 2s; - animation-iteration-count: infinite; - animation-timing-function: linear; - -webkit-animation-name: rotateThis; + animation-name: rotateThis; + animation-duration: 2s; + animation-iteration-count: infinite; + animation-timing-function: linear; + -webkit-animation-name: rotateThis; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; @@ -396,19 +174,6 @@ a.loading { vertical-align:middle; } -@-webkit-keyframes yellow-flash { - 0% { - background-color: #FFFFE0; - opacity:1; - } - 22% { - background-color: #FFFFE0; - } - 100% { - background-color: none; - } -} - .highlight{ -webkit-animation-name: yellow-flash; -webkit-animation-duration: 400ms; @@ -486,6 +251,7 @@ a.loading { .dr-notification-close-btn i { padding-left: 3px; } + .dr-notification-close-btn:hover { -webkit-transform: scale3d(1.25, 1.25, 1); -moz-transform: scale3d(1.25, 1.25, 1); @@ -526,6 +292,38 @@ a.loading { font-size: 16px; } +.dr-notification { + background-color: #2C3E50; + color: #bfe2de; + border: 1px solid rgba(4, 94, 123, 0.85); + opacity: 0.9; +} +.dr-notification-close-btn { + background-color: #2C3E50; + color: #fff; + border: 1px solid rgba(4, 94, 123, 0.85); +} + +.dr-notification-image.dr-notification-type-info { + color: #FFF; +} + +.dr-notification-image.dr-notification-type-warning { + color: #FFA226; +} + +.dr-notification-image.dr-notification-type-error { + color: #FF4B4F; +} + +.dr-notification-image.dr-notification-type-success { + color: #B4D455; +} + +.dr-notification-image.success { + color: #B4D455; +} + p.dr-notification-text { margin-top: -5px; font-size: 12px; @@ -546,61 +344,29 @@ ul.pagination li.current a:hover, ul.pagination li.current a:focus { background: #16A085; } -.alert-box a { - color:white; +.tooltip { + background: #16A085; + color: #fff; + font-weight: normal; + font-size: 14px; + padding: 3px 5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #16A085; } -.input-note { - margin-top: -10px; - display: block; - margin-bottom: 1rem; +.tooltip>.nub { + border-color:transparent transparent #16A085 transparent; } -.addressbook-disabled td { - color: #ccc; +.tooltip.tip-top>.nub { + border-color:#16A085 transparent transparent transparent; } -.addressbook-disabled td a { - color: #7A9FB6; +.tooltip.tip-right>.nub { + border-color:transparent #16A085 transparent transparent; } - -.back-button { - padding-top: 15px; - display: block; - float: left; -} - -/* - * - * Copay Default Template - * - */ - -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 300; - src: local('Ubuntu Light'), local('Ubuntu-Light'), url(../font/ubuntu-light.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 400; - src: local('Ubuntu'), url(../font/ubuntu.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 700; - src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(../font/ubuntu-bold.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: italic; - font-weight: 700; - src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(../font/ubuntu-bold-italic.woff) format('woff'); -} - -* { - font-family: 'Ubuntu', Helvetica, sans-serif !important; +.tooltip.tip-left>.nub { + border-color:transparent transparent transparent #16A085; } .logo { @@ -608,89 +374,6 @@ ul.pagination li.current a:hover, ul.pagination li.current a:focus { background-size: 130px 51px; } -.panel { - color: #333; - background: #FFFFFF; - border: 1px solid #EFEFEF; -} - -.transactions .panel { - background: #f5f5f5; -} - -.transactions .panel.pending { - background-color: #fff; -} - -.btransactions .panel { - background: #fff; -} - -.addresses .panel:hover, .addresses .panel.selected { - background: #efefef; -} - -a.box-backup { - color: #111; -} - -a.box-backup:hover { - background-color: #16A085; -} - -a.box-backup:hover i, a.box-backup:hover p { - color: #fff; -} - -.panel-sign { - color: #111; - background: #FAE448; -} - -.panel-ignore { - color: #fff; - background: #111; -} - -.share-wallet.panel { - background-color: #111; - color: #FBE500; -} - -.alert-box.success { - background-color: #CDEFE6; - color: #16A085; - border:none; -} -.alert-box.info { - background-color: #DEE6EF; - border:none; - color: #2C3E50; -} - -.alert-box.error { - background-color: #E8D7D7; - border:none; - color: #C0392B; -} - -.text-warning { - color:#C0392A; -} - -small.is-valid { - color: #04B404; -} - -small.has-error { - color: #f04124; -} - -.radius { - -webkit-border-radius: 10px; - border-radius: 10px; -} - button.radius, .button.radius { -webkit-border-radius: 5px; border-radius: 5px; @@ -785,82 +468,4 @@ button[disabled].warning:focus, .text-gray { color: #999 !important;} -#footer { - background: #2C3E50; - color: #fff; -} - -fieldset legend { - background: #F8F8FB; -} - -input.ng-invalid-wallet-secret { - background: #FFB6C1; -} - -.dr-notification { - background-color: #2C3E50; - color: #bfe2de; - border: 1px solid rgba(4, 94, 123, 0.85); - opacity: 0.9; -} -.dr-notification-close-btn { - background-color: #2C3E50; - color: #fff; - border: 1px solid rgba(4, 94, 123, 0.85); -} - -.dr-notification-image.dr-notification-type-info { - color: #FFF; -} - -.dr-notification-image.dr-notification-type-warning { - color: #FFA226; -} - -.dr-notification-image.dr-notification-type-error { - color: #FF4B4F; -} - -.dr-notification-image.dr-notification-type-success { - color: #B4D455; -} - -.dr-notification-image.success { - color: #B4D455; -} - -.success { - color: #3FBC9C; -} - -.box-setup fieldset { - background: #fff; -} - -.tooltip { - background: #16A085; - color: #fff; - font-weight: normal; - font-size: 14px; - padding: 3px 5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border: 1px solid #16A085; -} - -.tooltip>.nub { - border-color:transparent transparent #16A085 transparent; -} -.tooltip.tip-top>.nub { - border-color:#16A085 transparent transparent transparent; -} -.tooltip.tip-right>.nub { - border-color:transparent #16A085 transparent transparent; -} -.tooltip.tip-left>.nub { - border-color:transparent transparent transparent #16A085; -} - - +/*-----------------------------------------------------------------*/ \ No newline at end of file From 67190909b6137683201b84b3dee982e8711b5363 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 17 Jul 2014 15:08:03 -0300 Subject: [PATCH 06/58] include duplicate: angular-route-min --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index e337dfde1..dc7f47cb5 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,6 @@ - From 0ffb8eb42f9da7cba975af951ffe7a83226fea41 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 17 Jul 2014 15:09:44 -0300 Subject: [PATCH 07/58] New schema for signin/join a wallet --- js/controllers/signin.js | 22 ++++++++++ views/signin.html | 87 ++++++++++++++++++++++------------------ 2 files changed, 69 insertions(+), 40 deletions(-) diff --git a/js/controllers/signin.js b/js/controllers/signin.js index 6503d46ab..3c7a097d8 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -75,4 +75,26 @@ angular.module('copayApp.controllers').controller('SigninController', }); }); } + + $scope.isHome = 1; + $scope.isJoin = 0; + $scope.isOpen = 0; + + $scope.backWallet = function() { + $scope.isHome = 1; + $scope.isJoin = 0; + $scope.isOpen = 0; + }; + + $scope.openWallet = function() { + $scope.isHome = 0; + $scope.isJoin = 0; + $scope.isOpen = 1; + }; + + $scope.joinWallet = function() { + $scope.isHome = 0; + $scope.isOpen = 0; + $scope.isJoin = 1; + }; }); diff --git a/views/signin.html b/views/signin.html index e420e2b52..bff920108 100644 --- a/views/signin.html +++ b/views/signin.html @@ -5,52 +5,59 @@
-
- +
+

Open Wallet

+
+ + + « Back + +
-
- +
+

Open a wallet

+ Open +
+
+

Create a new wallet

+ Create +
+
+

Join a Wallet in Creation

+
+ + + + « Back + +
+
+
+

Join a Wallet in Creation

+ Join +
+
+
Create a wallet
+ Create
-
+
+

+ Copay is a free, open-source, multisignature bitcoin wallet. A single-owner bitcoin wallet's security depends on carefully securing the private keys. With copay you can have multiple people controlling the funds, using bitcoin's multisignature functionality, requiring no trust in any third party. +

From d3747b6f7ad28ed817ce06b4d486d336ff219a36 Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 17 Jul 2014 15:44:50 -0300 Subject: [PATCH 08/58] side bar --- css/main.css | 55 +++++++++++++++++++- views/includes/sidebar.html | 101 +++++++++++++++++------------------- 2 files changed, 102 insertions(+), 54 deletions(-) diff --git a/css/main.css b/css/main.css index 1563a9f4f..38969a905 100644 --- a/css/main.css +++ b/css/main.css @@ -75,15 +75,20 @@ body, html{ .sidebar { position: fixed; width: 250px; - padding: 15px; + padding: 20px; background-color: #2C3E50; color: #fff; + line-height: 24px; } .sidebar a { color: #fff; } +.button.small.side-bar { + padding: 0.2rem 0.4rem; +} + .main { margin-left: 250px; } @@ -95,7 +100,7 @@ body, html{ .dn {display: none;} .pr {position: relative;} .m0 {margin: 0;} -.db {display: block;} +.db {display: block;} .size-12 { font-size: 12px; } .size-14 { font-size: 14px; } .size-16 { font-size: 16px; } @@ -112,6 +117,7 @@ body, html{ .m10b {margin-bottom: 10px;} .m15b {margin-bottom: 20px;} .m10r {margin-right: 10px;} +.m20r {margin-right: 20px;} .m10 {margin: 10px;} .m15 {margin: 15px;} .p10t {padding-top: 10px;} @@ -122,6 +128,7 @@ body, html{ .p20h {padding: 0 20px;} .m30v {margin: 30px 0;} .m10h {margin:0 10px;} +.m10v {margin:10px 0;} .m30a {margin: 30px auto;} .br100 {border-radius: 100%;} .lh {line-height: 0;} @@ -141,6 +148,11 @@ body, html{ margin: 0.5rem 0 1rem; } +.line-sidebar { + border-top: 1px solid #34495E; + margin: 1.4rem 0; +} + .line-dashed { border-top: 1px dashed #ccc; margin: 1rem 0; @@ -148,6 +160,23 @@ body, html{ overflow: hidden; } +.name-wallet { + font-size: 16px; + color: #D4D4D4; + line-height: 16px; +} + +.box-livenet { + background: #213140; + padding: 0rem 0.5rem 0.2rem; + color: #7A8C9E; +} + +.founds { + font-weight: 100; + color: #7A8C9E; +} + /* Turn Off Number Input Spinners */ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { @@ -468,4 +497,26 @@ button[disabled].warning:focus, .text-gray { color: #999 !important;} +.side-nav li { + font-size: 16px; + line-height: 40px; +} + +.side-nav li a { + color: #FFFFFF !important; + font-weight: 100; +} + +.side-nav li.active a { + background-color: #1ABC9C; +} + +.side-nav li:hover a { + background-color: #3C4E60; +} + + + + + /*-----------------------------------------------------------------*/ \ No newline at end of file diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index dda9d5d1f..dd8d139d6 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -1,61 +1,58 @@
- - Copay v{{version}} - - Project Homapage - -
- {{$root.wallet.getName()}} -
-
- {{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet - [LIVENET] - [TESTNET] -
- -
- - {{$root.wallet.getName()}} +
+ + - v{{version}} +
+
-
- Balance
- - - - {{totalBalance || 0 - |noFractionNumber}} {{$root.unitName}} - -
-
- Available to Spend
- - - - {{availableBalance || 0|noFractionNumber}} {{$root.unitName}} - -
- + ng-click="refresh()"> + +
+
+ Balance + + + + {{totalBalance || 0 + |noFractionNumber}} {{$root.unitName}} + +
+ Available + + + + {{availableBalance || 0|noFractionNumber}} {{$root.unitName}} + +
+
+ LIVENET + TESTNET +
+ + {{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet
From f7e4390507ed395310fec9d6a89dd36baa306763 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 17 Jul 2014 16:00:58 -0300 Subject: [PATCH 09/58] Split create new wallet page --- js/controllers/setup.js | 6 ++++++ views/setup.html | 16 ++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/js/controllers/setup.js b/js/controllers/setup.js index 3ac730299..cd3811853 100644 --- a/js/controllers/setup.js +++ b/js/controllers/setup.js @@ -85,4 +85,10 @@ angular.module('copayApp.controllers').controller('SetupController', }); }; + $scope.isSetupWalletPage = 0; + + $scope.setupWallet = function() { + $scope.isSetupWalletPage = !$scope.isSetupWalletPage; + }; + }); diff --git a/views/setup.html b/views/setup.html index b8c83f8fa..67aadbb05 100644 --- a/views/setup.html +++ b/views/setup.html @@ -8,10 +8,10 @@

Create new wallet

-