A couple more fast email buttons

This commit is contained in:
2025-08-08 17:47:26 -06:00
parent b76906d366
commit 10ee5f1626
14 changed files with 2399 additions and 60 deletions

View File

@@ -2539,3 +2539,472 @@
border-color: #ddd;
box-shadow: none;
}
/* Shift User Management Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 10000;
}
.modal-content {
background-color: white;
border-radius: var(--border-radius);
padding: 0;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
max-width: 600px;
width: 90%;
max-height: 80vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 25px;
border-bottom: 1px solid #e0e0e0;
background-color: #f8f9fa;
}
.modal-header h3 {
margin: 0;
color: var(--dark-color);
}
.modal-body {
padding: 25px;
overflow-y: auto;
flex: 1;
}
.shift-info {
background-color: #f8f9fa;
padding: 15px;
border-radius: var(--border-radius);
margin-bottom: 20px;
}
.shift-info h4 {
margin: 0 0 8px 0;
color: var(--dark-color);
}
.shift-info p {
margin: 0;
color: #666;
font-size: 14px;
}
.add-user-section {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #e0e0e0;
}
.add-user-section h4 {
margin: 0 0 15px 0;
color: var(--dark-color);
}
.current-volunteers-section h4 {
margin: 0 0 15px 0;
color: var(--dark-color);
}
.volunteer-actions-header {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
/* Users list header styling */
.users-list-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.users-list-header h3 {
margin: 0;
color: var(--dark-color);
}
/* Email modal styling */
.modal-large {
max-width: 800px;
width: 90%;
}
.email-form {
max-width: 100%;
}
.rich-text-toolbar {
display: flex;
gap: 5px;
margin-bottom: 10px;
padding: 10px;
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 4px 4px 0 0;
border-bottom: none;
}
.toolbar-btn {
padding: 8px 12px;
border: 1px solid #ccc;
background: white;
border-radius: 3px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s;
}
.toolbar-btn:hover {
background: #e9ecef;
border-color: #adb5bd;
}
.toolbar-btn:active, .toolbar-btn.active {
background: #007bff;
color: white;
border-color: #007bff;
}
.rich-text-editor {
min-height: 200px;
border: 1px solid #ddd;
padding: 15px;
border-radius: 0 0 4px 4px;
background: white;
font-family: inherit;
font-size: 14px;
line-height: 1.5;
outline: none;
}
.rich-text-editor:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(160, 44, 141, 0.2);
}
.rich-text-editor:empty:before {
content: attr(placeholder);
color: #999;
font-style: italic;
}
.email-preview {
margin-top: 20px;
padding: 15px;
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 4px;
}
.email-preview-content {
background: white;
padding: 20px;
border: 1px solid #ccc;
border-radius: 4px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.preview-header {
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.preview-body {
line-height: 1.6;
}
.email-recipients-info {
background: #e3f2fd;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border-left: 4px solid #2196f3;
}
.email-recipients-info p {
margin: 0;
color: #1565c0;
}
.volunteer-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 15px;
background-color: #f8f9fa;
border-radius: var(--border-radius);
margin-bottom: 8px;
}
.volunteer-info {
flex: 1;
}
.volunteer-name {
font-weight: bold;
color: var(--dark-color);
}
.volunteer-email {
font-size: 13px;
color: #666;
margin-top: 2px;
}
.volunteer-actions {
display: flex;
gap: 8px;
}
.no-volunteers {
text-align: center;
color: #666;
font-style: italic;
padding: 20px;
background-color: #f8f9fa;
border-radius: var(--border-radius);
}
/* Enhance existing shift admin items */
.shift-admin-item {
position: relative;
}
.manage-volunteers-btn {
margin-left: 8px;
}
/* User select dropdown */
#user-select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: var(--border-radius);
font-size: 14px;
background-color: white;
}
#user-select:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}
/* Responsive modal */
@media (max-width: 768px) {
.modal-content {
width: 95%;
max-height: 90vh;
}
.modal-body {
padding: 20px;
}
.form-row {
flex-direction: column;
gap: 10px;
}
.volunteer-item {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.volunteer-actions {
align-self: flex-end;
}
}
/* Email Progress Indicators */
.email-progress-container {
display: none;
margin-top: 20px;
padding: 20px;
background-color: #f8f9fa;
border-radius: var(--border-radius);
border: 1px solid #dee2e6;
}
.email-progress-container.show {
display: block;
}
.progress-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.progress-title {
font-weight: 600;
color: var(--dark-color);
font-size: 16px;
}
.progress-stats {
display: flex;
gap: 15px;
font-size: 14px;
}
.progress-stat {
display: flex;
align-items: center;
gap: 5px;
}
.progress-stat.success {
color: var(--success-color);
}
.progress-stat.error {
color: var(--error-color);
}
.progress-stat.pending {
color: #6c757d;
}
.progress-bar-container {
background-color: #e9ecef;
border-radius: 10px;
height: 20px;
overflow: hidden;
margin-bottom: 15px;
position: relative;
}
.progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--primary-color) 0%, #28a745 100%);
width: 0%;
transition: width 0.3s ease;
position: relative;
}
.progress-bar.complete {
background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}
.progress-bar.error {
background: linear-gradient(90deg, #dc3545 0%, #e74c3c 100%);
}
.progress-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 12px;
font-weight: 600;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.email-status-list {
max-height: 200px;
overflow-y: auto;
border: 1px solid #dee2e6;
border-radius: var(--border-radius);
background-color: white;
}
.email-status-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 15px;
border-bottom: 1px solid #f8f9fa;
font-size: 14px;
}
.email-status-item:last-child {
border-bottom: none;
}
.email-status-recipient {
font-weight: 500;
color: var(--dark-color);
}
.email-status-result {
display: flex;
align-items: center;
gap: 5px;
font-size: 12px;
font-weight: 600;
}
.email-status-result.success {
color: var(--success-color);
}
.email-status-result.error {
color: var(--error-color);
}
.email-status-result.pending {
color: #6c757d;
}
.progress-spinner {
display: inline-block;
width: 12px;
height: 12px;
border: 2px solid #f3f3f3;
border-top: 2px solid #6c757d;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.progress-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 15px;
}
.progress-close-btn {
background: var(--secondary-color);
color: white;
border: none;
padding: 8px 16px;
border-radius: var(--border-radius);
cursor: pointer;
font-size: 14px;
transition: var(--transition);
}
.progress-close-btn:hover {
background: #5a6268;
}