first commit

This commit is contained in:
2023-06-22 08:10:29 +00:00
commit abf7741b16
15 changed files with 597 additions and 0 deletions

19
templates/base.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="{{url_for('static', filename = 'style.css')}}" rel="stylesheet">
{{ fontawesome_css() }}
{{ dropzone.load_css() }}
{{ dropzone.style('border: 2px dashed #000; min-height: 200px;text-align:center;') }}
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<title>{{ title }}</title>
<br>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
<body>
<div id="content">
<center>

17
templates/download.html Normal file
View File

@@ -0,0 +1,17 @@
{% include 'base.html' %}
{% block main %}
<h5 class="display-8">Files to Download</h5>
<div style="padding:40px">
<div class="quard">
<div class="card">
<div class="card-body">
<br>
File name : {{ filename }}<br><br>
Direct URL : <a href="{{ url_todl }}">{{ url_todl }}</a><br><br>
<img src="{{ qrcode }}">
<br>
</div></div></div></div>
{% endblock %}

11
templates/foot.html Normal file
View File

@@ -0,0 +1,11 @@
</div>
{{ fontawesome_js() }}
<script
src="https://code.jquery.com/jquery-3.6.1.slim.min.js"
integrity="sha256-w8CvhFs7iHNVUtnSP0YKEg00p9Ih13rlL9zGqvLdePA="
crossorigin="anonymous"></script>
</div>
</body>
</html>

31
templates/index.html Normal file
View File

@@ -0,0 +1,31 @@
{% include 'base.html' %}
{% block main %}
{% include 'menu.html' %}
<h5 class="display-8">Files list</h5>
<br>
<div style="padding:40px;">
<table class="table">
<thead>
<tr>
<td>Name</td>
<td>Retention (hours)</td>
<td>Upload date</td>
<td>Link</td>
<td>End Download Time</td>
<td>Download page</td>
<td>Single Download</td>
</tr>
</thead>
<tbody>
{%for file in listdir %}
<tr>
{%for item in file %}
<td>{{ item }}</td>
{%endfor%}
</tr>
{%endfor%}
</tbody>
</table>
</div>
{% endblock %}
{% include 'foot.html' %}

33
templates/login.html Normal file
View File

@@ -0,0 +1,33 @@
{% include 'base.html' %}
{% block main %}
<div class="space"></div>
{{ alertmessage | safe }}
<br>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/c>
<link href='https://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'>
<body>
<center>
<div class="space"></div>
<center>
<div class="login">
<h3>Login</h3>
<br><br>
<form action="/login" method="post">
<div class="form-group">
<input type="text" name="username" placeholder="Username" required>
</div>
<div class="form-group">
<input type="password" name="password" placeholder="Password" required>
</div>
<br>
<button name="Login" type="submit" class="btn btn-info"><span class="fas fa-user">&nbsp;&nbsp;&nbsp; Login</span></button>
</form>
</div>
</center>
{% endblock %}
{% include 'foot.html' %}

20
templates/menu.html Normal file
View File

@@ -0,0 +1,20 @@
{% block main %}
<div class="logout">
<ul>
{% for item in nav.top %}
<li class="{{ 'active' if item.is_active else '' }}">
<a href="{{ item.url }}">{{ item.label }}</a>
</li>
{% endfor %}
<li style="float:right;">
<a href="logout"><span class="fas fa-user" style="display: inline;"></span> Logout</a>
</li>
<li style="float:right;">
<a href="javascript:window.location.href=window.location.href"><span class="fas fa-sync" style="display: inline;"></span></a>
</li>
</ul>
</div>
<br>
<br>
{% endblock %}

13
templates/nodown.html Normal file
View File

@@ -0,0 +1,13 @@
{% include 'base.html' %}
{% block main %}
<h5 class="display-8">No files to Download</h5>
<div style="padding:40px">
<div class="quard">
<div class="card">
<div class="card-body">
Nothing to download, file missing or already deleted.<br>
Contact your sender if you think it's a mistake.
</div></div></div></div>
{% endblock %}

59
templates/upload.html Normal file
View File

@@ -0,0 +1,59 @@
{% include 'base.html' %}
{% include 'menu.html' %}
{% block main %}
{{ dropzone.load_js() }}
{{ dropzone.config() }}
<script type="text/javascript">
Dropzone.options.myDropzone = {
autoProcessQueue: false,
maxFilesize: 10240,
acceptedFiles: ".zip,.rar,.tar,.gz",
init: function() {
var submitButton = document.querySelector("#submit-all")
myDropzone = this; // closure
submitButton.addEventListener("click", function() {
myDropzone.processQueue(); // Tell Dropzone to process all queued files.
});
this.on("addedfile", function() {
});
}
};
</script>
<h5 class="display-8">Upload</h5>
<div style="padding:40px">
<div class="quard">
<div class="card">
<div class="card-body">
<form action="/upload" class="dropzone" id="my-dropzone" method="POST">
<label for="console_type">Retention</label>
<select id="retention" name="retention" class="form-control">
<option value="1">1 hour</option>
<option value="24">1 day</option>
<option value="168">1 week</option>
<option value="730">1 month</option>
<option value="0">Unlimited</option>
</select>
<div class="col-auto my-1">
<div class="custom-control custom-checkbox mr-sm-2">
<input type="checkbox" class="form-check-input" id="uniqd" name="uniqd">
<label for="uniqd">Single download </label>
</div>
</div>
</form>
<br>
<button id="submit-all" class="btn btn-info">Send</button>
</div>
</div>
</div>
</div>
<!-- Avoid a Misalignment -->
<div style="clear: both;"></div>
<!-- -->
{% endblock %}
{% include 'foot.html' %}