Add icons for all quick search categories

This commit is contained in:
2026-03-20 17:26:03 +04:00
parent 5fd4ebe184
commit aa99e5d766
2 changed files with 28 additions and 11 deletions

View File

@@ -27,15 +27,21 @@ import target from 'feather-icons/dist/icons/target.svg?raw';
import user from 'feather-icons/dist/icons/user.svg?raw'; import user from 'feather-icons/dist/icons/user.svg?raw';
import x from 'feather-icons/dist/icons/x.svg?raw'; import x from 'feather-icons/dist/icons/x.svg?raw';
import zap from 'feather-icons/dist/icons/zap.svg?raw'; import zap from 'feather-icons/dist/icons/zap.svg?raw';
import wikipedia from '../icons/wikipedia.svg?raw'; import camera from '@waysidemapping/pinhead/dist/icons/camera.svg?raw';
import cupAndSaucer from '@waysidemapping/pinhead/dist/icons/cup_and_saucer.svg?raw';
import forkAndKnife from '@waysidemapping/pinhead/dist/icons/fork_and_knife.svg?raw'; import forkAndKnife from '@waysidemapping/pinhead/dist/icons/fork_and_knife.svg?raw';
import personSleepingInBed from '@waysidemapping/pinhead/dist/icons/person_sleeping_in_bed.svg?raw';
import shoppingBasket from '@waysidemapping/pinhead/dist/icons/shopping_basket.svg?raw';
import wikipedia from '../icons/wikipedia.svg?raw';
const ICONS = { const ICONS = {
'arrow-left': arrowLeft, 'arrow-left': arrowLeft,
activity, activity,
bookmark, bookmark,
camera,
'check-square': checkSquare, 'check-square': checkSquare,
clock, clock,
'cup-and-saucer': cupAndSaucer,
edit, edit,
facebook, facebook,
gift, gift,
@@ -52,11 +58,13 @@ const ICONS = {
'map-pin': mapPin, 'map-pin': mapPin,
menu, menu,
navigation, navigation,
'person-sleeping-in-bed': personSleepingInBed,
phone, phone,
plus, plus,
server, server,
search, search,
settings, settings,
'shopping-basket': shoppingBasket,
target, target,
user, user,
wikipedia, wikipedia,
@@ -64,7 +72,14 @@ const ICONS = {
zap, zap,
}; };
const FILLED_ICONS = ['fork-and-knife', 'wikipedia']; const FILLED_ICONS = [
'fork-and-knife',
'wikipedia',
'cup-and-saucer',
'shopping-basket',
'camera',
'person-sleeping-in-bed',
];
export function getIcon(name) { export function getIcon(name) {
return ICONS[name]; return ICONS[name];

View File

@@ -12,14 +12,14 @@ export const POI_CATEGORIES = [
{ {
id: 'restaurants', id: 'restaurants',
label: 'Restaurants', label: 'Restaurants',
icon: 'search', // Placeholder icon: 'fork-and-knife',
filter: ['["amenity"~"^(restaurant|fast_food|food_court|pub|cafe)$"]'], filter: ['["amenity"~"^(restaurant|fast_food|food_court|pub|cafe)$"]'],
types: ['node', 'way'], types: ['node', 'way'],
}, },
{ {
id: 'coffee', id: 'coffee',
label: 'Coffee', label: 'Coffee',
icon: 'search', // Placeholder icon: 'cup-and-saucer',
filter: [ filter: [
'["amenity"~"^(cafe|ice_cream)$"]', '["amenity"~"^(cafe|ice_cream)$"]',
'["shop"~"^(coffee|tea)$"]', '["shop"~"^(coffee|tea)$"]',
@@ -30,18 +30,20 @@ export const POI_CATEGORIES = [
{ {
id: 'groceries', id: 'groceries',
label: 'Groceries', label: 'Groceries',
icon: 'search', // Placeholder icon: 'shopping-basket',
filter: [ filter: [
'["shop"~"^(supermarket|convenience|grocery|greengrocer|bakery|butcher|deli|farm|seafood)$"]', '["shop"~"^(supermarket|convenience|grocery|greengrocer|bakery|butcher|deli|farm|seafood)$"]',
], ],
types: ['node', 'way'], types: ['node', 'way'],
}, },
{ {
id: 'attractions', id: 'things-to-do',
label: 'Attractions', label: 'Things to do',
icon: 'search', // Placeholder icon: 'camera',
filter: [ filter: [
'["tourism"~"^(museum|gallery|attraction|viewpoint|zoo|theme_park)$"]', '["tourism"~"^(museum|gallery|attraction|viewpoint|zoo|theme_park|aquarium|artwork)$"]',
'["amenity"~"^(cinema|theatre|arts_centre|planetarium)$"]',
'["leisure"~"^(sports_centre|stadium|water_park)$"]',
'["historic"]', '["historic"]',
], ],
types: ['node', 'way', 'relation'], types: ['node', 'way', 'relation'],
@@ -49,8 +51,8 @@ export const POI_CATEGORIES = [
{ {
id: 'accommodation', id: 'accommodation',
label: 'Hotels', label: 'Hotels',
icon: 'search', // Placeholder icon: 'person-sleeping-in-bed',
filter: ['["tourism"~"^(hotel|hostel|guest_house|apartment|motel)$"]'], filter: ['["tourism"~"^(hotel|hostel|motel)$"]'],
types: ['node', 'way', 'relation'], types: ['node', 'way', 'relation'],
}, },
]; ];