-
Notifications
You must be signed in to change notification settings - Fork 1
/
popup.html
266 lines (255 loc) · 8.61 KB
/
popup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!doctype html>
<html>
<head>
<title>Bitcoin Wallet</title>
<link type="text/css" href="css/bootstrap.css" rel="stylesheet" />
<style>
body {
width: 239px;
}
#main {
border: 1px solid #dddddd;
border-bottom: 0px;
margin: 1px;
}
#new-wallet h2,
#add-password h3,
#restore-wallet h3 {
line-height: 20px;
padding-bottom: 6px;
}
.block {
border-bottom: 1px solid #dddddd;
padding: 8px;
}
.block h3 {
line-height: 18px;
}
.tabselector {
text-decoration: none;
}
.hidden {
display: none !important;
}
ul {
padding: 0;
margin: 0;
}
.nav {
margin: 0;
padding-left: 35px;
}
.nav li {
padding-left: 10px;
}
li.active {
margin-bottom: 2px;
}
form {
margin: 0;
margin-top: 6px;
}
.transaction {
list-style: none;
}
.transaction.inc {
color: green;
}
.transaction.outg {
color: red;
}
.alert {
margin: 0px;
}
input[type=submit].btn {
float: right;
}
.control-group {
margin: 0;
}
#add-password .btn {
margin-left: 7px;
float: right;
}
#new-wallet .btn {
margin: 10px 10%;
margin-bottom: 0;
width: 80%;
}
#gen-wallet .progress {
height: 10px;
margin-bottom: 0px;
margin-top: 9px;
}
#gen-wallet form {
margin: 0;
}
</style>
<script src="lib/mustache.js"></script>
<script src="popup.js"></script>
<script id="new-wallet-template" type="text/x-mustache-template">
<div id="new-wallet" class="block">
<h2>Welcome!</h2>
<h6>No Bitcoin wallet found.</h6>
<button class="btn btn-large btn-primary" type="submit" id="create_new">
Create new wallet
</button>
<button class="btn btn-large" type="submit" id="import_old">
Use existing wallet
</button>
</div>
</script>
<script id="gen-wallet-template" type="text/x-mustache-template">
<div id="gen-wallet" class="block">
<h3>Generating wallet</h3>
<div style="margin-top: 9px;">
Your {{#is_encrypted}}encrypted {{/is_encrypted}} seed is: <input type="text" name="seed" value="" readonly id="seed" />
</div>
<div class="alert alert-info">
Save it in a safe place.<br>
Use it to recover your wallet.
</div>
<div class="progress progress-striped active">
<div class="bar" id='stretch_progress' style="width:0%;"></div>
</div>
Stretching seed
<form>
<fieldset>
<input type="submit" name="gogogo" value="Continue" id="gogogo" class='btn' disabled />
</fieldset>
</form>
</div>
</script>
<script id="restore-wallet-template" type="text/x-mustache-template">
<div id="restore-wallet" class="block">
<h3>Restore wallet</h3>
<form>
<fieldset>
<div class="control-group"><div class="controls">
<input type="text" name="seed" value="" id="seed" placeholder="Your seed" />
</div></div>
<div class="control-group"><div class="controls">
<input type="password" name="passwd" value="" placeholder="Password" class="hidden" />
</div></div>
<input type="submit" value="Restore" class="btn btn-primary" />
</fieldset>
</form>
</div>
</script>
<script id="add-password-template" type="text/x-mustache-template">
<div id="add-password" class="block">
<h3>Create Password</h3>
<div>It is recommended that you encrypt your wallet with a password.</div>
<form id='add_passwd'>
<fieldset>
<div class="control-group">
<div class="controls">
<input type="password" name="new_passwd" value="" id="new_passwd" placeholder="Password" />
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="password" name="vfy_passwd" value="" id="vfy_passwd" placeholder="Repeat password"/>
</div>
</div>
<input type="submit" name="encrypt" value="Encrypt" class="btn btn-primary" id="encrypt" />
<button class="btn" id="skip">
Skip
</button>
</fieldset>
</form>
</div>
</script>
<script id="main-template" type="text/x-mustache-template">
<div class="block">
<h3 id="balance">{{balance}} BTC</h3>
</div>
<div class="block">
<h4>Recent transactions <i id="processing" class="icon-refresh {{#idle}}hidden{{/idle}}"></i></h4>
<ul id="recent_txs">
{{#transactions}}
<li class="transaction {{dir}}">
{{arrow}} {{amount}}
{{#num_confs}}<span class="label label-warning">{{num_confs}}</span> {{/num_confs}}
{{label}}
</li>
{{/transactions}}
{{^transactions}}
<h6>-- no transactions --</h6>
{{/transactions}}
</ul>
</div>
<div class="block">
<ul id="tabs" class="nav nav-pills {{#sent_success}}hidden {{/sent_success}}" align="center">
<li><a href="#" class="tabselector">Send</a></li>
<li><a href="#" class="tabselector">Receive</a></li>
</ul>
<div id="send_tab" class="tab hidden">
<form id="send_form">
<fieldset>
<div class="control-group">
<div class="controls">
<input type="text" name="to" value="" id="to" placeholder="BTC Address" />
</div>
</div>
<div class="control-group">
<div class="controls">
<div class="input-prepend" style="margin-bottom:10px;">
<span class="add-on">BTC</span><input type="text" name="amount" value=""
id="amount" style="width:175px;" placeholder="0.0" />
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="text" name="label" value="" id="label" placeholder="Label (optional)" />
</div>
</div>
{{#keys_are_encrypted}}
<div class="control-group">
<div class="controls">
<input type="password" name="passwd" value="" id="passwd" placeholder="Password" />
</div>
</div>
{{/keys_are_encrypted}}
<input class="btn btn-small" type="submit" value="Send"/>
</fieldset>
</form>
</div>
<div id="receive_tab" class="tab hidden">
<form id="receive_form">
<fieldset>
<input type="text" name="address" value="" id="address" readonly tabindex=1 />
<input type="text" name="label" value="" id="label" placeholder="Label" tabindex=2 />
<input class="btn btn-small" type="submit" value="Save label" id="some_name">
</fieldset>
</form>
</div>
<div id="sending" class="hidden alert alert-info">
Sending...
</div>
<div id="sent" class="{{^sent_success}}hidden {{/sent_success}} alert alert-success">
Transaction sent.
</div>
<div id="error" class="hidden alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Error:</strong>
<span class="description"></span>
</div>
</div>
</script>
</head>
<body style='padding: 10px'>
Unfortunately, all public Electrum servers have upgraded
to a version of the protocol this extension does not support.
<br><br>
I'll do my best to release an updated version soon, but I can only work on this extension in my free time, which is always lacking.
<br><br>
I suggest using the <a target="_blank" href='http://electrum.org/'>Electrum Desktop Client</a> in the meantime. <span id='linktowallet' style='display:none'>
You can even import <a id='aseed' href='options.html#seed'>your seed</a> to access your wallet from there.</span><br><br>
Cheers,<br>
Andrey
<div id="main" style='display: none;'>
</div>
</body>
</html>