diff --git a/scripts/js/groups-lists.js b/scripts/js/groups-lists.js index 39482894..6d850102 100644 --- a/scripts/js/groups-lists.js +++ b/scripts/js/groups-lists.js @@ -50,31 +50,31 @@ function format(data) { ? Math.trunc(data.invalid_domains).toLocaleString() : "N/A"; - return ` - - + return `
Type:  ${setTypeIcon(data.type)}${data.type}list
+ + - - + + - - + + - - + + - - + + - - + + - - + + - +
Type:${setTypeIcon(data.type)} ${data.type}list
Health status:  ${statusText}
Health status:${statusText}
Added to Pi-hole:  
Added to Pi-hole: ${utils.datetimeRelative(data.date_added)} (${dateAddedISO})
Database entry last modified:  
Database entry last modified: ${utils.datetimeRelative(data.date_modified)} (${dateModifiedISO})
Content last updated on:  ${dateUpdated}
Content last updated on:${dateUpdated}
Number of entries:  ${numberOfEntries}
Number of entries:${numberOfEntries}
Number of non-domains:  ${nonDomains}
Number of non-domains:${nonDomains}
Database ID:${data.id}
`; @@ -177,16 +177,23 @@ function initTable() { dataSrc: "lists", type: "GET", }, + autoWidth: false, order: [[0, "asc"]], columns: [ { data: "id", visible: false }, - { data: null, visible: true, orderable: false, width: "2rem" }, - { data: "status", searchable: false, class: "details-control" }, - { data: "type", searchable: false, class: "details-control" }, + { data: null, visible: true, orderable: false, width: "2.4rem" }, + { + data: "status", + searchable: false, + class: "details-control", + width: "2.4rem", + type: "html", + }, + { data: "type", searchable: false, class: "details-control", width: "2.4rem", type: "html" }, { data: "address" }, { data: "enabled", searchable: false }, { data: "comment" }, - { data: "groups", searchable: false }, + { data: "groups", searchable: false, type: "html" }, { data: null, width: "22px", orderable: false }, ], columnDefs: [ diff --git a/style/pi-hole.css b/style/pi-hole.css index 6f0f0acf..a8ab0e3b 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -1255,13 +1255,17 @@ div.dt-buttons { table.dataTable tbody td.select-checkbox, table.dataTable tbody th.select-checkbox { position: relative; + min-width: 2.4rem; } table.dataTable tbody td.select-checkbox::before, table.dataTable tbody th.select-checkbox::before { content: ""; position: absolute; + display: block; top: 12px; + left: 50%; + transform: translate(-50%, 0); width: 16px; height: 16px; border: 2px solid currentColor; @@ -1280,12 +1284,12 @@ table.dataTable tr.selected th.select-checkbox::after { content: ""; position: absolute; top: 14px; - left: 12px; + left: 50%; width: 6px; - height: 10px; + height: 9px; border-bottom: 2px solid currentColor; border-right: 2px solid currentColor; - transform: rotate(45deg); + transform: translate(-3px, 0) rotate(45deg); } /* Datatables selected row bgcolor */ @@ -1307,15 +1311,6 @@ table.table.dataTable.table-striped > tbody > tr.selected:nth-of-type(2n + 1) > font-size: 17px; } -/* TODO: this should probably be done using BS5 classes and a better HTML markup */ -/* Keep the two single-icon columns (list status and list type) on the - subscribed-lists table the same width, and centre their icons. */ -#listsTable td.details-control, -#listsTable th.details-control { - min-width: 3.5rem; - text-align: center; -} - /* TODO: this should probably be done using BS5 classes and newer datatables settings */ /* DataTables renders its pager as a Bootstrap `.pagination` but no longer right-aligns it, so it drifted to the middle of its column. Restore the