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
6 changed files
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ config.js | |
plugins/*/.idea/* | ||
.idea/* | ||
.DS_Store | ||
.sass-cache | ||
_site | ||
|
||
|
||
|
||
|
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,8 @@ | ||
#container { | ||
width: 300px; | ||
margin: 0 auto; | ||
} | ||
|
||
#qrcode { | ||
margin-top: 10px; | ||
} |
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,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name=viewport content="initial-scale=1, maximum-scale=1.0, user-scalable=no"> | ||
<!-- include your stylesheet --> | ||
<link type="text/css" rel="stylesheet" href="css/style.css" media="screen,projection"/> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<h2>Wallet Name</h2> | ||
<div id="walletName">Loading...</div> | ||
<h2>Address</h2> | ||
<div id="address">Loading...</div> | ||
<div id="qrcode"></div> | ||
</div> | ||
<!-- Include the core javascript bindings --> | ||
<script src="js/abc.js" type="text/javascript"></script> | ||
<!-- Include some other libraries --> | ||
<script src="vendors/jquery-2.1.3.min.js" type="text/javascript"></script> | ||
<script src="vendors/qrcode.min.js" type="text/javascript"></script> | ||
<!-- Include your javascript code --> | ||
<script src="js/script.js" type="text/javascript"></script> | ||
</body> | ||
</html> | ||
|
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,45 @@ | ||
"use strict"; | ||
|
||
var qrcode = null; | ||
|
||
function updateUi(wallet) { | ||
$('#walletName').text(wallet.name); | ||
Airbitz.core.createReceiveRequest(wallet, { | ||
label: "Blank App Request", | ||
category: "Income:Plugin", | ||
notes: "Income generated from a plugin", | ||
amountSatoshi: 0, | ||
amountFiat: 0, | ||
success: function(data) { | ||
var address = data["address"]; | ||
$('#address').text(address); | ||
qrcode.clear(); | ||
qrcode.makeCode('bitcoin:' + address); | ||
}, | ||
error: function() { | ||
$('#address').text(''); | ||
Airbitz.ui.showAlert("Wallet Error", "Unable to load request!"); | ||
} | ||
}); | ||
} | ||
|
||
$(function() { | ||
Airbitz.ui.title('Blank Plugin'); | ||
qrcode = new QRCode(document.getElementById("qrcode"), { | ||
text: '', | ||
width: 128, | ||
height: 128, | ||
}); | ||
// If the user changes the wallet, we want to know about it | ||
Airbitz.core.setWalletChangeListener(function(wallet) { | ||
Airbitz.ui.showAlert("Wallet Changed", "Wallet Changed to " + wallet.name + "."); | ||
updateUi(wallet); | ||
}); | ||
// After loading, lets fetch the currently selected wallet | ||
Airbitz.core.selectedWallet({ | ||
success: updateUi, | ||
error: function() { | ||
Airbitz.ui.showAlert("Wallet Error", "Unable to load wallet!"); | ||
} | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.