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 x from 'feather-icons/dist/icons/x.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 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 = {
'arrow-left': arrowLeft,
activity,
bookmark,
camera,
'check-square': checkSquare,
clock,
'cup-and-saucer': cupAndSaucer,
edit,
facebook,
gift,
@@ -52,11 +58,13 @@ const ICONS = {
'map-pin': mapPin,
menu,
navigation,
'person-sleeping-in-bed': personSleepingInBed,
phone,
plus,
server,
search,
settings,
'shopping-basket': shoppingBasket,
target,
user,
wikipedia,
@@ -64,7 +72,14 @@ const ICONS = {
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) {
return ICONS[name];

View File

@@ -12,14 +12,14 @@ export const POI_CATEGORIES = [
{
id: 'restaurants',
label: 'Restaurants',
icon: 'search', // Placeholder
icon: 'fork-and-knife',
filter: ['["amenity"~"^(restaurant|fast_food|food_court|pub|cafe)$"]'],
types: ['node', 'way'],
},
{
id: 'coffee',
label: 'Coffee',
icon: 'search', // Placeholder
icon: 'cup-and-saucer',
filter: [
'["amenity"~"^(cafe|ice_cream)$"]',
'["shop"~"^(coffee|tea)$"]',
@@ -30,18 +30,20 @@ export const POI_CATEGORIES = [
{
id: 'groceries',
label: 'Groceries',
icon: 'search', // Placeholder
icon: 'shopping-basket',
filter: [
'["shop"~"^(supermarket|convenience|grocery|greengrocer|bakery|butcher|deli|farm|seafood)$"]',
],
types: ['node', 'way'],
},
{
id: 'attractions',
label: 'Attractions',
icon: 'search', // Placeholder
id: 'things-to-do',
label: 'Things to do',
icon: 'camera',
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"]',
],
types: ['node', 'way', 'relation'],
@@ -49,8 +51,8 @@ export const POI_CATEGORIES = [
{
id: 'accommodation',
label: 'Hotels',
icon: 'search', // Placeholder
filter: ['["tourism"~"^(hotel|hostel|guest_house|apartment|motel)$"]'],
icon: 'person-sleeping-in-bed',
filter: ['["tourism"~"^(hotel|hostel|motel)$"]'],
types: ['node', 'way', 'relation'],
},
];