-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
598 lines (598 loc) · 23.4 KB
/
index.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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hako Finance</title>
<link rel="stylesheet" href="stylesheet.css">
<link rel="icon" href="hako_icon.png">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/web3/1.2.9/web3.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Londrina+Shadow" rel="stylesheet">
<script src="hako-address/Hako_abi.js"></script>
<script src="hako-address/Hako_address.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet">
</head>
<body>
<header id="header">
<header-component></header-component>
</header>
<div class="container" id="app">
<div class="tab">
<div class="tab-four" v-cloak>
<ul>
<li class="tab-item" v-for="(item, index) in items" :key="index" :class="{active: active === index}" @click="activate(index)">
{{ item }}
</li>
</ul>
</div>
</div>
<div class="tab-content">
<div class="tab-pane hakoInfo" v-show="active === 0">
<h1>Hako Information</h1>
<div class="info-content" v-show="!isNotMember" v-cloak>
<ul>
<li class="infoAddress">Hako's address<br>{{hakoData.hakoAddress}}</li>
<li class="infoData">Hako's balance of token<br>{{hakoData.balanceOfHako}}</li>
<li class="infoData">Total supply of token<br>{{hakoData.totalSupply}}</li>
<li class="infoData">Hako's credit to Members<br>{{hakoData.creditOfHako}}</li>
<li class="infoData">Hako's debt to Members<br>{{hakoData.debtOfHako}}</li>
<li class="infoData">Member count<br>{{hakoData.memberCount}}</li>
<li class="infoData">Upper limit<br>{{hakoData.upperLimit}}</li>
</ul>
</div>
<div class="info-content" v-show="isNotMember" v-cloak>
<ul>
<li class="infoAddress">Hako's address<br>{{hakoData.hakoAddress}}</li>
<li class="infoData">Hako's balance of token<br>{{hakoData.balanceOfHako}}</li>
<li class="infoData">Total supply of token<br>{{hakoData.totalSupply}}</li>
<li class="infoData">Hako's credit to Members<br><span>{{hakoData.creditOfHako}}</span></li>
<li class="infoData">Hako's debt to Members<br><span>{{hakoData.debtOfHako}}</span></li>
<li class="infoData">Member count<br><span>{{hakoData.memberCount}}</span></li>
<li class="infoData">Upper limit<br><span>{{hakoData.upperLimit}}</span></li>
</ul>
</div>
</div>
<div class="tab-pane userInfo" v-show="active === 1">
<h1>User Information</h1>
<div class="info-content" v-show="!isNotMember" v-cloak>
<ul>
<li class="infoAddress">Your address<br>{{userData.userAccount}}</li>
<li class="infoData">balance of token<br>{{userData.balanceOfUser}}</li>
</ul>
<ul>
<li class="memberCheck">{{userData.memberCheckOfUser}}</li>
<li class="infoData">credit<br>{{userData.creditToHakoOfUser}}</li>
<li class="infoData">debt<br>{{userData.debtToHakoOfUser}}</li>
<li class="infoData">lending<br>{{userData.creditToMemberOfUser}}</li>
<li class="infoData">borrowing<br>{{userData.debtToMemberOfUser}}</li>
<li class="infoData">net assets<br>{{userData.netAssetsOfUser}}</li>
<li class="supplement">* net assets = balance + credit - debt + lending - borrowing</li>
</ul>
<ul>
<li class="memberCheck">value and duration you can borrow</li>
<li class="infoData">value<br>{{userData.valueDuration.value}}</li>
<li class="infoAddress">duration<br>
{{userData.valueDuration.durationData.days}} days {{userData.valueDuration.durationData.hours}} hours
{{userData.valueDuration.durationData.minutes}} minutes {{userData.valueDuration.durationData.seconds}} seconds
( = {{userData.valueDuration.duration}} seconds)
</li>
</ul>
</div>
<div class="info-content" v-show="isNotMember" v-cloak>
<ul>
<li class="infoAddress">Your address<br>{{userData.userAccount}}</li>
<li class="infoData">balance of token<br>{{userData.balanceOfUser}}</li>
</ul>
<ul>
<li class="memberCheck">{{userData.memberCheckOfUser}}</li>
<li class="infoData">credit<br><span>{{userData.creditToHakoOfUser}}</span></li>
<li class="infoData">debt<br><span>{{userData.debtToHakoOfUser}}</span></li>
<li class="infoData">lending<br><span>{{userData.creditToMemberOfUser}}</span></li>
<li class="infoData">borrowing<br><span>{{userData.debtToMemberOfUser}}</span></li>
<li class="infoData">net assets<br><span>{{userData.netAssetsOfUser}}</span></li>
<li class="supplement">* net assets = balance + credit - debt + lending - borrowing</li>
</ul>
<ul>
<li class="memberCheck">value and duration you can borrow</li>
<li class="infoData">value<br><span>{{userData.valueDuration.value}}</span></li>
<li class="infoAddress">duration<br><span>{{userData.valueDuration.duration}}</span></li>
</ul>
</div>
</div>
<div class="tab-pane transactions" v-show="active === 2">
<h1>Transactions</h1>
<div class="info-content" v-cloak>
<ul>
<div class="transactionLink transfer">
<div v-if="haveToken">
<li class="linkToTransaction">
<a :href="transactionUrl.transferTokenUrl">transfer token</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.transferTokenUrl">enter</a>
</div>
</div>
<div v-else>
<li class="linkToTransaction">
transfer token
</li><br>
<div class="noDisplay">
You don't have token!
</div>
</div>
</div>
<div class="transactionLink transferCredit">
<div v-if="isMember && haveCredit">
<li class="linkToTransaction">
<a :href="transactionUrl.transferCreditUrl">transfer credit</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.transferCreditUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
transfer credit
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else>
<li class="linkToTransaction">
transfer credit
</li><br>
<div class="noDisplay">
You don't have credit!
</div>
</div>
</div>
<div class="transactionLink joinHako">
<div v-if="!isMember">
<li class="linkToTransaction">
<a :href="transactionUrl.joinHakoUrl">join Hako</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.joinHakoUrl">enter</a>
</div>
</div>
<div v-else>
<li class="linkToTransaction">
join Hako
</li><br>
<div class="noDisplay">
Non-Member Only
</div>
</div>
</div>
<div class="transactionLink leaveHako">
<div v-if="isMember && haveNotDebtToHako && haveNotDebtToMember && haveNotCreditToMember">
<li class="linkToTransaction">
<a :href="transactionUrl.leaveHakoUrl">leave Hako</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.leaveHakoUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
leave Hako
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="!haveNotDebtToHako">
<li class="linkToTransaction">
leave Hako
</li><br>
<div class="noDisplay">
You have debt!
</div>
</div>
<div v-else-if="!haveNotDebtToMember">
<li class="linkToTransaction">
leave Hako
</li><br>
<div class="noDisplay">
You're borrowing!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
leave Hako
</li><br>
<div class="noDisplay">
You're lending!
</div>
</div>
</div>
<div class="transactionLink depositToken">
<div v-if="isMember && haveToken">
<li class="linkToTransaction">
<a :href="transactionUrl.depositTokenUrl">deposit token</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.depositTokenUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
deposit token
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else>
<li class="linkToTransaction">
deposit token
</li><br>
<div class="noDisplay">
You don't have token!
</div>
</div>
</div>
<div class="transactionLink withdrawToken">
<div v-if="isMember && haveCredit && haveNotDebtToHako && haveNotDebtToMember">
<li class="linkToTransaction">
<a :href="transactionUrl.withdrawTokenUrl">withdraw token</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.withdrawTokenUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
withdraw token
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="!haveCredit">
<li class="linkToTransaction">
withdraw token
</li><br>
<div class="noDisplay">
You don't have credit!
</div>
</div>
<div v-else-if="!haveNotDebtToHako">
<li class="linkToTransaction">
withdraw token
</li><br>
<div class="noDisplay">
You have debt!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
withdraw token
</li><br>
<div class="noDisplay">
You're borrowing!
</div>
</div>
</div>
<div class="transactionLink registerBorrowing">
<div v-if="isMember && haveNotDebtToMember && havePlusNetAssets">
<li class="linkToTransaction">
<a :href="transactionUrl.registerBorrowingUrl">register borrowing</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.registerBorrowingUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
register borrowing
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="!haveNotDebtToMember">
<li class="linkToTransaction">
register borrowing
</li><br>
<div class="noDisplay">
You're borrowing!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
register borrowing
</li><br>
<div class="noDisplay">
Net assets is 0 or minus!
</div>
</div>
</div>
<div class="transactionLink lendCredit">
<div v-if="isMember && haveCredit">
<li class="linkToTransaction">
<a :href="transactionUrl.lendCreditUrl">lend credit</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.lendCreditUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
lend credit
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else>
<li class="linkToTransaction">
lend credit
</li><br>
<div class="noDisplay">
You don't have credit!
</div>
</div>
</div>
<div class="transactionLink collectDebtFrom">
<div v-if="isMember && !haveNotCreditToMember">
<li class="linkToTransaction">
<a :href="transactionUrl.collectDebtUrl">collect debt</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.collectDebtUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
collect debt
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else>
<li class="linkToTransaction">
collect debt
</li><br>
<div class="noDisplay">
You're not lending!
</div>
</div>
</div>
<div class="transactionLink returnDebtTo">
<div v-if="isMember && !haveNotDebtToMember && haveCredit">
<li class="linkToTransaction">
<a :href="transactionUrl.returnDebtUrl">return debt</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.returnDebtUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
return debt
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="haveNotDebtToMember">
<li class="linkToTransaction">
return debt
</li><br>
<div class="noDisplay">
You're not borrowing!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
return debt
</li><br>
<div class="noDisplay">
You don't have credit!
</div>
</div>
</div>
<div class="transactionLink createCredit">
<div v-if="isMember && haveNotDebtToHako && havePlusNetAssets">
<li class="linkToTransaction">
<a :href="transactionUrl.createCreditUrl">create credit</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.createCreditUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
create credit
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="!haveNotDebtToHako">
<li class="linkToTransaction">
create credit
</li><br>
<div class="noDisplay">
You have debt!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
create credit
</li><br>
<div class="noDisplay">
Net assets is 0 or minus!
</div>
</div>
</div>
<div class="transactionLink reduceDebt">
<div v-if="isMember && !haveNotDebtToHako && haveCredit">
<li class="linkToTransaction">
<a :href="transactionUrl.reduceDebtUrl">reduce debt</a>
</li><br>
<div class="enter">
<a :href="transactionUrl.reduceDebtUrl">enter</a>
</div>
</div>
<div v-else-if="!isMember">
<li class="linkToTransaction">
reduce debt
</li><br>
<div class="noDisplay">
Member Only
</div>
</div>
<div v-else-if="haveNotDebtToHako">
<li class="linkToTransaction">
reduce debt
</li><br>
<div class="noDisplay">
You don't have debt!
</div>
</div>
<div v-else>
<li class="linkToTransaction">
reduce debt
</li><br>
<div class="noDisplay">
You don't have credit!
</div>
</div>
</div>
</ul>
</div>
</div>
<div class="tab-pane transactions" v-show="active === 3">
<h1>Transactions History</h1>
<div class="info-content" v-cloak>
<ul>
<div class="transactionLink transfer">
<li class="linkToTransaction">
<a :href="historyUrl.transferTokenUrl">transfer token</a>
</li><br>
<div class="enter">
<a :href="historyUrl.transferTokenUrl">watch the history</a>
</div>
</div>
<div class="transactionLink transferCredit">
<li class="linkToTransaction">
<a :href="historyUrl.transferCreditUrl">transfer credit</a>
</li><br>
<div class="enter">
<a :href="historyUrl.transferCreditUrl">watch the history</a>
</div>
</div>
<div class="transactionLink joinHako">
<li class="linkToTransaction">
<a :href="historyUrl.joinHakoUrl">join Hako</a>
</li><br>
<div class="enter">
<a :href="historyUrl.joinHakoUrl">watch the history</a>
</div>
</div>
<div class="transactionLink leaveHako">
<li class="linkToTransaction">
<a :href="historyUrl.leaveHakoUrl">leave Hako</a>
</li><br>
<div class="enter">
<a :href="historyUrl.leaveHakoUrl">watch the history</a>
</div>
</div>
<div class="transactionLink depositToken">
<li class="linkToTransaction">
<a :href="historyUrl.depositTokenUrl">deposit token</a>
</li><br>
<div class="enter">
<a :href="historyUrl.depositTokenUrl">watch the history</a>
</div>
</div>
<div class="transactionLink withdrawToken">
<li class="linkToTransaction">
<a :href="historyUrl.withdrawTokenUrl">withdraw token</a>
</li><br>
<div class="enter">
<a :href="historyUrl.withdrawTokenUrl">watch the history</a>
</div>
</div>
<div class="transactionLink registerBorrowing">
<li class="linkToTransaction">
<a :href="historyUrl.registerBorrowingUrl">register borrowing</a>
</li><br>
<div class="enter">
<a :href="historyUrl.registerBorrowingUrl">watch the history</a>
</div>
</div>
<div class="transactionLink lendCredit">
<li class="linkToTransaction">
<a :href="historyUrl.lendCreditUrl">lend credit</a>
</li><br>
<div class="enter">
<a :href="historyUrl.lendCreditUrl">watch the history</a>
</div>
</div>
<div class="transactionLink collectDebtFrom">
<li class="linkToTransaction">
<a :href="historyUrl.collectDebtUrl">collect debt</a>
</li><br>
<div class="enter">
<a :href="historyUrl.collectDebtUrl">watch the history</a>
</div>
</div>
<div class="transactionLink returnDebtTo">
<li class="linkToTransaction">
<a :href="historyUrl.returnDebtUrl">return debt</a>
</li><br>
<div class="enter">
<a :href="historyUrl.returnDebtUrl">watch the history</a>
</div>
</div>
<div class="transactionLink createCredit">
<li class="linkToTransaction">
<a :href="historyUrl.createCreditUrl">create credit</a>
</li><br>
<div class="enter">
<a :href="historyUrl.createCreditUrl">watch the history</a>
</div>
</div>
<div class="transactionLink reduceDebt">
<li class="linkToTransaction">
<a :href="historyUrl.reduceDebtUrl">reduce debt</a>
</li><br>
<div class="enter">
<a :href="historyUrl.reduceDebtUrl">watch the history</a>
</div>
</div>
</ul>
</div>
</div>
</div>
<div class="docs">
<div class="docs-item" v-cloak>
<ul>
<li class="docs-link">
<a href="docs.html" target="_blank">Docs</a>
</li>
</ul>
</div>
<div class="docs-item" v-show="!isConnected" v-cloak>
<ul>
<li class="docs-link">
<button class="button connectButton" @click="onClickConnect">Connect</button>
</li>
</ul>
</div>
</div>
</div>
<footer id="footer">
<footer-component></footer-component>
</footer>
<script src="components/header_index.js"></script>
<script src="components/footer.js"></script>
<script src="info_script.js"></script>
</body>
</html>