filer: added QR code to transfer files with mobile devices

This commit is contained in:
Chris Lu
2020-10-10 18:00:21 -07:00
parent 8a52379ecb
commit 9b0e8ef026
4 changed files with 48 additions and 18 deletions

View File

@@ -21,9 +21,11 @@ var funcMap = template.FuncMap{
var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(`<!DOCTYPE html>
<html>
<head>
<title>SeaweedFS Filer</title>
<link rel="stylesheet" href="/seaweedfsstatic/bootstrap/3.3.1/css/bootstrap.min.css">
<title>SeaweedFS Filer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/seaweedfsstatic/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
body { padding-bottom: 70px; }
#drop-area {
border: 1px transparent;
}
@@ -46,6 +48,11 @@ var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(`<!DOC
#fileElem {
display: none;
}
.qrImage {
display: block;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
@@ -116,6 +123,14 @@ var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(`<!DOC
</a>
</div>
{{end}}
<br/>
<br/>
<div class="navbar navbar-fixed-bottom">
<img src="data:image/png;base64,{{.QrImage}}" class="qrImage" />
</div>
</div>
</body>
<script type="text/javascript">