Files
hr-performance-system/components/ErrorModal.css
donald c24634f4b7 Initial commit: HR Performance System
- Database schema with 31 tables for 4-card system
- LLM API integration (Gemini, DeepSeek, OpenAI)
- Error handling system with modal component
- Connection test UI for LLM services
- Environment configuration files
- Complete database documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:34:13 +08:00

258 lines
4.0 KiB
CSS

/* 錯誤彈窗樣式 */
.error-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.error-modal-overlay.visible {
opacity: 1;
pointer-events: all;
}
.error-modal {
background: white;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 500px;
max-height: 80vh;
overflow: hidden;
display: flex;
flex-direction: column;
transform: scale(0.9);
opacity: 0;
transition: all 0.3s ease;
}
.error-modal.visible {
transform: scale(1);
opacity: 1;
}
/* Header */
.error-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
border-bottom: 1px solid #e5e7eb;
}
.error-modal-title {
display: flex;
align-items: center;
gap: 12px;
}
.error-icon {
font-size: 24px;
}
.error-modal-title h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #1f2937;
}
.error-modal-close {
background: none;
border: none;
font-size: 24px;
color: #6b7280;
cursor: pointer;
padding: 4px 8px;
line-height: 1;
border-radius: 4px;
transition: all 0.2s;
}
.error-modal-close:hover {
background-color: #f3f4f6;
color: #1f2937;
}
/* Body */
.error-modal-body {
padding: 20px;
overflow-y: auto;
flex: 1;
}
.error-message {
margin: 0 0 16px 0;
font-size: 15px;
color: #374151;
line-height: 1.6;
}
.error-metadata {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 16px;
font-size: 13px;
color: #6b7280;
}
.error-code {
padding: 4px 8px;
background-color: #fee2e2;
color: #991b1b;
border-radius: 4px;
font-weight: 500;
}
.error-time {
padding: 4px 8px;
background-color: #f3f4f6;
color: #4b5563;
border-radius: 4px;
}
.error-details {
margin-top: 16px;
padding: 12px;
background-color: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 6px;
}
.error-details summary {
cursor: pointer;
font-weight: 500;
color: #4b5563;
user-select: none;
}
.error-details summary:hover {
color: #1f2937;
}
.error-details pre {
margin-top: 12px;
padding: 12px;
background-color: #1f2937;
color: #f9fafb;
border-radius: 4px;
font-size: 12px;
overflow-x: auto;
}
.error-path {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid #e5e7eb;
}
.error-path small {
color: #6b7280;
font-size: 12px;
}
/* Footer */
.error-modal-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-top: 1px solid #e5e7eb;
background-color: #f9fafb;
}
.error-countdown {
font-size: 13px;
color: #6b7280;
}
.error-modal-button {
padding: 8px 20px;
background-color: #3b82f6;
color: white;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.error-modal-button:hover {
background-color: #2563eb;
}
.error-modal-button:active {
transform: scale(0.98);
}
/* Severity Colors */
.error-modal.error .error-modal-title h3 {
color: #dc2626;
}
.error-modal.warning .error-modal-title h3 {
color: #ea580c;
}
.error-modal.warning .error-modal-button {
background-color: #ea580c;
}
.error-modal.warning .error-modal-button:hover {
background-color: #c2410c;
}
.error-modal.info .error-modal-title h3 {
color: #0284c7;
}
.error-modal.info .error-modal-button {
background-color: #0284c7;
}
.error-modal.info .error-modal-button:hover {
background-color: #0369a1;
}
/* 響應式設計 */
@media (max-width: 768px) {
.error-modal {
width: 95%;
max-height: 90vh;
}
.error-modal-header {
padding: 16px;
}
.error-modal-body {
padding: 16px;
}
.error-modal-footer {
flex-direction: column;
gap: 12px;
align-items: stretch;
}
.error-countdown {
text-align: center;
}
.error-modal-button {
width: 100%;
}
}