Adjust positioning and set only core component as selected item by default

This commit is contained in:
UncleCode
2025-05-24 20:49:44 +08:00
parent 7665a6832f
commit 1c5e76d51a
2 changed files with 9 additions and 9 deletions

View File

@@ -296,7 +296,9 @@ body {
color: var(--background-color);
}
.component-selection-table th:not(:first-child) {
.component-selection-table th:nth-child(3),
.component-selection-table th:nth-child(4),
.component-selection-table th:nth-child(5) {
text-align: center;
width: 120px;
}
@@ -305,7 +307,9 @@ body {
font-size: 13px;
}
.component-selection-table td:not(:first-child) {
.component-selection-table td:nth-child(3),
.component-selection-table td:nth-child(4),
.component-selection-table td:nth-child(5) {
text-align: center;
}

View File

@@ -64,13 +64,9 @@ document.addEventListener('DOMContentLoaded', () => {
setupActionHandlers();
setupColumnHeaderHandlers();
// Initialize all components as selected with all context types
components.forEach(comp => {
if (!comp.special) {
state.selectedComponents.add(comp.id);
state.selectedContextTypes.set(comp.id, new Set(contextTypes));
}
});
// Initialize only core component as selected with all context types
state.selectedComponents.add('core');
state.selectedContextTypes.set('core', new Set(contextTypes));
updateComponentUI();
});