Rewrite aimport_json()

This commit is contained in:
2024-09-21 02:09:21 +02:00
parent e76fc28cfb
commit 2be1191a03
17 changed files with 831 additions and 395 deletions

View File

@ -1,10 +1,6 @@
{% for message in messages %}
<div class="alert alert-dismissible {{ message.tags }} fade show"
role="alert">
<div>{{ message | safe }}</div>
<button type="button"
class="btn-close"
data-bs-dismiss="alert"
aria-label="Close"></button>
</div>
<div class="alert alert-dismissible {{ message.tags }} fade show" role="alert">
<div>{{ message | safe }}</div>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}

View File

@ -5,7 +5,8 @@
<h2 class="card-title h2">Information</h2>
<div class="mb-3">
<p>
This site allows users to subscribe to Twitch drops notifications. You can choose to be alerted when new drops are found on Twitch or when the drops become available for farming.
This site allows users to subscribe to Twitch drops notifications. You can choose to be alerted
when new drops are found on Twitch or when the drops become available for farming.
</p>
</div>
</div>

View File

@ -1,48 +1,50 @@
{% if webhooks %}
<div class="card mb-4 shadow-sm" id="info-box">
<div class="row g-0">
<div class="col-md-10">
<div class="card-body">
<h2 class="card-title h2">Site news</h2>
<div class="mt-auto">
{% for webhook in webhooks %}
<div class="mt-3">
<img src="{{ webhook.avatar }}?size=32"
alt="{{ webhook.name }}"
class="rounded-circle"
height="32"
width="32">
<a href="{{ webhook.url }}" target="_blank">{{ webhook.name }}</a>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-daily">
<label class="form-check-label" for="new-drop-switch-daily">Daily notification of newly added games to TTVdrops</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-weekly">
<label class="form-check-label" for="new-drop-switch-weekly">
Weekly notification of newly added games to TTVdrops
</label>
</div>
<br>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-daily">
<label class="form-check-label" for="new-org-switch-daily">
Daily notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-weekly">
<label class="form-check-label" for="new-org-switch-weekly">
Weekly notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
</div>
{% endfor %}
<div class="card mb-4 shadow-sm" id="info-box">
<div class="row g-0">
<div class="col-md-10">
<div class="card-body">
<h2 class="card-title h2">Site news</h2>
<div class="mt-auto">
{% for webhook in webhooks %}
<div class="mt-3">
<img src="{{ webhook.avatar }}?size=32" alt="{{ webhook.name }}" class="rounded-circle"
height="32" width="32">
<a href="{{ webhook.url }}" target="_blank">{{ webhook.name }}</a>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-daily">
<label class="form-check-label" for="new-drop-switch-daily">Daily notification of newly
added games to TTVdrops</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-weekly">
<label class="form-check-label" for="new-drop-switch-weekly">
Weekly notification of newly added games to TTVdrops
</label>
</div>
<br>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-daily">
<label class="form-check-label" for="new-org-switch-daily">
Daily notification of newly added <abbr
title="Organizations are the companies that own the games.">organizations</abbr> to
TTVdrops
</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-weekly">
<label class="form-check-label" for="new-org-switch-weekly">
Weekly notification of newly added <abbr
title="Organizations are the companies that own the games.">organizations</abbr> to
TTVdrops
</label>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% else %}
<p class="text-muted">No webhooks added yet.</p>
<p class="text-muted">No webhooks added yet.</p>
{% endif %}