diff --git a/app/components/catalog/CatalogGridHubs.vue b/app/components/catalog/CatalogGridHubs.vue deleted file mode 100644 index a8d214f..0000000 --- a/app/components/catalog/CatalogGridHubs.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - {{ t('catalog.headers.selectHub') }} - - - - - - - {{ t('catalog.empty.noHubs') }} - - - - - - - - - - - diff --git a/app/components/catalog/CatalogGridHubsForProduct.vue b/app/components/catalog/CatalogGridHubsForProduct.vue deleted file mode 100644 index 948c024..0000000 --- a/app/components/catalog/CatalogGridHubsForProduct.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - {{ t('catalog.headers.hubsForProduct') }} - - ({{ filteredItems.length }}) - - - - - - - - - {{ t('catalog.empty.noHubs') }} - - - - - - - - - diff --git a/app/components/catalog/CatalogGridOffers.vue b/app/components/catalog/CatalogGridOffers.vue deleted file mode 100644 index fff654c..0000000 --- a/app/components/catalog/CatalogGridOffers.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - {{ t('catalog.headers.offers') }} - - ({{ filteredItems.length }}) - - - - - - - - - {{ t('catalog.empty.noOffers') }} - - - - - - - - - diff --git a/app/components/catalog/CatalogGridProducts.vue b/app/components/catalog/CatalogGridProducts.vue deleted file mode 100644 index 2e4f29f..0000000 --- a/app/components/catalog/CatalogGridProducts.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - {{ t('catalog.headers.selectProduct') }} - - - - - - - {{ t('catalog.empty.noProducts') }} - - - - - - - - - diff --git a/app/components/catalog/CatalogGridProductsFromSupplier.vue b/app/components/catalog/CatalogGridProductsFromSupplier.vue deleted file mode 100644 index 0b89d1e..0000000 --- a/app/components/catalog/CatalogGridProductsFromSupplier.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - {{ t('catalog.headers.productsFromSupplier') }} - - - - - - - {{ t('catalog.empty.noProducts') }} - - - - - - - - - diff --git a/app/components/catalog/CatalogGridProductsInHub.vue b/app/components/catalog/CatalogGridProductsInHub.vue deleted file mode 100644 index e55924e..0000000 --- a/app/components/catalog/CatalogGridProductsInHub.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - {{ t('catalog.headers.productsInHub') }} - - - - - - - {{ t('catalog.empty.noProducts') }} - - - - - - - - - diff --git a/app/components/catalog/CatalogGridSuppliers.vue b/app/components/catalog/CatalogGridSuppliers.vue deleted file mode 100644 index 0402949..0000000 --- a/app/components/catalog/CatalogGridSuppliers.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - {{ t('catalog.headers.selectSupplier') }} - - - - - - - {{ t('catalog.empty.noSuppliers') }} - - - - - - - - - - - diff --git a/app/components/search/UnifiedSearchBar.vue b/app/components/search/UnifiedSearchBar.vue index 097b408..1829e57 100644 --- a/app/components/search/UnifiedSearchBar.vue +++ b/app/components/search/UnifiedSearchBar.vue @@ -1,46 +1,53 @@ - - - - - - {{ token.label }} - - - - + + + - - - - {{ selectModeLabel }}: ? - + + + - - - + + {{ token.label }} + + + + - - + + + + {{ selectModeLabel }}: + + + + + + @@ -49,15 +56,15 @@ - + {{ chip.label }} @@ -84,17 +91,23 @@ const emit = defineEmits<{ const { t } = useI18n() +const inputRef = ref() const localSearchQuery = ref(props.searchQuery) watch(() => props.searchQuery, (val) => { localSearchQuery.value = val }) +const focusInput = () => { + inputRef.value?.focus() +} + const placeholder = computed(() => { if (props.selectMode === 'product') return t('catalog.search.searchProducts') if (props.selectMode === 'supplier') return t('catalog.search.searchSuppliers') if (props.selectMode === 'hub') return t('catalog.search.searchHubs') - return t('catalog.search.placeholder') + if (props.activeTokens.length === 0) return t('catalog.search.placeholder') + return t('catalog.search.refine') }) const selectModeLabel = computed(() => { diff --git a/app/pages/catalog/index.vue b/app/pages/catalog/index.vue index f7f63e9..7d8927d 100644 --- a/app/pages/catalog/index.vue +++ b/app/pages/catalog/index.vue @@ -1,7 +1,19 @@ - - - + + - + - - - - - - + + {{ headerText }} + - - - - + + + hoveredId = h ? item.uuid : undefined" + /> - - - - + + - - - - + + hoveredId = h ? item.uuid : undefined" + /> - - - - + + + - - - - - - - - - - - - - - - - + + + + {{ t('catalog.empty.noResults') }} + + diff --git a/i18n/locales/en/catalog.json b/i18n/locales/en/catalog.json index e53696e..1645b19 100644 --- a/i18n/locales/en/catalog.json +++ b/i18n/locales/en/catalog.json @@ -9,6 +9,7 @@ }, "search": { "placeholder": "Find an offer...", + "refine": "Refine...", "searchProducts": "Search products...", "searchSuppliers": "Search suppliers...", "searchHubs": "Search hubs..." @@ -30,7 +31,8 @@ "noProducts": "No products found", "noSuppliers": "No suppliers found", "noHubs": "No hubs found", - "noOffers": "No offers found" + "noOffers": "No offers found", + "noResults": "No results found" } } } diff --git a/i18n/locales/ru/catalog.json b/i18n/locales/ru/catalog.json index cb62dac..7280e7f 100644 --- a/i18n/locales/ru/catalog.json +++ b/i18n/locales/ru/catalog.json @@ -9,6 +9,7 @@ }, "search": { "placeholder": "Найти предложение...", + "refine": "Уточнить...", "searchProducts": "Поиск товаров...", "searchSuppliers": "Поиск поставщиков...", "searchHubs": "Поиск хабов..." @@ -30,7 +31,8 @@ "noProducts": "Товары не найдены", "noSuppliers": "Поставщики не найдены", "noHubs": "Хабы не найдены", - "noOffers": "Предложения не найдены" + "noOffers": "Предложения не найдены", + "noResults": "Ничего не найдено" } } }