Skip to content

Commit

Permalink
Default label for ResetButton & update for reset-all
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed Apr 26, 2024
1 parent a2ffeba commit 6a35f3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions resources/js/components/catalog-new/ResetButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const props = defineProps<{
<template>
<button
:class="[
'tw-flex tw-items-center tw-border tw-leading-none tw-border-gray-300 tw-bg-white tw-font-normal hover:tw-border-gray-800',
'tw-flex tw-items-center tw-border tw-leading-none tw-border-gray-300 tw-bg-white tw-font-normal hover:tw-border-gray-800 tw-whitespace-nowrap',
props.sm
? 'tw-px-1.5 tw-py-1 tw-text-xs'
: 'tw-px-1.5 tw-py-1 tw-text-xs md:tw-px-4 md:tw-py-1.5 md:tw-text-sm',
Expand All @@ -32,6 +32,6 @@ const props = defineProps<{
<clipPath id="a"><path d="M0 0h14v14H0z" /></clipPath>
</defs>
</svg>
<slot></slot>
<slot>{{ $t('item.filter.clear') }}</slot>
</button>
</template>
16 changes: 1 addition & 15 deletions resources/views/frontend/catalog-new/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ class="tw-flex tw-justify-end">
<catalog.reset-button
v-on:click="handleYearRangeChange(null)"
class="tw-mb-3">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
<filter-new-year-slider
Expand Down Expand Up @@ -199,7 +198,6 @@ class="tw-inline-block tw-h-4 tw-w-4"
<catalog.reset-button
v-on:click="clearFilterSelection('color')"
class="tw-mb-2">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
<filter-new-color-slider
Expand Down Expand Up @@ -383,7 +381,6 @@ class="tw-flex tw-justify-center">
<catalog.reset-button
v-on:click="handleYearRangeChange(null)"
class="tw-mt-2.5">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
@endslot
Expand Down Expand Up @@ -425,7 +422,6 @@ class="tw-flex tw-justify-center">
<catalog.reset-button
v-on:click="clearFilterSelection('color')"
class="tw-mt-4">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
@endslot
Expand Down Expand Up @@ -482,7 +478,6 @@ class="tw-pb-2"
<catalog.reset-button class="tw-mr-3"
v-if="query.author.length"
v-on:click="clearFilterSelection('author')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -514,7 +509,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.work_type.length"
v-on:click="clearFilterSelection('work_type')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -546,7 +540,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.object_type.length"
v-on:click="clearFilterSelection('object_type')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -577,7 +570,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.tag.length"
v-on:click="clearFilterSelection('tag')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -609,7 +601,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.gallery.length"
v-on:click="clearFilterSelection('gallery')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -638,7 +629,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.technique.length"
v-on:click="clearFilterSelection('technique')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -670,7 +660,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.topic.length"
v-on:click="clearFilterSelection('topic')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -702,7 +691,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.medium.length"
v-on:click="clearFilterSelection('medium')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -809,9 +797,7 @@ class="tw-h-4 tw-w-4 tw-fill-current" viewBox="0 0 256 256">
class="mb-4">
<catalog.reset-button v-if="selectedOptionsAsLabels.length"
v-on:click="clearAllSelections" sm>
<span
class="tw-whitespace-nowrap">{{ trans('item.filter.clear') }}
</span>
{{ trans('item.filter.clear_all') }}
</catalog.reset-button>
</transition>
</div>
Expand Down

0 comments on commit 6a35f3b

Please sign in to comment.