Display a template after closing the server, and standardize the style of other simple templates

This commit is contained in:
Micah Lee 2018-03-14 08:30:14 -07:00
parent 01f86daf8f
commit 72698a7247
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
7 changed files with 18 additions and 20 deletions

View File

@ -321,7 +321,8 @@ class Web(object):
def close(slug_candidate):
self.check_slug_candidate(slug_candidate)
self.force_shutdown()
return ""
r = make_response(render_template('closed.html'))
return self.add_security_headers(r)
def common_routes(self):
"""

View File

@ -1,6 +0,0 @@
body {
background-color: #FFC4D5;
color: #FF0048;
text-align: center;
font-size: 20em;
}

View File

@ -1,7 +0,0 @@
body {
background-color: #222222;
color: #ffffff;
text-align: center;
font-family: sans-serif;
padding: 5em 1em;
}

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Error 404</title>
<title>OnionsShare: Error 404</title>
<link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
<link href="/static/css/404.css" rel="stylesheet" type="text/css" />
</head>
<body>404</body>
<body>
<p>Error 404: You probably typed the OnionShare address wrong</p>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>OnionShare is closed</title>
<link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
<p>Thank you for using OnionShare</p>
</body>
</html>

View File

@ -3,7 +3,6 @@
<head>
<title>OnionShare</title>
<link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
<link href="/static/css/denied.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>OnionShare download in progress</p>

View File

@ -19,7 +19,7 @@
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
<form method="post" enctype="multipart/form-data" action="/{{ slug }}/upload">
<p><input type="file" name="file[]" multiple /></p>
<p><input type="submit" name="upload" class="button" value="Upload Files" /></p>
<p><input type="submit" class="button" value="Send Files" /></p>
<div>
{% with messages = get_flashed_messages() %}
{% if messages %}
@ -36,7 +36,7 @@
</div>
<form method="post" action="/{{ slug }}/close">
<input type="submit" name="close" class="close-button" value="I'm Finished Uploading" />
<input type="submit" class="close-button" value="I'm Finished Uploading" />
</form>
</body>