Files
microdao-daarion/services/swapper-service/cabinet-integration.css
Apple 3de3c8cb36 feat: Add presence heartbeat for Matrix online status
- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
2025-11-27 00:19:40 -08:00

394 lines
5.5 KiB
CSS

/* Swapper Service Cabinet Integration Styles */
.swapper-status-card {
background: white;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 24px;
}
.swapper-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 2px solid #f0f0f0;
}
.swapper-header h3 {
margin: 0;
font-size: 24px;
font-weight: 600;
color: #1a1a1a;
}
.status-badge {
padding: 6px 12px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.status-healthy {
background: #4caf50;
color: white;
}
.status-degraded {
background: #ff9800;
color: white;
}
.status-unhealthy {
background: #f44336;
color: white;
}
.swapper-info {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.info-row {
display: flex;
flex-direction: column;
gap: 4px;
}
.info-row span:first-child {
font-size: 12px;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.info-row span:last-child {
font-size: 18px;
font-weight: 600;
color: #1a1a1a;
}
.active-model-card {
background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
border-radius: 8px;
padding: 20px;
margin-bottom: 24px;
border-left: 4px solid #4caf50;
}
.active-model-card h4 {
margin: 0 0 12px 0;
font-size: 16px;
color: #2e7d32;
}
.model-details {
display: flex;
flex-direction: column;
gap: 12px;
}
.model-name {
font-size: 20px;
font-weight: 600;
color: #1a1a1a;
}
.model-stats {
display: flex;
gap: 24px;
flex-wrap: wrap;
}
.stat {
display: flex;
flex-direction: column;
gap: 4px;
}
.stat-label {
font-size: 12px;
color: #666;
text-transform: uppercase;
}
.stat-value {
font-size: 16px;
font-weight: 600;
color: #1a1a1a;
}
.models-list {
margin-top: 24px;
}
.models-list h4 {
margin: 0 0 16px 0;
font-size: 18px;
color: #1a1a1a;
}
.models-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.models-table thead {
background: #f5f5f5;
border-bottom: 2px solid #e0e0e0;
}
.models-table th {
padding: 12px;
text-align: left;
font-weight: 600;
color: #666;
text-transform: uppercase;
font-size: 11px;
letter-spacing: 0.5px;
}
.models-table td {
padding: 12px;
border-bottom: 1px solid #f0f0f0;
}
.models-table tr:hover {
background: #fafafa;
}
.models-table tr.active {
background: #fff3e0;
border-left: 3px solid #ff9800;
}
.model-type {
padding: 4px 8px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
}
.type-llm {
background: #e3f2fd;
color: #1976d2;
}
.type-code {
background: #f3e5f5;
color: #7b1fa2;
}
.type-vision {
background: #e8f5e9;
color: #388e3c;
}
.type-math {
background: #fff3e0;
color: #f57c00;
}
.btn-load,
.btn-unload {
padding: 6px 12px;
border: none;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.btn-load {
background: #4caf50;
color: white;
}
.btn-load:hover {
background: #45a049;
}
.btn-unload {
background: #f44336;
color: white;
}
.btn-unload:hover {
background: #da190b;
}
.active-indicator {
color: #4caf50;
font-weight: 600;
font-size: 12px;
}
.swapper-footer {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid #f0f0f0;
text-align: center;
}
.swapper-footer small {
color: #999;
font-size: 12px;
}
/* Metrics Summary */
.swapper-metrics {
background: white;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.swapper-metrics h4 {
margin: 0 0 20px 0;
font-size: 18px;
color: #1a1a1a;
}
.metrics-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.metric-card {
background: #f5f5f5;
border-radius: 6px;
padding: 16px;
text-align: center;
}
.metric-label {
font-size: 12px;
color: #666;
text-transform: uppercase;
margin-bottom: 8px;
}
.metric-value {
font-size: 24px;
font-weight: 600;
color: #1a1a1a;
}
.most-used-model {
background: #f5f5f5;
border-radius: 6px;
padding: 16px;
margin-top: 16px;
}
.most-used-model h5 {
margin: 0 0 12px 0;
font-size: 14px;
color: #666;
text-transform: uppercase;
}
.model-info {
display: flex;
justify-content: space-between;
align-items: center;
}
.model-name {
font-weight: 600;
color: #1a1a1a;
}
.model-uptime {
color: #666;
font-size: 14px;
}
/* Page Layout */
.swapper-page {
max-width: 1400px;
margin: 0 auto;
padding: 24px;
}
.page-header {
margin-bottom: 32px;
}
.page-header h2 {
margin: 0 0 8px 0;
font-size: 32px;
color: #1a1a1a;
}
.page-header p {
margin: 0;
color: #666;
font-size: 16px;
}
.swapper-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 24px;
}
.swapper-main {
min-width: 0;
}
.swapper-sidebar {
min-width: 0;
}
/* Loading and Error States */
.swapper-loading,
.swapper-error {
padding: 24px;
text-align: center;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.swapper-error {
color: #f44336;
}
/* Responsive */
@media (max-width: 1024px) {
.swapper-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.swapper-info {
grid-template-columns: 1fr;
}
.metrics-grid {
grid-template-columns: 1fr;
}
.models-table {
font-size: 12px;
}
.models-table th,
.models-table td {
padding: 8px;
}
}