fix: Make collection checkboxes visible with inline styles (v0.6.0-r7)
Fix invisible checkboxes in Step 3 collections: - Add explicit inline styles to checkbox inputs - Set width: 18px, height: 18px with cursor: pointer - Add 'for' attribute to label for better click handling - Replace null rendering with empty element E([]) - Fixes "null" text appearing on screen Issue: Collection items not selectable, checkboxes invisible Cause: Checkboxes may be hidden by browser default styles Solution: Add explicit inline styles and proper label association Frontend Changes: - htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js - Add inline styles to checkbox inputs - Add 'for' attribute linking label to checkbox - Replace ': null' with ': E([])' to avoid "null" text Checkboxes now have: - Explicit dimensions (18x18px) - Proper cursor styling - Label association via 'for' attribute - No more "null" text rendering Version: 0.6.0-7 🤖 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
be3a367e18
commit
439bab6361
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-crowdsec-dashboard
|
||||
PKG_VERSION:=0.6.0
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
PKG_ARCH:=all
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
@ -249,15 +249,17 @@ return view.extend({
|
||||
|
||||
E('div', { 'class': 'collections-list' },
|
||||
recommendedCollections.map(L.bind(function(collection) {
|
||||
var checkboxId = 'collection-' + collection.name.replace('/', '-');
|
||||
var checkbox = E('input', {
|
||||
'type': 'checkbox',
|
||||
'id': 'collection-' + collection.name.replace('/', '-'),
|
||||
'checked': collection.preselected,
|
||||
'data-collection': collection.name
|
||||
'id': checkboxId,
|
||||
'checked': collection.preselected ? 'checked' : null,
|
||||
'data-collection': collection.name,
|
||||
'style': 'width: 18px; height: 18px; cursor: pointer; margin: 0;'
|
||||
});
|
||||
|
||||
return E('div', { 'class': 'collection-item' }, [
|
||||
E('label', {}, [
|
||||
E('label', { 'for': checkboxId, 'style': 'display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0;' }, [
|
||||
checkbox,
|
||||
E('div', { 'class': 'collection-info' }, [
|
||||
E('strong', {}, collection.name),
|
||||
@ -274,7 +276,7 @@ return view.extend({
|
||||
E('div', { 'class': 'spinning' }),
|
||||
E('p', {}, _('Installing collections...')),
|
||||
E('div', { 'id': 'install-status' }, this.wizardData.installStatus || '')
|
||||
]) : null,
|
||||
]) : E([]),
|
||||
|
||||
// Navigation
|
||||
E('div', { 'class': 'wizard-nav' }, [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user