Expand calendar event icon options
This commit is contained in:
+106
-19
@@ -59,27 +59,113 @@ const EVENT_COLOR_NAMES = () => ({
|
||||
'#30B0C7': t('calendar.colorCyan'),
|
||||
});
|
||||
|
||||
const EVENT_ICON_ALIASES = {
|
||||
tooth: 'drill',
|
||||
};
|
||||
|
||||
const EVENT_ICONS = [
|
||||
{ value: 'calendar', label: 'Calendar' },
|
||||
{ value: 'tooth', label: 'Dentist' },
|
||||
{ value: 'stethoscope', label: 'Doctor' },
|
||||
{ value: 'heart-pulse', label: 'Health' },
|
||||
{ value: 'briefcase', label: 'Work' },
|
||||
{ value: 'plane', label: 'Travel' },
|
||||
{ value: 'utensils', label: 'Meal' },
|
||||
{ value: 'cake', label: 'Birthday' },
|
||||
{ value: 'car', label: 'Car' },
|
||||
{ value: 'graduation-cap', label: 'School' },
|
||||
{ value: 'dumbbell', label: 'Sports' },
|
||||
{ value: 'home', label: 'Home' },
|
||||
{ value: 'shopping-bag', label: 'Shopping' },
|
||||
{ value: 'music', label: 'Music' },
|
||||
{ value: 'party-popper', label: 'Party' },
|
||||
{ value: 'paw-print', label: 'Pet' },
|
||||
{ value: 'scissors', label: 'Haircut' },
|
||||
{ value: 'book-open', label: 'Reading' },
|
||||
{ value: 'users', label: 'Family' },
|
||||
{ value: 'drill', label: 'Dentist' },
|
||||
{ value: 'alarm-clock', label: 'Alarm' },
|
||||
{ value: 'clock', label: 'Time' },
|
||||
{ value: 'bell', label: 'Reminder' },
|
||||
{ value: 'map-pin', label: 'Location' },
|
||||
{ value: 'home', label: 'Home' },
|
||||
{ value: 'house', label: 'House' },
|
||||
{ value: 'building', label: 'Building' },
|
||||
{ value: 'hospital', label: 'Hospital' },
|
||||
{ value: 'stethoscope', label: 'Doctor' },
|
||||
{ value: 'syringe', label: 'Vaccine' },
|
||||
{ value: 'pill', label: 'Medicine' },
|
||||
{ value: 'tablets', label: 'Tablets' },
|
||||
{ value: 'bandage', label: 'Bandage' },
|
||||
{ value: 'ambulance', label: 'Ambulance' },
|
||||
{ value: 'heart-pulse', label: 'Health' },
|
||||
{ value: 'activity', label: 'Activity' },
|
||||
{ value: 'cross', label: 'Care' },
|
||||
{ value: 'scissors', label: 'Haircut' },
|
||||
{ value: 'shower-head', label: 'Personal care' },
|
||||
{ value: 'dumbbell', label: 'Sports' },
|
||||
{ value: 'trophy', label: 'Competition' },
|
||||
{ value: 'car', label: 'Car' },
|
||||
{ value: 'bus', label: 'Bus' },
|
||||
{ value: 'train', label: 'Train' },
|
||||
{ value: 'tram-front', label: 'Transit' },
|
||||
{ value: 'fuel', label: 'Fuel' },
|
||||
{ value: 'parking-meter', label: 'Parking' },
|
||||
{ value: 'traffic-cone', label: 'Traffic' },
|
||||
{ value: 'navigation', label: 'Navigation' },
|
||||
{ value: 'route', label: 'Route' },
|
||||
{ value: 'briefcase', label: 'Work' },
|
||||
{ value: 'laptop', label: 'Laptop' },
|
||||
{ value: 'monitor', label: 'Computer' },
|
||||
{ value: 'presentation', label: 'Presentation' },
|
||||
{ value: 'plane', label: 'Travel' },
|
||||
{ value: 'plane-takeoff', label: 'Flight' },
|
||||
{ value: 'school', label: 'School' },
|
||||
{ value: 'graduation-cap', label: 'Education' },
|
||||
{ value: 'book-open', label: 'Reading' },
|
||||
{ value: 'library', label: 'Library' },
|
||||
{ value: 'pencil', label: 'Study' },
|
||||
{ value: 'notebook-pen', label: 'Notes' },
|
||||
{ value: 'calculator', label: 'Calculator' },
|
||||
{ value: 'utensils', label: 'Meal' },
|
||||
{ value: 'cooking-pot', label: 'Cooking' },
|
||||
{ value: 'coffee', label: 'Coffee' },
|
||||
{ value: 'cake', label: 'Birthday' },
|
||||
{ value: 'croissant', label: 'Bakery' },
|
||||
{ value: 'pizza', label: 'Pizza' },
|
||||
{ value: 'ice-cream', label: 'Dessert' },
|
||||
{ value: 'beer', label: 'Bar' },
|
||||
{ value: 'wine', label: 'Wine' },
|
||||
{ value: 'popcorn', label: 'Cinema' },
|
||||
{ value: 'sandwich', label: 'Snack' },
|
||||
{ value: 'salad', label: 'Salad' },
|
||||
{ value: 'shopping-bag', label: 'Shopping' },
|
||||
{ value: 'shopping-cart', label: 'Groceries' },
|
||||
{ value: 'gift', label: 'Gift' },
|
||||
{ value: 'package', label: 'Package' },
|
||||
{ value: 'shirt', label: 'Clothing' },
|
||||
{ value: 'tag', label: 'Tag' },
|
||||
{ value: 'credit-card', label: 'Card' },
|
||||
{ value: 'wallet', label: 'Wallet' },
|
||||
{ value: 'banknote', label: 'Cash' },
|
||||
{ value: 'coins', label: 'Coins' },
|
||||
{ value: 'piggy-bank', label: 'Savings' },
|
||||
{ value: 'receipt', label: 'Receipt' },
|
||||
{ value: 'landmark', label: 'Bank' },
|
||||
{ value: 'music', label: 'Music' },
|
||||
{ value: 'guitar', label: 'Guitar' },
|
||||
{ value: 'film', label: 'Movie' },
|
||||
{ value: 'theater', label: 'Theater' },
|
||||
{ value: 'ticket', label: 'Ticket' },
|
||||
{ value: 'gamepad-2', label: 'Game' },
|
||||
{ value: 'camera', label: 'Photo' },
|
||||
{ value: 'party-popper', label: 'Party' },
|
||||
{ value: 'users', label: 'Family' },
|
||||
{ value: 'baby', label: 'Baby' },
|
||||
{ value: 'dog', label: 'Dog' },
|
||||
{ value: 'cat', label: 'Cat' },
|
||||
{ value: 'paw-print', label: 'Pet' },
|
||||
{ value: 'wrench', label: 'Repair' },
|
||||
{ value: 'hammer', label: 'Maintenance' },
|
||||
{ value: 'paintbrush', label: 'Decoration' },
|
||||
{ value: 'lightbulb', label: 'Idea' },
|
||||
{ value: 'sofa', label: 'Furniture' },
|
||||
{ value: 'bed', label: 'Bed' },
|
||||
{ value: 'bath', label: 'Bath' },
|
||||
{ value: 'washing-machine', label: 'Laundry' },
|
||||
{ value: 'refrigerator', label: 'Fridge' },
|
||||
{ value: 'star', label: 'Favorite' },
|
||||
{ value: 'flag', label: 'Flag' },
|
||||
{ value: 'target', label: 'Goal' },
|
||||
{ value: 'flame', label: 'Important' },
|
||||
{ value: 'leaf', label: 'Nature' },
|
||||
{ value: 'tree-pine', label: 'Outdoors' },
|
||||
{ value: 'flower', label: 'Flower' },
|
||||
{ value: 'sun', label: 'Day' },
|
||||
{ value: 'moon', label: 'Night' },
|
||||
{ value: 'cloud-sun', label: 'Weather' },
|
||||
];
|
||||
|
||||
const HOUR_HEIGHT = 56; // px pro Stunde in Wochen-/Tagesansicht
|
||||
@@ -176,7 +262,8 @@ function formatDateTime(datetimeStr) {
|
||||
}
|
||||
|
||||
function eventIconName(icon) {
|
||||
return EVENT_ICONS.some((item) => item.value === icon) ? icon : 'calendar';
|
||||
const normalized = EVENT_ICON_ALIASES[icon] || icon;
|
||||
return EVENT_ICONS.some((item) => item.value === normalized) ? normalized : 'calendar';
|
||||
}
|
||||
|
||||
function eventIconHtml(icon, className = 'event-icon') {
|
||||
|
||||
Reference in New Issue
Block a user