Skip to content

Commit e6f7241

Browse files
committed
refactor script.js, attempt to support mobile browsers
1 parent 409728c commit e6f7241

File tree

5 files changed

+12439
-12124
lines changed

5 files changed

+12439
-12124
lines changed

blt-wallet.png

237 KB
Loading

docs/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</div>
2626
<div class="item">
2727
<div class="four ui buttons">
28-
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="top left" @click="app.init(app.current)">
28+
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="top left" @click="init(current)">
2929
<i class="plus icon"></i>
3030
</button>
3131
<button :class="color" class="ui basic small icon button" data-tooltip="Switch Currency" @click="switchCurrency();">
@@ -59,7 +59,7 @@
5959
<div class="item">
6060
<div class="ui inverted header">BLT Wallet</div>
6161
<div class="ui four buttons">
62-
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="bottom left" @click="app.init(app.current)">
62+
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="bottom left" @click="init(current)">
6363
<i class="plus icon"></i>
6464
</button>
6565
<button :class="color" class="ui basic small icon button" data-tooltip="Switch Currency" data-position="bottom left" @click="switchCurrency();">
@@ -117,7 +117,7 @@ <h2>Transactions</h2>
117117
</thead>
118118
<tbody>
119119
<tr v-for="tx in transactions">
120-
<td v-if="tx.vin[0].addr == app.address">
120+
<td v-if="tx.vin[0].addr == address">
121121
<i class="medium circular inverted red arrow right icon"></i>
122122
<i v-if="tx.confirmations < 1" class="medium hourglass start icon">
123123
</td>
@@ -126,9 +126,9 @@ <h2>Transactions</h2>
126126
<i v-if="tx.confirmations < 1" class="medium hourglass start icon">
127127
</td>
128128
<td><span v-bind:data-livestamp="tx.time"></span></td>
129-
<td><a v-bind:href="app.baseURL + '/tx/' + tx.txid" target="_blank">{{ tx.txid }}</a></td>
130-
<td v-if="tx.vin[0].addr == app.address" class="negative">-{{ tx.vout[0].value }} {{ symbol }}</td>
131-
<td v-else class="positive">+{{ app.getOutputValue(tx.vout) }} {{ symbol }}</td>
129+
<td><a v-bind:href="baseURL + '/tx/' + tx.txid" target="_blank">{{ tx.txid }}</a></td>
130+
<td v-if="tx.vin[0].addr == address" class="negative">-{{ tx.vout[0].value }} {{ symbol }}</td>
131+
<td v-else class="positive">+{{ getOutputValue(tx.vout) }} {{ symbol }}</td>
132132
</tr>
133133
</tbody>
134134
</table>

src/index.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
43
<head>
54
<meta charset="UTF-8">
65
<title>BLT Wallet - Testnet Wallet for Bitcoin & Litecoin</title>
@@ -23,11 +22,11 @@
2322
</div>
2423
<div class="item">
2524
<strong>What is BLT wallet?</strong>
26-
<br/>A web wallet for easy access to Bitcoin and Litecoin testnets. Please bookmark this URL if you want access to the same wallet again.
25+
<br/>A web wallet for easy access to Bitcoin and Litecoin testnets. Please bookmark this URL if you want to access the same wallet again.
2726
</div>
2827
<div class="item">
2928
<div class="four ui buttons">
30-
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="top left" @click="app.init(app.current)">
29+
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="top left" @click="init(current)">
3130
<i class="plus icon"></i>
3231
</button>
3332
<button :class="color" class="ui basic small icon button" data-tooltip="Switch Currency" @click="switchCurrency();">
@@ -61,13 +60,13 @@
6160
<div class="item">
6261
<div class="ui inverted header">BLT Wallet</div>
6362
<div class="ui four buttons">
64-
<button :class="color" class="ui basic small icon button" data-tooltip="Create new address" data-position="bottom left" @click="app.init(app.current)">
63+
<button :class="color" class="ui basic medium icon button" data-tooltip="Create new address" data-position="bottom left" @click="init(current)">
6564
<i class="plus icon"></i>
6665
</button>
67-
<button :class="color" class="ui basic small icon button" data-tooltip="Switch Currency" data-position="bottom left" @click="switchCurrency();">
66+
<button :class="color" class="ui basic medium icon button" data-tooltip="Switch Currency" data-position="bottom left" @click="switchCurrency();">
6867
<i class="exchange icon"></i>
6968
</button>
70-
<button :class="color" class="ui basic top left pointing small dropdown icon button" data-tooltip="Change Fiat Currency" data-position="bottom left">
69+
<button :class="color" class="ui basic top left pointing medium dropdown icon button" data-tooltip="Change Fiat Currency" data-position="bottom left">
7170
<i class="money icon"></i>
7271
<div class="menu">
7372
<div class="divider"></div>
@@ -79,7 +78,7 @@
7978
</div>
8079
</div>
8180
</button>
82-
<button :class="color" class="ui basic top left pointing small dropdown icon button" data-tooltip="Get coins" data-position="bottom left">
81+
<button :class="color" class="ui basic top left pointing medium dropdown icon button" data-tooltip="Get coins" data-position="bottom left">
8382
<i class="money icon"></i>
8483
<div class="menu">
8584
<div class="divider"></div>
@@ -119,7 +118,7 @@ <h2>Transactions</h2>
119118
</thead>
120119
<tbody>
121120
<tr v-for="tx in transactions">
122-
<td v-if="tx.vin[0].addr == app.address">
121+
<td v-if="tx.vin[0].addr == address">
123122
<i class="medium circular inverted red arrow right icon"></i>
124123
<i v-if="tx.confirmations < 1" class="medium hourglass start icon">
125124
</td>
@@ -128,9 +127,9 @@ <h2>Transactions</h2>
128127
<i v-if="tx.confirmations < 1" class="medium hourglass start icon">
129128
</td>
130129
<td><span v-bind:data-livestamp="tx.time"></span></td>
131-
<td><a v-bind:href="app.baseURL + '/tx/' + tx.txid" target="_blank">{{ tx.txid }}</a></td>
132-
<td v-if="tx.vin[0].addr == app.address" class="negative">-{{ tx.vout[0].value }} {{ symbol }}</td>
133-
<td v-else class="positive">+{{ app.getOutputValue(tx.vout) }} {{ symbol }}</td>
130+
<td><a v-bind:href="baseURL + '/tx/' + tx.txid" target="_blank">{{ tx.txid }}</a></td>
131+
<td v-if="tx.vin[0].addr == address" class="negative">-{{ tx.vout[0].value }} {{ symbol }}</td>
132+
<td v-else class="positive">+{{ getOutputValue(tx.vout) }} {{ symbol }}</td>
134133
</tr>
135134
</tbody>
136135
</table>
@@ -150,9 +149,9 @@ <h2>Transactions</h2>
150149
</div>
151150
<div class="field">
152151
<label>Recipient Address</label>
153-
<input id="receive-address" placeholder="Address" type="text">
152+
<input id="receive-address" placeholder="Address" type="text" value="mmC1VMVwYXh2YqP6GFdSL6vABgooCRMcGz">
154153
</div>
155-
<button :class="color" class="ui button" id="send-button" onclick="sendTransaction();">
154+
<button :class="color" class="ui button" id="send-button" @click="sendTransaction()">
156155
Send
157156
</button>
158157
<button class="ui deny button" onclick="$('.modal').modal('hide');">

0 commit comments

Comments
 (0)