Refactor feed URL and update interval sections
This commit is contained in:
parent
5215b80643
commit
a7e0213b1a
1 changed files with 43 additions and 32 deletions
|
|
@ -79,7 +79,6 @@
|
||||||
<!-- Feed URL Configuration -->
|
<!-- Feed URL Configuration -->
|
||||||
<div class="mt-4 border-top border-secondary pt-3">
|
<div class="mt-4 border-top border-secondary pt-3">
|
||||||
<h5 class="mb-3">Feed URL</h5>
|
<h5 class="mb-3">Feed URL</h5>
|
||||||
<p class="text-muted mb-2">Change the URL for this feed. This can be useful if a feed has moved.</p>
|
|
||||||
<form action="/change_feed_url" method="post" class="mb-2">
|
<form action="/change_feed_url" method="post" class="mb-2">
|
||||||
<input type="hidden" name="old_feed_url" value="{{ feed.url }}" />
|
<input type="hidden" name="old_feed_url" value="{{ feed.url }}" />
|
||||||
<div class="input-group input-group-sm mb-2">
|
<div class="input-group input-group-sm mb-2">
|
||||||
|
|
@ -115,32 +114,43 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Update Interval Configuration -->
|
<!-- Update Interval Configuration -->
|
||||||
<div class="mt-4 border-top border-secondary pt-3">
|
<div class="mt-4 border-top border-secondary pt-3">
|
||||||
<h5 class="mb-3">Update Interval</h5>
|
<h5 class="mb-3">
|
||||||
|
Update Interval <span class="badge
|
||||||
{% if feed_interval %}
|
{% if feed_interval %}
|
||||||
<p class="text-muted mb-2">
|
bg-info
|
||||||
Current: <strong>{{ feed_interval }} minutes</strong>
|
|
||||||
{% if feed_interval >= 60 %}({{ (feed_interval / 60) | round(1) }} hours){% endif %}
|
|
||||||
<span class="badge bg-info">Custom</span>
|
|
||||||
</p>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-muted mb-2">
|
bg-secondary
|
||||||
Current: <strong>{{ global_interval }} minutes</strong>
|
{% endif %}">
|
||||||
{% if global_interval >= 60 %}({{ (global_interval / 60) | round(1) }} hours){% endif %}
|
{% if feed_interval %}
|
||||||
<span class="badge bg-secondary">Using global default</span>
|
Custom
|
||||||
</p>
|
{% else %}
|
||||||
|
Using global default
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="/set_update_interval" method="post" class="mb-2">
|
</span>
|
||||||
|
</h5>
|
||||||
|
<div class="d-flex align-items-center gap-2 flex-wrap">
|
||||||
|
<span class="text-muted">Current: <strong>
|
||||||
|
{% if feed_interval %}
|
||||||
|
{{ feed_interval }}
|
||||||
|
{% if feed_interval >= 60 %}({{ (feed_interval / 60) | round(1) }} hours){% endif %}
|
||||||
|
{% else %}
|
||||||
|
{{ global_interval }}
|
||||||
|
{% if global_interval >= 60 %}({{ (global_interval / 60) | round(1) }} hours){% endif %}
|
||||||
|
{% endif %}
|
||||||
|
minutes</strong></span>
|
||||||
|
<form action="/set_update_interval"
|
||||||
|
method="post"
|
||||||
|
class="d-inline-flex gap-2 align-items-center">
|
||||||
<input type="hidden" name="feed_url" value="{{ feed.url }}" />
|
<input type="hidden" name="feed_url" value="{{ feed.url }}" />
|
||||||
<div class="input-group input-group-sm mb-2">
|
|
||||||
<input type="number"
|
<input type="number"
|
||||||
class="form-control form-control-sm interval-input"
|
class="form-control form-control-sm interval-input"
|
||||||
|
style="width: 100px"
|
||||||
name="interval_minutes"
|
name="interval_minutes"
|
||||||
placeholder="Minutes"
|
placeholder="Minutes"
|
||||||
min="1"
|
min="1"
|
||||||
value="{{ feed_interval if feed_interval else global_interval }}"
|
value="{{ feed_interval if feed_interval else global_interval }}"
|
||||||
required />
|
required />
|
||||||
<button class="btn btn-primary" type="submit">Set Interval</button>
|
<button class="btn btn-primary btn-sm" type="submit">Set Interval</button>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
{% if feed_interval %}
|
{% if feed_interval %}
|
||||||
<form action="/reset_update_interval" method="post" class="d-inline">
|
<form action="/reset_update_interval" method="post" class="d-inline">
|
||||||
|
|
@ -150,6 +160,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{# Rendered HTML content #}
|
{# Rendered HTML content #}
|
||||||
<pre>{{ html|safe }}</pre>
|
<pre>{{ html|safe }}</pre>
|
||||||
{% if is_show_more_entries_button_visible %}
|
{% if is_show_more_entries_button_visible %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue