Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ccusage-ui

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ccusage-ui - npm Package Compare versions

Comparing version
0.1.16
to
0.1.17
+1
-1
package.json
{
"name": "ccusage-ui",
"version": "0.1.16",
"version": "0.1.17",
"main": "server.js",

@@ -5,0 +5,0 @@ "bin": {

@@ -330,2 +330,5 @@ <!DOCTYPE html>

</div>
<button id="showMoreBtn" onclick="toggleTableRows()" style="margin-top: 16px; padding: 8px 16px; background: #f5f5f7; border: 1px solid #e5e5e7; border-radius: 8px; cursor: pointer; font-size: 13px; color: #0071e3; width: 100%;">
Show More (30 days)
</button>
</div>

@@ -736,8 +739,11 @@

let showAllDays = false;
function renderTable() {
const tbody = document.querySelector('#dataTable tbody');
tbody.innerHTML = '';
// Sort by date descending (newest first) and take top 10
const recent = [...dailyData].sort((a, b) => b.date.localeCompare(a.date)).slice(0, 10);
// Sort by date descending (newest first), show 7 or 30 days
const count = showAllDays ? 30 : 7;
const recent = [...dailyData].sort((a, b) => b.date.localeCompare(a.date)).slice(0, count);
recent.forEach(d => {

@@ -754,4 +760,15 @@ const tr = document.createElement('tr');

});
// Update button text
const btn = document.getElementById('showMoreBtn');
if (btn) {
btn.textContent = showAllDays ? 'Show Less (7 days)' : 'Show More (30 days)';
}
}
function toggleTableRows() {
showAllDays = !showAllDays;
renderTable();
}

@@ -758,0 +775,0 @@ function shareStats() {