Skip to content

Commit

Permalink
luci-mod-dashboard: partially invert the black SVG in dark mode
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Donald <[email protected]>
  • Loading branch information
systemcrash committed Nov 30, 2024
1 parent 523fcf4 commit dfd802a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@
border-bottom: 1px solid var(--border-color-medium, rgba(0, 0, 0, 0.1));
}

[data-darkmode="true"] {
/* invert black SVG line drawings in dark mode */
.Dashboard .svgmonotone {
filter: invert(.5);
}
}

/**
* Responsive
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ return baseclass.extend({
'src': L.resource('view/dashboard/icons/' + icon + '.svg'),
'width': 'router' == type ? 64 : 54,
'title': title,
'class': 'middle'
'class': (type == 'router' || icon == 'not-internet') ? 'middle svgmonotone' : 'middle'
}),
E('h3', title)
]));
Expand Down Expand Up @@ -320,7 +320,7 @@ return baseclass.extend({

release: {
title: _('Firmware Version'),
value: boardinfo.release.description
value: boardinfo?.release?.description
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ return baseclass.extend({
'src': L.resource('view/dashboard/icons/devices.svg'),
'width': 55,
'title': this.title,
'class': 'middle'
'class': 'middle svgmonotone'
}),
E('h3', this.title)
]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ return baseclass.extend({
'src': L.resource('view/dashboard/icons/wireless.svg'),
'width': 55,
'title': this.title,
'class': 'middle'
'class': 'middle svgmonotone'
}),
E('h3', this.title)
]));
Expand Down

0 comments on commit dfd802a

Please sign in to comment.