feat: Add a publishing page to stop timeouts

This commit is contained in:
Nathan Woodburn 2024-02-25 14:31:05 +11:00
parent 96f7f0fece
commit 8cdaec6749
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 42 additions and 1 deletions

View File

@ -217,7 +217,7 @@ def site_post():
with open(f'sites/{i["name"]}.json', 'w') as file: with open(f'sites/{i["name"]}.json', 'w') as file:
json.dump(data, file) json.dump(data, file)
return redirect('/site') return redirect('/publishing')
response = make_response(redirect('/')) response = make_response(redirect('/'))
response.set_cookie('auth', '', expires=0) response.set_cookie('auth', '', expires=0)
@ -333,6 +333,10 @@ def wallets(path):
return render_template('404.html', year=datetime.datetime.now().year), 404 return render_template('404.html', year=datetime.datetime.now().year), 404
@app.route('/publishing')
def publishing():
return render_template('publishing.html')
# region Auth # region Auth
@app.route('/auth', methods=['POST']) @app.route('/auth', methods=['POST'])
def auth(): def auth():

37
templates/publishing.html Normal file
View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html data-bs-theme="light" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>HNS Links</title>
<meta name="description" content="Create a links page for your domain">
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&amp;display=swap">
<link rel="stylesheet" href="/assets/css/styles.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>
<body style="text-align: center;"><script>
function redirect() {
setTimeout(function() {
window.location.href = '/site';
}, 5000);
}
redirect();
</script>
<img src="/assets/img/favicon.png" width="128px">
<h1 style="text-align: center;">Publishing...</h1>
<p>We are generating you SSL certificates and adding your site to our webserver.<br>We will redirect you when your site is ready.</p>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="https://auth.varo.domains/v1"></script>
<script src="/assets/js/script.min.js"></script>
</body>
</html>