ui: upgrade to FontAwesome 6, harden burger-menu shim

- Drop FA4 font files and font-awesome.min.css.
- Ship FA6 webfonts (solid, regular, brands) and fa6.min.css.
- io-indicator: use FA6 names (fa-circle-plus / -minus / -exclamation).
- static/js/ui.js: no-op the legacy side-menu click handler when menu
  links are not present (V09 chrome removes them) so the Settings tab
  no longer logs 'cannot set properties of null'.
This commit is contained in:
2026-05-03 14:07:06 +02:00
parent 8224ab8f97
commit b9e880448e
14 changed files with 37 additions and 27 deletions

View File

@@ -49,14 +49,17 @@ module.exports = {
methods: {
get_io_state_class: function(active, state) {
if (typeof active == "undefined" || typeof state == "undefined") {
return "fa-exclamation-triangle warn";
return "fa-triangle-exclamation warn";
}
// Tristated: render as the regular (outline) circle to
// distinguish from active/inactive solid circles. Adding
// `far` switches to the FA6 regular family.
if (state == 2) {
return "fa-circle-o";
return "far fa-circle";
}
const icon = state ? "fa-plus-circle" : "fa-minus-circle";
const icon = state ? "fa-circle-plus" : "fa-circle-minus";
return `${icon} ${active ? "active" : "inactive"}`;
},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2,5 +2,5 @@
font-family: 'Audiowide';
font-style: normal;
font-weight: 400;
src: local('Audiowide'), local('Audiowide-Regular'), url(http://fonts.gstatic.com/s/audiowide/v4/8XtYtNKEyyZh481XVWfVOqCWcynf_cDxXwCLxiixG1c.ttf) format('truetype');
src: local('Audiowide'), local('Audiowide-Regular'), url(https://fonts.gstatic.com/s/audiowide/v4/8XtYtNKEyyZh481XVWfVOqCWcynf_cDxXwCLxiixG1c.ttf) format('truetype');
}

9
src/static/css/fa6.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,35 +1,37 @@
// V09 redesign: the legacy side menu was removed. Keep this file
// shipped in case anything still references it, but no-op the click
// handler that used to wire up the burger menu so it does not throw
// "Cannot set properties of null" on the Settings tab.
(function (window, document) {
var menuLink = document.getElementById("menuLink");
if (!menuLink) {
return;
}
var layout = document.getElementById('layout'),
menu = document.getElementById('menu'),
menuLink = document.getElementById('menuLink');
var layout = document.getElementById("layout");
var menu = document.getElementById("menu");
function toggleClass(element, className) {
var classes = element.className.split(/\s+/),
length = classes.length,
i = 0;
for(; i < length; i++) {
if (!element) return;
var classes = element.className.split(/\s+/);
var i;
for (i = 0; i < classes.length; i++) {
if (classes[i] === className) {
classes.splice(i, 1);
break;
}
}
// The className is not found
if (length === classes.length) {
if (i === classes.length) {
classes.push(className);
}
element.className = classes.join(' ');
element.className = classes.join(" ");
}
menuLink.onclick = function (e) {
var active = 'active';
var active = "active";
e.preventDefault();
toggleClass(layout, active);
toggleClass(menu, active);
toggleClass(menuLink, active);
};
}(this, this.document));