Commit 9c1cd369 authored by David Trattnig's avatar David Trattnig
Browse files

Fixes for language filter

parent 8920c814
......@@ -56,8 +56,6 @@
if (selectedCat.id) {
categoryId = null
filterQuery += `category=${selectedCat.id}&`
} else {
filterQuery = ''
}
}
// Filter by language
......@@ -66,7 +64,7 @@
if (language) filterQuery += `language=${language}&`
// Evaluate if we should list all
if (!categoryId && !language && !selectedCat) {
if (!categoryId && !selectedCat) {
selectedCat = defaultCat
}
......@@ -142,15 +140,19 @@
</style>
<template>
{#if selectedCat}
<div class="show-list">
<h1 class="list-title">
{#if selectedCat}
<span class="category-wrapper">
<span class="category-prefix"></span>
<span class="category-title">{selectedCat.name}</span>
{#if selectedCat.id}
<i class="aura-icons">
<div class="icon-category-{selectedCat.id}" />
</i>
{/if}
</span>
{/if}
{#if language}
<span class="language-wrapper">
......@@ -158,30 +160,34 @@
</span>
{/if}
</h1>
<p class="category-description cat-{selectedCat.id}">{selectedCat.description}</p>
{/if}
{#if allCategories && enableCategoryDropdown}
<Select class="shaped-outlined" variant="outlined" bind:value={selectedCat}>
<Option value="{defaultCat}">{defaultCat.name}</Option>
{#each allCategories as cat}
<Option value={cat}>{cat.name}</Option>
{/each}
</Select>
{/if}
<div class="card-container list">
{#if shows}
{#each shows as show}
<ShowCardMedium {show} {urlShowDetail} {renderhtml} />
{#if selectedCat}
<p class="category-description cat-{selectedCat.id}">{selectedCat.description}</p>
{/if}
{#if allCategories && enableCategoryDropdown}
<Select class="shaped-outlined" variant="outlined" bind:value={selectedCat}>
<Option value="{defaultCat}">{defaultCat.name}</Option>
{#each allCategories as cat}
<Option value={cat}>{cat.name}</Option>
{/each}
{:else}
<div class="loading">
<div class="aura-spinner">
<div />
<div />
</div>
</div>
</Select>
{/if}
<div class="card-container list">
{#if shows}
{#each shows as show}
<ShowCardMedium {show} {urlShowDetail} {renderhtml} />
{/each}
{:else}
<div class="loading">
<div class="aura-spinner">
<div />
<div />
</div>
</div>
{/if}
</div>
</div>
</template>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment