ccusage-ui
Advanced tools
+1
-1
| { | ||
| "name": "ccusage-ui", | ||
| "version": "0.1.11", | ||
| "version": "0.1.12", | ||
| "main": "server.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
+12
-7
@@ -612,7 +612,7 @@ <!DOCTYPE html> | ||
| // Logic for Monthly Token Projection | ||
| if (currentMetric === 'tokens' && currentView === 'monthly') { | ||
| // Logic for Monthly Projection (tokens and cost) | ||
| if (currentView === 'monthly') { | ||
| const lastIdx = dataSrc.length - 1; | ||
| const lastData = dataSrc[lastIdx]; | ||
| // Only if the last bar is the current month | ||
@@ -622,3 +622,3 @@ if (lastData && lastData.month === currentMonthStr) { | ||
| const daysInMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate(); | ||
| if (day > 0 && day < daysInMonth) { | ||
@@ -628,3 +628,3 @@ const currentVal = datasetData[lastIdx]; | ||
| const remaining = projectedTotal - currentVal; | ||
| // Create Projection Dataset (Zeros for past months, value for current) | ||
@@ -634,2 +634,7 @@ const projectionData = new Array(datasetData.length).fill(0); | ||
| // Pace color matches metric color | ||
| const paceColor = currentMetric === 'cost' | ||
| ? { bg: 'rgba(0, 113, 227, 0.1)', border: '#0071e3' } | ||
| : { bg: 'rgba(52, 199, 89, 0.1)', border: '#34c759' }; | ||
| datasets = [ | ||
@@ -646,4 +651,4 @@ { | ||
| data: projectionData, | ||
| backgroundColor: 'rgba(52, 199, 89, 0.1)', // Very light green | ||
| borderColor: '#34c759', | ||
| backgroundColor: paceColor.bg, | ||
| borderColor: paceColor.border, | ||
| borderWidth: 2, | ||
@@ -650,0 +655,0 @@ borderDash: [5, 5], // Dotted line style |
3061402
0.01%