""" BreakPilot Studio - Dashboard/Startansicht Modul Funktionen: - Startansicht mit Kacheln zu allen Modulen - Schnellzugriff auf die wichtigsten Funktionen - Uebersicht ueber aktuelle Aktivitaeten """ class DashboardModule: """Modul fuer die Startansicht/Dashboard.""" @staticmethod def get_css() -> str: """CSS fuer das Dashboard-Modul.""" return """ /* ============================================= DASHBOARD MODULE - Startansicht ============================================= */ /* Panel Layout */ .panel-dashboard { display: flex; flex-direction: column; height: 100%; background: var(--bp-bg); overflow-y: auto; } /* Dashboard Header */ .dashboard-header { padding: 32px 40px 24px; background: var(--bp-surface); border-bottom: 1px solid var(--bp-border); } .dashboard-welcome { margin-bottom: 8px; } .dashboard-welcome h1 { font-size: 28px; font-weight: 700; color: var(--bp-text); margin: 0; } .dashboard-welcome p { font-size: 14px; color: var(--bp-text-muted); margin-top: 8px; } /* Dashboard Content */ .dashboard-content { padding: 32px 40px; flex: 1; } /* Section Titles */ .dashboard-section-title { font-size: 14px; font-weight: 600; color: var(--bp-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 20px; } /* Module Cards Grid */ .dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 48px; } /* Module Card */ .dashboard-card { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: 16px; padding: 24px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .dashboard-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15); border-color: var(--bp-primary); } .dashboard-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--bp-primary); opacity: 0; transition: opacity 0.3s; } .dashboard-card:hover::before { opacity: 1; } .dashboard-card-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; background: var(--bp-primary-soft); } .dashboard-card-title { font-size: 18px; font-weight: 600; color: var(--bp-text); margin-bottom: 8px; } .dashboard-card-description { font-size: 13px; color: var(--bp-text-muted); line-height: 1.5; margin-bottom: 16px; } .dashboard-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--bp-border-subtle); } .dashboard-card-action { font-size: 13px; font-weight: 500; color: var(--bp-primary); display: flex; align-items: center; gap: 6px; } .dashboard-card-action::after { content: '→'; transition: transform 0.2s; } .dashboard-card:hover .dashboard-card-action::after { transform: translateX(4px); } .dashboard-card-badge { font-size: 11px; padding: 4px 10px; border-radius: 12px; background: var(--bp-accent-soft); color: var(--bp-accent); font-weight: 500; } .dashboard-card-badge.new { background: rgba(59, 130, 246, 0.1); color: #3b82f6; } .dashboard-card-badge.beta { background: rgba(245, 158, 11, 0.1); color: #f59e0b; } /* Card Color Variants */ .dashboard-card.worksheets .dashboard-card-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; } .dashboard-card.correction .dashboard-card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; } .dashboard-card.jitsi .dashboard-card-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; } .dashboard-card.letters .dashboard-card-icon { background: rgba(236, 72, 153, 0.1); color: #ec4899; } .dashboard-card.messenger .dashboard-card-icon { background: rgba(20, 184, 166, 0.1); color: #14b8a6; } .dashboard-card.klausur-korrektur .dashboard-card-icon { background: rgba(168, 85, 247, 0.1); color: #a855f7; } /* Quick Stats */ .dashboard-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 48px; } .dashboard-stat { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; } .dashboard-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--bp-surface-elevated); } .dashboard-stat-content { flex: 1; } .dashboard-stat-value { font-size: 24px; font-weight: 700; color: var(--bp-text); } .dashboard-stat-label { font-size: 12px; color: var(--bp-text-muted); } /* Recent Activity */ .dashboard-activity { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: 16px; padding: 24px; } .dashboard-activity-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: var(--bp-text); } .dashboard-activity-list { list-style: none; padding: 0; margin: 0; } .dashboard-activity-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--bp-border-subtle); } .dashboard-activity-item:last-child { border-bottom: none; } .dashboard-activity-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: var(--bp-surface-elevated); } .dashboard-activity-content { flex: 1; } .dashboard-activity-text { font-size: 14px; color: var(--bp-text); } .dashboard-activity-time { font-size: 12px; color: var(--bp-text-muted); } /* Empty State */ .dashboard-empty { text-align: center; padding: 48px; color: var(--bp-text-muted); } .dashboard-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; } /* ============================================= AI PROMPT INPUT ============================================= */ .dashboard-ai-prompt { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: 16px; padding: 20px; margin-bottom: 32px; } .dashboard-ai-prompt-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; } .dashboard-ai-prompt-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: linear-gradient(135deg, #6C1B1B, #991b1b); color: white; } .dashboard-ai-prompt-title { font-size: 16px; font-weight: 600; color: var(--bp-text); } .dashboard-ai-prompt-subtitle { font-size: 12px; color: var(--bp-text-muted); } .dashboard-ai-prompt-input-container { display: flex; gap: 12px; align-items: flex-end; } .dashboard-ai-prompt-input { flex: 1; min-height: 44px; max-height: 120px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--bp-border); background: var(--bp-bg); color: var(--bp-text); font-size: 14px; font-family: inherit; resize: none; outline: none; transition: border-color 0.2s; } .dashboard-ai-prompt-input:focus { border-color: var(--bp-primary); } .dashboard-ai-prompt-input::placeholder { color: var(--bp-text-muted); } .dashboard-ai-prompt-send { width: 44px; height: 44px; border-radius: 12px; border: none; background: linear-gradient(135deg, #6C1B1B, #991b1b); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: all 0.2s; } .dashboard-ai-prompt-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(108, 27, 27, 0.4); } .dashboard-ai-prompt-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } .dashboard-ai-prompt-send.loading { animation: pulse 1s infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } /* AI Response */ .dashboard-ai-response { margin-top: 16px; padding: 16px; background: var(--bp-bg); border-radius: 12px; border: 1px solid var(--bp-border-subtle); display: none; } .dashboard-ai-response.active { display: block; } .dashboard-ai-response-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--bp-text-muted); font-size: 12px; } .dashboard-ai-response-text { color: var(--bp-text); font-size: 14px; line-height: 1.6; white-space: pre-wrap; } .dashboard-ai-response-text code { background: var(--bp-surface-elevated); padding: 2px 6px; border-radius: 4px; font-family: monospace; } .dashboard-ai-response-text pre { background: var(--bp-surface-elevated); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 12px 0; } .dashboard-ai-response-text pre code { background: transparent; padding: 0; } /* Model Selector */ .dashboard-ai-model-selector { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bp-border-subtle); } .dashboard-ai-model-label { font-size: 12px; color: var(--bp-text-muted); } .dashboard-ai-model-select { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--bp-border); background: var(--bp-bg); color: var(--bp-text); font-size: 12px; cursor: pointer; } .dashboard-ai-model-select:focus { outline: none; border-color: var(--bp-primary); } """ @staticmethod def get_html() -> str: """HTML fuer das Dashboard-Modul.""" return """
Waehle ein Modul, um zu beginnen
$2')
// Inline code
.replace(/`([^`]+)`/g, '$1')
// Bold
.replace(/\\*\\*([^*]+)\\*\\*/g, '$1')
// Italic
.replace(/\\*([^*]+)\\*/g, '$1')
// Line breaks
.replace(/\\n/g, '