Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
355 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.view.payment-replaceable { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
box-sizing: border-box; | ||
padding: 0; | ||
padding-bottom: 4rem; | ||
} | ||
.view.payment-replaceable .result-indicator { | ||
background-color: #d89e00; | ||
} | ||
.view.payment-replaceable .info { | ||
padding: 2rem; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="result-indicator"> | ||
<div class="result-indicator-inner">{{text.message}}</div> | ||
</div> | ||
<div class="info"> | ||
<p class="text">{{text.info}}</p> | ||
</div> | ||
<div class="secondary-controls"> | ||
<a class="secondary-control button accept">{{text.accept}}</a> | ||
<a class="secondary-control button reject">{{text.reject}}</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
var app = app || {}; | ||
|
||
app.views = app.views || {}; | ||
|
||
app.views.PaymentReplaceable = (function() { | ||
|
||
'use strict'; | ||
|
||
return app.abstracts.BaseView.extend({ | ||
|
||
className: 'payment-replaceable', | ||
template: '#template-payment-replaceable', | ||
|
||
events: { | ||
'click .accept': 'accept', | ||
'click .reject': 'reject', | ||
}, | ||
|
||
serializeData: function() { | ||
|
||
return { | ||
text: { | ||
message: app.i18n.t('payment-replaceable.message'), | ||
info: app.i18n.t('payment-replaceable.info'), | ||
accept: app.i18n.t('payment-replaceable.accept'), | ||
reject: app.i18n.t('payment-replaceable.reject'), | ||
}, | ||
}; | ||
}, | ||
|
||
onRender: function() { | ||
|
||
this.playSound(); | ||
}, | ||
|
||
playSound: function() { | ||
|
||
app.sound.play('pay-fail-01'); | ||
}, | ||
|
||
accept: function(evt) { | ||
|
||
var paymentRequest = this.model.toJSON(); | ||
|
||
if (evt && evt.preventDefault) { | ||
evt.preventDefault(); | ||
} | ||
|
||
this.model.save( | ||
_.extend( | ||
{}, | ||
paymentRequest, | ||
{ | ||
status: 'unconfirmed', | ||
} | ||
) | ||
); | ||
|
||
// Navigate back to the homescreen | ||
app.router.navigate('pay', { trigger: true }); | ||
}, | ||
|
||
reject: function(evt) { | ||
|
||
if (evt && evt.preventDefault) { | ||
evt.preventDefault(); | ||
} | ||
|
||
// Navigate to the next screen with the amount in the URI. | ||
app.router.navigate('display-payment-address', { trigger: true }); | ||
}, | ||
|
||
onBackButton: function() { | ||
|
||
this.reject(); | ||
}, | ||
|
||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.