@@ -2,6 +2,9 @@ import React, { Component } from 'react';
2
2
import { convertBytes } from './helpers' ;
3
3
import moment from 'moment'
4
4
5
+ import './Main.css' ;
6
+
7
+
5
8
class Main extends Component {
6
9
7
10
render ( ) {
@@ -11,8 +14,9 @@ class Main extends Component {
11
14
< main role = "main" className = "col-lg-12 ml-auto mr-auto" style = { { maxWidth : '1024px' } } >
12
15
< div className = "content" >
13
16
< p > </ p >
14
- < div className = "card mb-3 mx-auto bg-dark" style = { { maxWidth : '512px' } } >
15
- < h2 className = "text-white text-monospace bg-dark" > < b > Hox it today!</ b > </ h2 >
17
+ < div className = "card mb-3 mx-auto " id = "onee" style = { { maxWidth : '512px' } } >
18
+ < h2 className = "text-black text-monospace" > < b > < span style = { { color :'red' } } > Hox</ span > < span style = { { color :'rd' } } > it</ span > < span style = { { color :' ' } } > today!</ span > </ b > </ h2 >
19
+ < br > </ br >
16
20
< form onSubmit = { ( event ) => {
17
21
event . preventDefault ( )
18
22
const description = this . fileDescription . value
@@ -28,8 +32,11 @@ class Main extends Component {
28
32
placeholder = "description..."
29
33
required />
30
34
</ div >
31
- < input type = "file" onChange = { this . props . captureFile } className = "text-white text-monospace" />
32
- < button type = "submit" className = "btn-primary btn-block" > < b > Upload!</ b > </ button >
35
+ < input type = "file" onChange = { this . props . captureFile } className = "text-white text-monospace" />
36
+
37
+ < button type = "submit" style = { { color : "grey" , background : "black" } } className = "btn-primary btn-block" > < b > Upload!</ b > </ button >
38
+
39
+
33
40
</ form >
34
41
</ div >
35
42
< p > </ p >
@@ -44,6 +51,8 @@ class Main extends Component {
44
51
< th scope = "col" style = { { width : '90px' } } > date</ th >
45
52
< th scope = "col" style = { { width : '120px' } } > uploader/view</ th >
46
53
< th scope = "col" style = { { width : '120px' } } > hash/view/get</ th >
54
+ < th scope = "col" style = { { width : '120px' } } > Qr code</ th >
55
+ < th scope = "col" style = { { width : '120px' } } > Share!</ th >
47
56
</ tr >
48
57
</ thead >
49
58
{ this . props . files . map ( ( file , key ) => {
@@ -64,13 +73,26 @@ class Main extends Component {
64
73
{ file . uploader . substring ( 0 , 10 ) } ...
65
74
</ a >
66
75
</ td >
67
- < td >
76
+
77
+ < td >
68
78
< a
69
- href = { "https://ipfs.infura. io/ipfs /" + file . fileHash }
79
+ href = { "https://etherscan. io/address /" + file . uploader }
70
80
rel = "noopener noreferrer"
71
81
target = "_blank" >
72
- { file . fileHash . substring ( 0 , 10 ) } ...
82
+ { file . uploader . substring ( 0 , 10 ) } ...
73
83
</ a >
84
+ </ td >
85
+ < td >
86
+ < img
87
+ src = { "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://ipfs.infura.io/ipfs/" + file . fileHash }
88
+ >
89
+
90
+ </ img >
91
+ </ td >
92
+ < td >
93
+ < a href = { "whatsapp://send?text=https://ipfs.infura.io/ipfs/" + file . fileHash } data-action = "share/whatsapp/share" > < img src = "https://cdn-icons.flaticon.com/png/512/3670/premium/3670051.png?token=exp=1638032014~hmac=1458dfcedc3ab96e295096e579e6956a" height = "20" width = "20" > </ img > </ a >
94
+
95
+ < a href = { "http://www.twitter.com/share?url=https://ipfs.infura.io/ipfs/" + file . fileHash } data-action = "share/whatsapp/share" > < img src = "http://assets.stickpng.com/images/580b57fcd9996e24bc43c53e.png" height = "20" width = "20" > </ img > </ a >
74
96
</ td >
75
97
</ tr >
76
98
</ thead >
0 commit comments