fix: Hub components showing incorrect counts in metrics view (v0.6.0-r11)
- Changed installed detection from checking i.installed property - Now checks i.status === 'enabled' or i.local_version exists - Fixes Hub Components showing 0 when collections are installed - Fixes Installed Collections list showing empty 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5cf3240caa
commit
0123ff005c
@ -162,7 +162,10 @@ return view.extend({
|
||||
|
||||
var countInstalled = function(items) {
|
||||
if (!Array.isArray(items)) return 0;
|
||||
return items.filter(function(i) { return i.installed; }).length;
|
||||
// Check for status === 'enabled' or if local_version exists (means installed)
|
||||
return items.filter(function(i) {
|
||||
return i.status === 'enabled' || i.local_version;
|
||||
}).length;
|
||||
};
|
||||
|
||||
return E('div', { 'class': 'cs-stats-grid' }, [
|
||||
@ -198,7 +201,9 @@ return view.extend({
|
||||
]);
|
||||
}
|
||||
|
||||
var installed = collections.filter(function(c) { return c.installed; });
|
||||
var installed = collections.filter(function(c) {
|
||||
return c.status === 'enabled' || c.local_version;
|
||||
});
|
||||
|
||||
var items = installed.slice(0, 15).map(function(c) {
|
||||
return E('div', { 'class': 'cs-metric-item' }, [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user