wip: filter twig component pre-select options

This commit is contained in:
2025-04-29 23:40:27 -05:00
parent 8a1a89f17d
commit 3971cf3260
4 changed files with 49 additions and 36 deletions

View File

@@ -13,27 +13,19 @@
class="px-1 py-0.5 bg-stone-100 text-gray-800 rounded-md"
value="{{ app.user.userPreferenceValues["resolution"] }}"
>
{# <option {{ filter.resolution == "n/a" ? "selected" }}#}
{# value="">n/a</option>#}
{# <option {{ filter.resolution == "720p" ? "selected" }}#}
{# value="720p">720p</option>#}
{# <option {{ filter.resolution == "1080p" ? "selected" }}#}
{# value="1080p">1080p</option>#}
{# <option {{ filter.resolution == "2160p" ? "selected" }}#}
{# value="2160p">2160p</option>#}
<option value="">n/a</option>
{% for option in this.preferences['resolution'] %}
<option value="{{ option.name|lower }}">{{ option.name }}</option>
{% endfor %}
</select>
</label>
<label for="codec">
Codec
<select id="codec" data-result-filter-target="codec" class="px-1 py-0.5 bg-stone-100 text-sm text-gray-800 rounded-md">
{# <option {{ filter.codec == "n/a" ? "selected" }}#}
{# value="">n/a</option>#}
{# <option {{ filter.codec == "-" ? "selected" }}#}
{# value="-">-</option>#}
{# <option {{ filter.codec == "h264" ? "selected" }}#}
{# value="h264">h264</option>#}
{# <option {{ filter.codec == "h265" ? "selected" }}#}
{# value="h265">h265/HEVC</option>#}
<option value="">n/a</option>
{% for option in this.preferences['codec'] %}
<option value="{{ option.name|lower }}">{{ option.name }}</option>
{% endfor %}
</select>
</label>
<label for="language">