feat: Update some styling
All checks were successful
Build Docker / BuildImage (push) Successful in 28s

This commit is contained in:
Nathan Woodburn 2024-10-03 15:33:08 +10:00
parent ef2b7611ed
commit e9bad16917
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
3 changed files with 40 additions and 2 deletions

View File

@ -118,7 +118,7 @@ def renew():
if req["data"]["owner_tx_data"]["address"] not in allowed_owners: if req["data"]["owner_tx_data"]["address"] not in allowed_owners:
return redirect("/?error=not_anyone") return redirect("/?error=not_anyone")
return redirect(f"https://pay.hns.au/p/renew?amount=10&data={domain}&redirect=https://renew.hns.au/?message=Success:%20the%20domain%20will%20renew%20soon") return redirect(f"https://pay.hns.au/p/renew?amount=10&data={domain}&redirect=https://renew.hns.au/?message=Pending:%20The%20domain%20will%20renew%20when%20the%20payment%20has%20arrived")
@app.route("/renew/<path:path>", methods=["POST"]) @app.route("/renew/<path:path>", methods=["POST"])
def renew_path(path: str): def renew_path(path: str):
@ -151,7 +151,13 @@ def renew_path(path: str):
# Send discord webhook # Send discord webhook
webhook = os.getenv("DISCORD") webhook = os.getenv("DISCORD")
if webhook: if webhook:
requests.post(webhook, json={"content": json.dumps(output)}) # Parse output
message = "Renewing " + data["data"]
if req["output"]["error"] != "":
message += "\n\nError: " + req["output"]["error"]
message += "\n\nTX: https://hns.cymon.de/tx/" + req["output"]["output"].split("'")[1]
requests.post(webhook, json={"content": json.dumps(message)})
return jsonify(output) return jsonify(output)

View File

@ -17,4 +17,27 @@ a {
} }
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
text-align: center;
}
input {
padding: 10px;
border-radius: 5px;
border: 1px solid #000000;
}
button {
padding: 10px;
border-radius: 5px;
border: 1px solid #000000;
}
button:hover {
background-color: #000000;
color: #ffffff;
border: 1px solid #ffffff;
} }

View File

@ -10,6 +10,12 @@
</head> </head>
<body> <body>
<div class="header">
<div class="logo">
<img src="/assets/img/favicon.png" alt="Woodburn" width="50" height="50">
</div>
</div>
<div class="spacer"></div> <div class="spacer"></div>
<div class="centre"> <div class="centre">
<h2 style="color: red;">{{error}}</h2> <h2 style="color: red;">{{error}}</h2>
@ -23,6 +29,9 @@
<button type="submit">Renew</button> <button type="submit">Renew</button>
</form> </form>
</div> </div>
<div class="footer">
<a href="https://nathan.woodburn.au" target="_blank">Nathan.Woodburn/</a>
</div>
</body> </body>
</html> </html>