feat: add feature usage UI components (Phase 3)
- Add api.getFeatureUsage() endpoint call - Create UsageBadge component (inline indicators) - Create FeatureUsageOverview component (Settings table) - Add "Kontingente" section to Settings page - Color-coded status (green/yellow/red) - Grouped by category - Shows reset period and next reset date Phase 3: Frontend Display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
d10f605d66
commit
405abc1973
6 files changed
+393
-1
No files matched your search
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* FeatureUsageOverview Styles
|
||||
* Phase 3: Frontend Display
|
||||
*/
|
||||
|
||||
.feature-usage-overview {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.feature-usage-loading,
|
||||
.feature-usage-error,
|
||||
.feature-usage-empty {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
color: var(--text2);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.feature-usage-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.feature-usage-error {
|
||||
background: rgba(216, 90, 48, 0.1);
|
||||
color: var(--danger);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Category grouping */
|
||||
.feature-category {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.feature-category-label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text3);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.feature-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* Feature item */
|
||||
.feature-item {
|
||||
padding: 12px;
|
||||
background: var(--surface2);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.feature-item--exceeded {
|
||||
border-color: var(--danger);
|
||||
background: rgba(216, 90, 48, 0.05);
|
||||
}
|
||||
|
||||
.feature-item--warning {
|
||||
border-color: #d97706;
|
||||
background: rgba(217, 119, 6, 0.05);
|
||||
}
|
||||
|
||||
.feature-item--ok {
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.feature-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.feature-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text1);
|
||||
}
|
||||
|
||||
.feature-usage {
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.usage-unlimited {
|
||||
color: var(--accent);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.usage-boolean {
|
||||
font-weight: 500;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.usage-boolean.enabled {
|
||||
color: var(--accent);
|
||||
background: rgba(29, 158, 117, 0.1);
|
||||
}
|
||||
|
||||
.usage-boolean.disabled {
|
||||
color: var(--text3);
|
||||
background: rgba(136, 135, 128, 0.1);
|
||||
}
|
||||
|
||||
.usage-count {
|
||||
color: var(--text1);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.usage-count strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.feature-item--exceeded .usage-count {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.feature-item--warning .usage-count {
|
||||
color: #d97706;
|
||||
}
|
||||
|
||||
/* Meta info */
|
||||
.feature-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
font-size: 11px;
|
||||
color: var(--text3);
|
||||
}
|
||||
|
||||
.meta-reset,
|
||||
.meta-next-reset {
|
||||
padding: 2px 6px;
|
||||
background: var(--surface);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 640px) {
|
||||
.feature-main {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.feature-usage {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user