Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Dec 12, 2024
1 parent c9f4bcd commit 53267c9
Showing 1 changed file with 84 additions and 84 deletions.
168 changes: 84 additions & 84 deletions packages/kolibri-common/components/SearchFiltersPanel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,95 +21,95 @@
v-if="windowIsLarge || !currentCategory"
:class="windowIsLarge ? '' : 'drawer-panel'"
>
<div v-if="!accordion">
<!-- search by keyword -->
<h2 class="title">
{{ $tr('keywords') }}
<div v-if="!accordion">
<!-- search by keyword -->
<h2 class="title">
{{ $tr('keywords') }}
</h2>
<SearchBox
key="channel-search"
ref="searchBox"
:placeholder="coreString('findSomethingToLearn')"
:value="value.keywords || ''"
@change="val => $emit('input', { ...value, keywords: val })"
/>
<div v-if="Object.keys(availableLibraryCategories).length">
<h2 class="section title">
{{ $tr('categories') }}
</h2>
<SearchBox
key="channel-search"
ref="searchBox"
:placeholder="coreString('findSomethingToLearn')"
:value="value.keywords || ''"
@change="val => $emit('input', { ...value, keywords: val })"
/>
<div v-if="Object.keys(availableLibraryCategories).length">
<h2 class="section title">
{{ $tr('categories') }}
</h2>
<!-- list of category metadata - clicking prompts a filter modal -->
<div
v-for="(category, key) in availableLibraryCategories"
:key="key"
span="4"
class="category-list-item"
>
<KButton
:text="coreString(category.value)"
appearance="flat-button"
:appearanceOverrides="
isCategoryActive(category.value)
? { ...categoryListItemStyles, ...categoryListItemActiveStyles }
: categoryListItemStyles
"
:disabled="
availableRootCategories &&
!availableRootCategories[category.value] &&
!isCategoryActive(category.value)
"
:iconAfter="hasNestedCategories(key) ? 'chevronRight' : null"
@click="handleCategory(key)"
/>
</div>
<div
span="4"
class="category-list-item"
>
<KButton
:text="coreString('uncategorized')"
appearance="flat-button"
:appearanceOverrides="
isCategoryActive('no_categories')
? { ...categoryListItemStyles, ...categoryListItemActiveStyles }
: categoryListItemStyles
"
@click="noCategories"
/>
</div>
<!-- list of category metadata - clicking prompts a filter modal -->
<div
v-for="(category, key) in availableLibraryCategories"
:key="key"
span="4"
class="category-list-item"
>
<KButton
:text="coreString(category.value)"
appearance="flat-button"
:appearanceOverrides="
isCategoryActive(category.value)
? { ...categoryListItemStyles, ...categoryListItemActiveStyles }
: categoryListItemStyles
"
:disabled="
availableRootCategories &&
!availableRootCategories[category.value] &&
!isCategoryActive(category.value)
"
:iconAfter="hasNestedCategories(key) ? 'chevronRight' : null"
@click="handleCategory(key)"
/>
</div>
<div
span="4"
class="category-list-item"
>
<KButton
:text="coreString('uncategorized')"
appearance="flat-button"
:appearanceOverrides="
isCategoryActive('no_categories')
? { ...categoryListItemStyles, ...categoryListItemActiveStyles }
: categoryListItemStyles
"
@click="noCategories"
/>
</div>
</div>
<ActivityButtonsGroup
v-if="showActivities"
class="section"
@input="handleActivity"
/>
<!-- Filter results by learning activity, displaying all options -->
<SelectGroup
v-model="inputValue"
:showChannels="showChannels"
class="section"
/>
<ActivityButtonsGroup
v-if="showActivities"
class="section"
@input="handleActivity"
/>
<!-- Filter results by learning activity, displaying all options -->
<SelectGroup
v-model="inputValue"
:showChannels="showChannels"
class="section"
/>
<div
v-if="Object.keys(availableResourcesNeeded).length"
class="section"
>
<h2 class="title">
{{ coreString('showResources') }}
</h2>
<div
v-if="Object.keys(availableResourcesNeeded).length"
class="section"
v-for="(val, activity) in availableResourcesNeeded"
:key="activity"
span="4"
alignment="center"
>
<h2 class="title">
{{ coreString('showResources') }}
</h2>
<div
v-for="(val, activity) in availableResourcesNeeded"
:key="activity"
span="4"
alignment="center"
>
<KCheckbox
:checked="value.learner_needs[val]"
:label="coreString(activity)"
:disabled="availableNeeds && !availableNeeds[val]"
@change="handleNeed(val)"
/>
</div>
<KCheckbox
:checked="value.learner_needs[val]"
:label="coreString(activity)"
:disabled="availableNeeds && !availableNeeds[val]"
@change="handleNeed(val)"
/>
</div>

</div>

<div v-if="accordion && !currentCategory">
<!-- search by keyword -->
<h2 class="title">
Expand Down

0 comments on commit 53267c9

Please sign in to comment.