Fix fix fix

This commit is contained in:
Ondřej 2023-08-27 12:20:49 +02:00
parent a8be87c205
commit 8a2d0ae89a
2 changed files with 27 additions and 33 deletions

View file

@ -0,0 +1,24 @@
<dialog hx-boost="false" class="dialog" x-ref="feedsDialog">
<header class="flex justify-between mb-6 items-center">
<p>Filter by feed</p>
<button formmethod="dialog" class="button-outline button-md" @click="$refs.feedsDialog.close()">
</button>
</header>
<div class="columns-2 mb-6">
{% for feed in feeds %}
<label
class="flex items-center gap-3 px-2 py-1.5 hover:bg-gray-100 rounded"
>
<input type="checkbox" name="feeds[]" value="{{ feed['feed_name'] }}"
{{ 'checked' if feed['feed_name'] in selected_feeds }} > {{
feed['feed_name'] }}
</label>
{% endfor %}
</div>
<button type="submit" class="button button-md">
Filter diffs
</button>
</dialog>

View file

@ -1,16 +1,9 @@
<section class="container">
<div class="flex items-center flex-wrap shrink-0 gap-x-2 gap-y-2">
<form
method="get"
class="flex gap-x-2"
hx-trigger="change"
hx-get="/"
hx-target="#diff-list"
hx-select="#diff-list"
>
<form method="get" action="/" class="flex gap-x-2">
<input
class="text-input w-full max-w-20rem"
type="text"
type="search"
id="search"
name="search"
value="{{ search|e }}"
@ -30,30 +23,7 @@
Feeds
</button>
<dialog hx-boost="false" class="dialog" x-ref="feedsDialog">
<header class="flex justify-between mb-6 items-center">
<p>Filter by feed</p>
<button formmethod="dialog" class="button-outline button-md" @click="$refs.feedsDialog.close()">
</button>
</header>
<div class="columns-2 mb-6">
{% for feed in feeds %}
<label
class="flex items-center gap-3 px-2 py-1.5 hover:bg-gray-100 rounded"
>
<input type="checkbox" name="feeds[]" value="{{ feed['feed_name'] }}"
{{ 'checked' if feed['feed_name'] in selected_feeds }} > {{
feed['feed_name'] }}
</label>
{% endfor %}
</div>
<button type="submit" class="button button-md">
Filter diffs
</button>
</dialog>
{% include "parts/feeds_filter_dialog.html" %}
</form>
<label class="checkbox mx-2">