theming, date, time localisation, additional features, seeding initial cleanup
This commit is contained in:
@@ -65,27 +65,27 @@ export function AnnouncementsModal({ isOpen, onClose, unreadCount, onCountUpdate
|
||||
const getPriorityIcon = (priority: string) => {
|
||||
switch (priority) {
|
||||
case 'high':
|
||||
return <AlertCircle className='h-4 w-4 text-red-500' />;
|
||||
return <AlertCircle className='h-4 w-4 text-destructive' />;
|
||||
case 'medium':
|
||||
return <AlertTriangle className='h-4 w-4 text-yellow-500' />;
|
||||
return <AlertTriangle className='h-4 w-4 text-amber-500 dark:text-amber-400' />;
|
||||
default:
|
||||
return <Info className='h-4 w-4 text-blue-500' />;
|
||||
return <Info className='h-4 w-4 text-primary' />;
|
||||
}
|
||||
};
|
||||
|
||||
const getPriorityColor = (priority: string) => {
|
||||
switch (priority) {
|
||||
case 'high':
|
||||
return 'border-red-200 bg-red-50';
|
||||
return 'border-destructive/20 bg-destructive/5';
|
||||
case 'medium':
|
||||
return 'border-yellow-200 bg-yellow-50';
|
||||
return 'border-amber-500/20 bg-amber-500/5 dark:border-amber-400/20 dark:bg-amber-400/5';
|
||||
default:
|
||||
return 'border-blue-200 bg-blue-50';
|
||||
return 'border-primary/20 bg-primary/5';
|
||||
}
|
||||
};
|
||||
|
||||
const formatDate = (dateStr: string) => {
|
||||
return new Date(dateStr).toLocaleDateString('en-US', {
|
||||
return new Date(dateStr).toLocaleDateString('en-IE', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
@@ -112,12 +112,12 @@ export function AnnouncementsModal({ isOpen, onClose, unreadCount, onCountUpdate
|
||||
<div className='flex-1 overflow-y-auto'>
|
||||
{loading ? (
|
||||
<div className='flex items-center justify-center py-8'>
|
||||
<div className='animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900'></div>
|
||||
<p className='ml-2'>Loading announcements...</p>
|
||||
<div className='animate-spin rounded-full h-8 w-8 border-b-2 border-foreground'></div>
|
||||
<p className='ml-2 text-foreground'>Loading announcements...</p>
|
||||
</div>
|
||||
) : announcements.length === 0 ? (
|
||||
<div className='text-center py-8 text-gray-500'>
|
||||
<Bell className='h-12 w-12 mx-auto mb-4 text-gray-300' />
|
||||
<div className='text-center py-8 text-muted-foreground'>
|
||||
<Bell className='h-12 w-12 mx-auto mb-4 text-muted-foreground/50' />
|
||||
<p>No announcements at this time</p>
|
||||
</div>
|
||||
) : (
|
||||
@@ -137,8 +137,10 @@ export function AnnouncementsModal({ isOpen, onClose, unreadCount, onCountUpdate
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className='pt-0'>
|
||||
<p className='text-sm text-gray-700 mb-2'>{announcement.content}</p>
|
||||
<p className='text-xs text-gray-500'>{formatDate(announcement.createdAt)}</p>
|
||||
<p className='text-sm text-foreground mb-2'>{announcement.content}</p>
|
||||
<p className='text-xs text-muted-foreground'>
|
||||
{formatDate(announcement.createdAt)}
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user