fix(fe): resolve eslint any errors and format frontend files

This commit is contained in:
Dushnilin
2026-09-16 16:33:03 +03:00
parent 0f5967e51c
commit e10509033c
7 changed files with 1073 additions and 1055 deletions
@@ -82,7 +82,11 @@ function getUciSectionName(section) {
}
function getUciSectionLabel(section) {
return (section && section.label) || (section && section.name) || getUciSectionName(section);
return (
(section && section.label) ||
(section && section.name) ||
getUciSectionName(section)
);
}
function isOutboundDetourTargetSection(section, currentSectionId) {
@@ -12837,7 +12841,11 @@ function configureSectionSection(sectionRef, options = {}) {
setActionProvidersAvailabilityLoader(options.loadActionProvidersAvailability);
sectionRef.sectiontitle = function (section_id) {
return uci.get(UCI_PACKAGE, section_id, "label") || uci.get(UCI_PACKAGE, section_id, "name") || section_id;
return (
uci.get(UCI_PACKAGE, section_id, "label") ||
uci.get(UCI_PACKAGE, section_id, "name") ||
section_id
);
};
sectionRef.load = function () {
@@ -1384,7 +1384,9 @@ function createComponentsVisibilityWidget(option, section_id) {
}
});
const wrapper = E("div", { id: "components-visibility-widget-" + section_id });
const wrapper = E("div", {
id: "components-visibility-widget-" + section_id,
});
const listEl = E("div", {
style:
"border:1px solid var(--border-color,#dee2e6);border-radius:6px;overflow:hidden;margin-bottom:8px;max-width:560px;background:var(--card-bg,transparent);",
@@ -1549,7 +1551,9 @@ function createSettingsContent(section, capabilities) {
return createComponentsVisibilityWidget(this, section_id);
};
compVisOpt.formvalue = function (section_id) {
const el = document.getElementById("components-visibility-widget-" + section_id);
const el = document.getElementById(
"components-visibility-widget-" + section_id,
);
return el ? JSON.stringify(el._vis) : "";
};
compVisOpt.write = function (_section_id) {};
@@ -78,11 +78,17 @@ function configureGridSection(sectionRef, type, title, addTitle) {
sectionRef.rowcolors = true;
sectionRef.nodescriptions = true;
sectionRef.modaltitle = function (section_id) {
const label = uci.get(UCI_PACKAGE, section_id, "label") || uci.get(UCI_PACKAGE, section_id, "name");
const label =
uci.get(UCI_PACKAGE, section_id, "label") ||
uci.get(UCI_PACKAGE, section_id, "name");
return section_id ? `${title}: ${label || section_id}` : addTitle;
};
sectionRef.sectiontitle = function (section_id) {
return uci.get(UCI_PACKAGE, section_id, "label") || uci.get(UCI_PACKAGE, section_id, "name") || section_id;
return (
uci.get(UCI_PACKAGE, section_id, "label") ||
uci.get(UCI_PACKAGE, section_id, "name") ||
section_id
);
};
sectionRef.renderSectionAdd = function (extra_class) {
return renderSectionAdd(sectionRef, extra_class);