hnsalert/templates/dashboard.html

156 lines
9.6 KiB
HTML
Raw Permalink Normal View History

2023-12-11 15:28:20 +11:00
<!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">
2023-12-11 18:00:58 +11:00
<title>Dashboard - HNS Alert</title>
2023-12-11 15:28:20 +11:00
<meta name="twitter:image" content="https://alert.woodburn.au/assets/img/favicon.png">
<meta property="og:description" content="Alert system for Handshake domains">
<meta property="og:type" content="website">
<meta property="og:image" content="https://alert.woodburn.au/assets/img/favicon.png">
<meta name="description" content="Alert system for domains on the Handshake chain">
<meta property="og:title" content="HNSAlert">
<meta name="twitter:card" content="summary">
2023-12-11 18:00:58 +11:00
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/assets/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16x16.png" media="(prefers-color-scheme: dark)">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32x32.png" media="(prefers-color-scheme: dark)">
<link rel="icon" type="image/png" sizes="180x180" href="/assets/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/img/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/assets/img/android-chrome-512x512.png">
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
2023-12-11 15:28:20 +11:00
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&amp;display=swap">
2023-12-11 18:00:58 +11:00
<link rel="stylesheet" href="/assets/css/Login-Form-Basic-icons.css">
2023-12-11 15:28:20 +11:00
</head>
<body>
<nav class="navbar navbar-expand-md sticky-top py-3 navbar-dark" id="mainNav">
2023-12-11 18:00:58 +11:00
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><img src="/assets/img/server-icon.png" style="margin-right: 20px;"><span>HNS Alert</span></a>{%if admin%}
<a href="/sync">Sync</a>
{%endif%}<a class="btn btn-primary shadow" role="button" href="logout">Logout</a></div>
2023-12-11 15:28:20 +11:00
</nav>
<section class="py-5">
<div class="container py-5">
2023-12-11 18:00:58 +11:00
<h1 class="text-center" style="color: rgb(255,0,0);">{{error | safe}}</h1>
<h1 class="text-center" style="color: rgb(0,255,0);">{{success | safe}}</h1>
2023-12-11 15:28:20 +11:00
<div class="row mb-4 mb-lg-5">
<div class="col-md-8 col-xl-6 text-center mx-auto">
<h2 class="fw-bold">Dashboard</h2>
<p class="text-muted">Manage your domains, alerts and notification methods</p>
</div>
</div>
<div class="row mx-auto">
<div class="col">
<div class="card">
<div class="card-body">
<h4 class="card-title">Notification providers</h4>
<h6 class="text-muted card-subtitle mb-2">What notification providers do you want to use</h6>
<ul class="list-group">
<li class="list-group-item"><span>Email: {{email | safe}}</span></li>
<li class="list-group-item"><span>Discord: {{discord | safe}}</span></li>
<li class="list-group-item"><span>Telegram: {{telegram | safe}}</span></li>
</ul>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h4 class="card-title">Notification options</h4>
<h6 class="text-muted card-subtitle mb-2">These are global options. Options set per domain will always be higher priority.</h6>
<form method="post" action="/notification-options">
<ul class="list-group">
<li class="list-group-item"><span style="display: block;">Domain expiry 1 week notice</span>{% for platform, enabled in expiry_week.items() %}
<div class="form-check form-switch form-check-inline">
<input id="formCheck-{{ loop.index }}" class="form-check-input" type="checkbox" name="{{ platform }}_week" {% if enabled %}checked{% endif %}/>
<label class="form-check-label" for="formCheck-{{ loop.index }}">{{ platform|capitalize }}</label>
</div>
{% endfor %}</li>
<li class="list-group-item"><span style="display: block;">Domain expiry 1 month notice</span>{% for platform, enabled in expiry_month.items() %}
<div class="form-check form-switch form-check-inline">
<input id="formCheck-{{ loop.index }}" class="form-check-input" type="checkbox" name="{{ platform }}_month" {% if enabled %}checked{% endif %}/>
<label class="form-check-label" for="formCheck-{{ loop.index }}">{{ platform|capitalize }}</label>
</div>
2023-12-11 20:53:26 +11:00
{% endfor %}</li>
<li class="list-group-item"><span style="display: block;">Domain transfer alerts</span>{% for platform, enabled in transfer.items() %}
<div class="form-check form-switch form-check-inline">
<input id="formCheck-{{ loop.index }}" class="form-check-input" type="checkbox" name="{{ platform }}_transfer" {% if enabled %}checked{% endif %}/>
<label class="form-check-label" for="formCheck-{{ loop.index }}">{{ platform|capitalize }}</label>
</div>
{% endfor %}</li>
<li class="list-group-item"><span style="display: block;">Domain edit alerts</span>{% for platform, enabled in edit.items() %}
<div class="form-check form-switch form-check-inline">
<input id="formCheck-{{ loop.index }}" class="form-check-input" type="checkbox" name="{{ platform }}_edit" {% if enabled %}checked{% endif %}/>
<label class="form-check-label" for="formCheck-{{ loop.index }}">{{ platform|capitalize }}</label>
</div>
2023-12-11 15:28:20 +11:00
{% endfor %}</li>
</ul>
<div style="text-align: right;"><input class="btn btn-primary" type="submit" value="Save" style="margin-top: 20px;"></div>
</form>
</div>
</div>
</div>
</div>
2023-12-11 18:00:58 +11:00
<div class="row mx-auto">
<div class="col">
<div class="card">
<div class="card-body">
<h4 class="card-title">Domains</h4><ul class="list-group">
<li class="list-group-item">
<form action="/new-domain" method="post"><input class="form-control" type="text" name="domain" placeholder="newdomain/" />
</form>
</li>
{% for domain in domains %}
<li class="list-group-item">
<span style="margin-right: 20px;">{{domain}}/</span> <div class="btn-group" role="group" style="position: absolute;height: 75%;right: 10px;top: 0.3em;">
<a class="btn btn-primary" role="button" style="padding: 0px;padding-left: 36px;padding-right: 36px;" href="/{{domain}}/info">Info</a>
<a class="btn btn-primary" role="button" style="padding: 0px;padding-right: 32px;padding-left: 32px;" href="/{{domain}}/delete">Delete</a>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
2023-12-11 15:28:20 +11:00
</div>
</section>
<footer class="bg-dark">
<div class="container py-4 py-lg-5">
<div class="row justify-content-center">
<div class="col-sm-4 col-md-3 text-center text-lg-start d-flex flex-column">
<h3 class="fs-6 fw-bold">Services</h3>
<ul class="list-unstyled">
<li><a href="https://hnshosting.au" target="_blank">Wordpress Hosting</a></li>
<li><a href="https://faucet.woodburn.au" target="_blank">Domain Faucet</a></li>
<li><a href="https://github.com/nathanwoodburn" style="margin-top: 0px;" target="_blank">Other Projects</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-3 text-center text-lg-start d-flex flex-column">
<h3 class="fs-6 fw-bold">About</h3>
<ul class="list-unstyled">
<li><a href="https://github.com/nathanwoodburn/hnsalert" target="_blank">Github</a></li>
2023-12-11 15:28:20 +11:00
<li><a href="https://nathan.woodburn.au" target="_blank">Nathan.Woodburn/</a></li>
<li><a href="https://l.woodburn.au/donate" target="_blank">Donate</a></li>
</ul>
</div>
<div class="col-lg-3 text-center text-lg-start d-flex flex-column align-items-center order-first align-items-lg-start order-lg-last">
2023-12-11 18:00:58 +11:00
<div class="fw-bold d-flex align-items-center mb-2"><img src="/assets/img/favicon-32x32.png" style="margin-right: 10px;"><span>HNS Alert</span></div>
2023-12-11 15:28:20 +11:00
<p class="text-muted">A Woodburn/ project</p>
</div>
</div>
<hr>
<div class="text-muted d-flex justify-content-between align-items-center pt-3">
<p class="mb-0">Copyright © 2023 HNS Alert</p>
</div>
</div>
</footer>
2023-12-11 18:00:58 +11:00
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="/assets/js/bold-and-dark.js"></script>
2023-12-11 15:28:20 +11:00
</body>
</html>