diff --git a/app/components/settings/event-logs/EventLogsTab.tsx b/app/components/settings/event-logs/EventLogsTab.tsx index d89c548d..b513d811 100644 --- a/app/components/settings/event-logs/EventLogsTab.tsx +++ b/app/components/settings/event-logs/EventLogsTab.tsx @@ -4,6 +4,7 @@ import { Switch } from '~/components/ui/Switch'; import { logStore, type LogEntry } from '~/lib/stores/logs'; import { useStore } from '@nanostores/react'; import { classNames } from '~/utils/classNames'; +import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; interface SelectOption { value: string; @@ -301,104 +302,104 @@ export function EventLogsTab() { {/* Filters */}
{/* Level Filter */} -
- + > +
+ {selectedLevelOption?.label || 'All Levels'} + + + - {showLevelFilter && ( -
-
- {logLevelOptions.map((option) => ( - - ))} -
-
- )} -
+ + + {logLevelOptions.map((option) => ( + setSelectedLevel(option.value)} + > +
+
+
+ {option.label} + + ))} + + +
{/* Category Filter */} -
- + > +
+ {selectedCategoryOption?.label || 'All Categories'} + + + - {showCategoryFilter && ( -
-
- {logCategoryOptions.map((option) => ( - - ))} -
-
- )} -
+ + + {logCategoryOptions.map((option) => ( + setSelectedCategory(option.value)} + > +
+
+
+ {option.label} + + ))} + + +
{/* Logs Container */} diff --git a/app/components/settings/notifications/NotificationsTab.tsx b/app/components/settings/notifications/NotificationsTab.tsx index 9ce36549..08143cad 100644 --- a/app/components/settings/notifications/NotificationsTab.tsx +++ b/app/components/settings/notifications/NotificationsTab.tsx @@ -125,15 +125,15 @@ const NotificationsTab = () => { return details.message ?

{details.message}

: null; }; - const filterOptions: { id: FilterType; label: string; icon: string }[] = [ - { id: 'all', label: 'All Notifications', icon: 'i-ph:bell' }, - { id: 'system', label: 'System', icon: 'i-ph:gear' }, - { id: 'update', label: 'Updates', icon: 'i-ph:arrow-circle-up' }, - { id: 'error', label: 'Errors', icon: 'i-ph:warning-circle' }, - { id: 'warning', label: 'Warnings', icon: 'i-ph:warning' }, - { id: 'info', label: 'Information', icon: 'i-ph:info' }, - { id: 'provider', label: 'Providers', icon: 'i-ph:robot' }, - { id: 'network', label: 'Network', icon: 'i-ph:wifi-high' }, + const filterOptions: { id: FilterType; label: string; icon: string; color: string }[] = [ + { id: 'all', label: 'All Notifications', icon: 'i-ph:bell', color: '#9333ea' }, + { id: 'system', label: 'System', icon: 'i-ph:gear', color: '#6b7280' }, + { id: 'update', label: 'Updates', icon: 'i-ph:arrow-circle-up', color: '#9333ea' }, + { id: 'error', label: 'Errors', icon: 'i-ph:warning-circle', color: '#ef4444' }, + { id: 'warning', label: 'Warnings', icon: 'i-ph:warning', color: '#f59e0b' }, + { id: 'info', label: 'Information', icon: 'i-ph:info', color: '#3b82f6' }, + { id: 'provider', label: 'Providers', icon: 'i-ph:robot', color: '#10b981' }, + { id: 'network', label: 'Network', icon: 'i-ph:wifi-high', color: '#6366f1' }, ]; return ( @@ -153,10 +153,8 @@ const NotificationsTab = () => { )} > opt.id === filter)?.icon || 'i-ph:funnel', - 'text-lg text-gray-500 dark:text-gray-400', - )} + className={classNames('text-lg', filterOptions.find((opt) => opt.id === filter)?.icon || 'i-ph:funnel')} + style={{ color: filterOptions.find((opt) => opt.id === filter)?.color }} /> {filterOptions.find((opt) => opt.id === filter)?.label || 'Filter Notifications'} @@ -165,7 +163,7 @@ const NotificationsTab = () => { { >
{option.label}