diff --git a/src/bundle/Resources/public/scss/_mixins.scss b/src/bundle/Resources/public/scss/_mixins.scss index 55ae909c89..b0f5406ff2 100644 --- a/src/bundle/Resources/public/scss/_mixins.scss +++ b/src/bundle/Resources/public/scss/_mixins.scss @@ -12,6 +12,7 @@ @import 'mixins/containers'; @import 'mixins/drag-and-drop'; @import 'mixins/spinner'; +@import 'mixins/tab-selector'; @mixin datetime-field() { &.is-invalid { diff --git a/src/bundle/Resources/public/scss/mixins/_tab-selector.scss b/src/bundle/Resources/public/scss/mixins/_tab-selector.scss new file mode 100644 index 0000000000..2ae8f1efb9 --- /dev/null +++ b/src/bundle/Resources/public/scss/mixins/_tab-selector.scss @@ -0,0 +1,43 @@ +@mixin tab-selector { + &__item { + height: calculateRem(48px); + width: calculateRem(48px); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + border-radius: $ibexa-border-radius; + margin: calculateRem(12px) calculateRem(8px) calculateRem(24px); + position: relative; + + .ibexa-icon { + fill: $ibexa-color-black; + } + + &--selected { + background-color: $ibexa-color-light-400; + + .ibexa-icon { + fill: $ibexa-color-black; + } + } + + &:not(:first-of-type) { + &::before { + content: ''; + position: absolute; + top: calculateRem(-12px); + left: calculateRem(12px); + height: calculateRem(1.5px); + width: calculateRem(24px); + background-color: $ibexa-color-dark-200; + } + } + + &:hover { + .ibexa-icon { + fill: $ibexa-color-primary; + } + } + } +} diff --git a/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_tab.selector.scss b/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_tab.selector.scss index 5489d27c0f..9373d637a2 100644 --- a/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_tab.selector.scss +++ b/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_tab.selector.scss @@ -1,43 +1,3 @@ .c-tab-selector { - &__item { - height: calculateRem(48px); - width: calculateRem(48px); - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - border-radius: $ibexa-border-radius; - margin: calculateRem(12px) calculateRem(8px) calculateRem(24px); - position: relative; - - .ibexa-icon { - fill: $ibexa-color-black; - } - - &--selected { - background-color: $ibexa-color-light-400; - - .ibexa-icon { - fill: $ibexa-color-black; - } - } - - &:not(:first-of-type) { - &:before { - content: ''; - position: absolute; - top: calculateRem(-12px); - left: calculateRem(12px); - height: calculateRem(1.5px); - width: calculateRem(24px); - background-color: $ibexa-color-dark-200; - } - } - - &:hover { - .ibexa-icon { - fill: $ibexa-color-primary; - } - } - } + @include tab-selector(); } diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useSearchByQueryFetch.js b/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useSearchByQueryFetch.js index 1c6a5bc933..f9d615e836 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useSearchByQueryFetch.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useSearchByQueryFetch.js @@ -46,6 +46,7 @@ export const useSearchByQueryFetch = () => { contentNameCriterion = null, dateCriterion = null, useAlwaysAvailable = true, + isBookmarked = null, ) => { const handleFetch = (response) => { dispatchLoadedLocationsAction({ type: 'CLEAR_LOCATIONS' }); @@ -81,6 +82,10 @@ export const useSearchByQueryFetch = () => { query.DateMetadataCriterion = dateCriterion; } + if (isBookmarked) { + query.IsBookmarkedCriterion = true; + } + const isImageCriterionDataEmpty = !imageCriterionData || Object.keys(imageCriterionData).length === 0; if (!isImageCriterionDataEmpty) {