1
1
{{ template "head" .}}
2
2
3
3
< body >
4
- {{template "navbar" .}}
5
- < div class ="container p-6 ">
6
- < br >
7
- < h2 class ="title is-2 ">
8
- Files
9
- </ h2 >
10
- < table class ="table is-striped " style ="width:100%; ">
11
- < thead >
12
- < tr >
13
- < th style ="width:30%; "> Name</ th >
14
- < th style ="width:10%; text-align:center; "> Size</ th >
15
- < th style ="width:10%; text-align:center; "> Type</ th >
16
- < th style ="width:20%; text-align:center; "> Uploaded</ th >
17
- < th style ="text-align:center; "> Preview</ th >
18
- < th style ="text-align:center; "> Delete</ th >
19
- </ tr >
20
- </ thead >
21
- < tbody >
22
- {{range .Data}}
23
- {{$fileType := convertFileType .Key}}
24
- {{$elementType := getElementByFileExt $fileType}}
25
-
26
- {{ if or (eq $elementType "") (eq $elementType "audio")}}
27
- < tr style ="height:100px; ">
28
- {{ else }}
4
+ {{template "navbar" .}}
5
+ < div class ="container p-6 ">
6
+ < div class ="columns py-4 ">
7
+ < div class ="column ">
8
+ < h2 class ="title is-2 ">
9
+ Files
10
+ </ h2 >
11
+ </ div >
12
+ < div class ="column ">
13
+ < form action ="/ui/fs " method ="get ">
14
+ < div class ="control ">
15
+ < input type ="text " name ="id " id ="id "
16
+ class ="input " placeholder ="Enter an account ID ">
17
+ </ div >
18
+ </ form >
19
+ </ div >
20
+ </ div >
21
+
22
+ < table class ="table is-striped " style ="width:100%; ">
23
+ < thead >
24
+ < tr >
25
+ < th style ="width:30%; "> Name</ th >
26
+ < th style ="width:10%; text-align:center; "> Size</ th >
27
+ < th style ="width:10%; text-align:center; "> Type</ th >
28
+ < th style ="width:20%; text-align:center; "> Uploaded</ th >
29
+ < th style ="text-align:center; "> Preview</ th >
30
+ < th style ="text-align:center; "> Delete</ th >
31
+ </ tr >
32
+ </ thead >
33
+ < tbody >
34
+ {{range .Data}}
35
+ {{$fileType := convertFileType .Key}}
36
+ {{$elementType := getElementByFileExt $fileType}}
37
+
38
+ {{ if or (eq $elementType "") (eq $elementType "audio")}}
39
+ < tr style ="height:100px; ">
40
+ {{ else }}
29
41
< tr style ="height:200px; ">
30
- {{ end }}
31
- < td > {{ parseFilename .Key }}</ td >
32
- < td style ="text-align:center; "> {{ convertFileSize .Size }}</ td >
33
- < td style ="text-align:center; "> {{ $fileType }}</ td >
34
- < td style ="text-align:center; "> {{ convertFileUploadedDate .Uploaded}}</ td >
35
- < td style ="text-align:center; ">
36
- {{ if eq $elementType "image" }}
42
+ {{ end }}
43
+ < td > {{ parseFilename .Key }}</ td >
44
+ < td style ="text-align:center; "> {{ convertFileSize .Size }}</ td >
45
+ < td style ="text-align:center; "> {{ $fileType }}</ td >
46
+ < td style ="text-align:center; "> {{ convertFileUploadedDate .Uploaded}}</ td >
47
+ < td style ="text-align:center; ">
48
+ {{ if eq $elementType "image" }}
37
49
< a href ="{{ .URL }} ">
38
50
< img src ="{{ .URL }} " alt ="uploaded image " style ="height:200px; ">
39
- </ a >
40
- {{ else if eq $elementType "video" }}
41
- < video controls style ="height:200px; ">
51
+ </ a >
52
+ {{ else if eq $elementType "video" }}
53
+ < video controls style ="height:200px; ">
42
54
< source src ="{{ .URL }} ">
43
55
</ video >
44
- {{ else if eq $elementType "audio" }}
56
+ {{ else if eq $elementType "audio" }}
45
57
< audio src ="{{ .URL }} " controls > </ audio >
46
- {{ else }}
58
+ {{ else }}
47
59
< a href ="{{ .URL }} ">
48
60
Can't preview!
49
- </ a >
50
- {{ end }}
51
- </ td >
52
- < td style ="text-align:center; ">
53
- < a
54
- href ="/ui/fs/del/{{ .ID }} "
55
- class ="delete "
56
- onclick ="return confirm('Are you sure you want to delete this file?\n\nThis is irreversible.') ">
57
- </ a >
58
- </ td >
59
- </ tr >
60
- {{end}}
61
- </ tbody >
62
- </ table >
63
- </ div >
61
+ </ a >
62
+ {{ end }}
63
+ </ td >
64
+ < td style ="text-align:center; ">
65
+ < a href ="/ui/fs/del/{{ .ID }} " class ="delete "
66
+ onclick ="return confirm('Are you sure you want to delete this file?\n\nThis is irreversible.') ">
67
+ </ a >
68
+ </ td >
69
+ </ tr >
70
+ {{end}}
71
+ </ tbody >
72
+ </ table >
73
+ </ div >
64
74
65
75
</ body >
66
76
67
- {{template "foot"}}
68
-
77
+ {{template "foot"}}
0 commit comments