Implement custom reminders with multiple VAlarms per event

Major Features:
- Replace single ReminderType enum with Vec<VAlarm> throughout stack
- Add comprehensive alarm management UI with AlarmList and AddAlarmModal components
- Support relative (15min before, 2hrs after) and absolute (specific date/time) triggers
- Display reminder icons in both month and week calendar views
- RFC 5545 compliant VALARM implementation using calendar-models library

Frontend Changes:
- Create AlarmList component for displaying configured reminders
- Create AddAlarmModal with full alarm configuration (trigger, timing, description)
- Update RemindersTab to use new alarm management interface
- Replace old ReminderType dropdown with modern multi-alarm system
- Add reminder icons to event displays in month/week views
- Fix event title ellipsis behavior in week view with proper CSS constraints

Backend Changes:
- Update all request/response models to use Vec<VAlarm> instead of String
- Remove EventReminder conversion logic, pass VAlarms directly through
- Maintain RFC 5545 compliance for CalDAV server compatibility

UI/UX Improvements:
- Improved basic details tab layout (calendar/repeat side-by-side, All Day checkbox repositioned)
- Simplified reminder system to single notification type for user clarity
- Font Awesome icons throughout instead of emojis for consistency
- Clean modal styling with proper button padding and hover states
- Removed non-standard custom message fields for maximum CalDAV compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-09-21 14:08:31 -04:00
parent cb1bb23132
commit 037b733d48
14 changed files with 879 additions and 215 deletions

View File

@@ -1029,8 +1029,6 @@ body {
font-weight: 500;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Disable pointer events on existing events when creating a new event */
@@ -1150,11 +1148,41 @@ body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center; /* Center the content horizontally */
text-align: center; /* Center text within elements */
pointer-events: auto;
z-index: 5;
position: relative;
}
.week-event .event-title-row {
display: flex;
align-items: center;
justify-content: center; /* Center the title and icon */
gap: 4px;
width: 100%;
max-width: 100%;
}
.week-event .event-title {
flex: 1;
min-width: 0 !important;
max-width: calc(100% - 16px) !important; /* This was needed for ellipsis */
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
font-weight: 600;
margin-bottom: 2px;
display: block !important; /* This was also needed */
text-align: center; /* Center the text within the title element */
}
.week-event .event-reminder-icon {
font-size: 0.6rem;
color: rgba(255, 255, 255, 0.8);
flex-shrink: 0;
}
/* Left-click drag handles */
.resize-handle {
position: absolute;
@@ -1195,13 +1223,7 @@ body {
}
.week-event .event-title {
font-weight: 600;
margin-bottom: 2px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Moved to .week-event .event-header .event-title for better specificity */
.week-event .event-time {
font-size: 0.65rem;
@@ -1570,9 +1592,6 @@ body {
border-radius: 3px;
font-size: 0.7rem;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
transition: var(--standard-transition);
border: 1px solid rgba(255,255,255,0.2);
@@ -1580,6 +1599,10 @@ body {
font-weight: 500;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
position: relative;
display: flex;
align-items: center;
gap: var(--spacing-xs);
min-width: 0;
}
.event-box:hover {
@@ -4429,3 +4452,237 @@ body {
border-color: #138496;
}
/* Alarm List Component */
.alarm-list {
margin-bottom: var(--spacing-lg);
}
.alarm-list h6 {
margin: 0 0 var(--spacing-sm) 0;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-primary);
}
.alarm-list-empty {
text-align: center;
padding: var(--spacing-lg);
background: var(--background-tertiary);
border: 1px dashed var(--border-secondary);
border-radius: var(--border-radius-medium);
color: var(--text-secondary);
}
.alarm-list-empty p {
margin: 0;
}
.alarm-list-empty .text-small {
font-size: 0.8rem;
margin-top: var(--spacing-xs);
}
.alarm-items {
display: flex;
flex-direction: column;
gap: var(--spacing-xs);
}
.alarm-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--spacing-sm) var(--spacing-md);
background: var(--background-secondary);
border: 1px solid var(--border-secondary);
border-radius: var(--border-radius-small);
transition: var(--transition-fast);
}
.alarm-item:hover {
background: var(--background-tertiary);
border-color: var(--border-primary);
}
.alarm-content {
display: flex;
align-items: center;
gap: var(--spacing-sm);
flex: 1;
}
.alarm-icon {
font-size: 1.1rem;
min-width: 24px;
text-align: center;
}
.alarm-description {
font-size: 0.9rem;
color: var(--text-primary);
font-weight: 500;
}
.alarm-actions {
display: flex;
gap: var(--spacing-xs);
}
.alarm-action-btn {
background: none;
border: none;
padding: var(--spacing-xs);
border-radius: var(--border-radius-small);
cursor: pointer;
color: var(--text-secondary);
transition: var(--transition-fast);
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
}
.alarm-action-btn:hover {
background: var(--background-tertiary);
color: var(--text-primary);
}
.alarm-action-btn.edit-btn:hover {
background: var(--info-color);
color: white;
}
.alarm-action-btn.delete-btn:hover {
background: var(--error-color);
color: white;
}
.alarm-action-btn i {
font-size: 0.8rem;
}
/* Alarm Management Header */
.alarm-management-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--spacing-sm);
}
.alarm-management-header h5 {
margin: 0;
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
}
.add-alarm-button {
background: var(--primary-color);
color: white;
border: none;
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--border-radius-small);
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition-fast);
display: flex;
align-items: center;
gap: var(--spacing-xs);
}
.add-alarm-button:hover {
background: #1d4ed8;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.add-alarm-button i {
font-size: 0.8rem;
}
/* Alarm Types Info */
.alarm-types-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: var(--spacing-sm);
margin: var(--spacing-md) 0;
}
.alarm-type-info {
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding: var(--spacing-sm);
background: var(--background-secondary);
border: 1px solid var(--border-secondary);
border-radius: var(--border-radius-small);
transition: var(--transition-fast);
}
.alarm-type-info:hover {
background: var(--background-tertiary);
border-color: var(--border-primary);
}
.alarm-type-info .alarm-icon {
font-size: 1.2rem;
min-width: 24px;
text-align: center;
}
.alarm-type-info div {
display: flex;
flex-direction: column;
gap: 2px;
}
.alarm-type-info strong {
font-size: 0.85rem;
font-weight: 600;
color: var(--text-primary);
}
.alarm-type-info span:not(.alarm-icon) {
font-size: 0.75rem;
color: var(--text-secondary);
}
/* Event Reminder Icon */
.event-reminder-icon {
font-size: 0.7rem;
color: rgba(255, 255, 255, 0.8);
margin-left: auto;
flex-shrink: 0;
}
.event-box .event-title {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.event-content {
display: flex;
align-items: center;
gap: var(--spacing-xs);
width: 100%;
min-width: 0;
}
.event-content .event-title {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.event-content .event-reminder-icon {
margin-left: auto;
flex-shrink: 0;
}