fix: parental control global network block, luci save&apply reload, and fuzzer localization
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1081,7 +1081,8 @@ function createParentalContent(section) {
|
||||
),
|
||||
);
|
||||
o.modalonly = true;
|
||||
o.default = "all";
|
||||
o.default = "domains";
|
||||
o.value("domains", _("Blocked Sites (Only block domains specified below)"));
|
||||
o.value("all", _("All Internet (Complete internet cutoff)"));
|
||||
o.value("sections", _("Specific Sections (Select sections below)"));
|
||||
|
||||
|
||||
@@ -433,58 +433,7 @@ const EntryPoint = {
|
||||
return form.Map.prototype.load.call(self);
|
||||
});
|
||||
};
|
||||
tachyonMap.handleSaveApply = function (ev, mode) {
|
||||
const refreshUiState = function () {
|
||||
main.TachyonShellMethods.getUiState()
|
||||
.then((response) => {
|
||||
if (
|
||||
response?.success &&
|
||||
typeof main.applyUiStateToStore === "function"
|
||||
) {
|
||||
main.applyUiStateToStore(response.data);
|
||||
}
|
||||
})
|
||||
.catch(() => null);
|
||||
};
|
||||
|
||||
if (main.store && typeof main.store.set === "function") {
|
||||
const servicesInfoWidget = main.store.get().servicesInfoWidget;
|
||||
main.store.set({
|
||||
servicesInfoWidget: {
|
||||
...servicesInfoWidget,
|
||||
data: {
|
||||
...servicesInfoWidget.data,
|
||||
tachyonStatus: "reloading",
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return this.handleSave(ev)
|
||||
.then(() => ui.changes.apply(mode == "0"))
|
||||
.then((result) => {
|
||||
if (
|
||||
main.TachyonShellMethods &&
|
||||
typeof main.TachyonShellMethods.serviceActionStart === "function"
|
||||
) {
|
||||
return main.TachyonShellMethods.serviceActionStart("reload")
|
||||
.then(() => {
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
})
|
||||
.catch(() => {
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
})
|
||||
.catch((error) => {
|
||||
refreshUiState();
|
||||
throw error;
|
||||
});
|
||||
};
|
||||
tachyonMap.handleSaveApply = EntryPoint.handleSaveApply;
|
||||
|
||||
const rawTabOrder = uci.get(UCI_PACKAGE, "settings", "tab_order");
|
||||
const savedOrder = Array.isArray(rawTabOrder)
|
||||
@@ -758,6 +707,66 @@ const EntryPoint = {
|
||||
|
||||
return rendered;
|
||||
},
|
||||
|
||||
handleSaveApply: function (ev, mode) {
|
||||
const refreshUiState = function () {
|
||||
if (
|
||||
main.TachyonShellMethods &&
|
||||
typeof main.TachyonShellMethods.getUiState === "function"
|
||||
) {
|
||||
main.TachyonShellMethods.getUiState()
|
||||
.then((response) => {
|
||||
if (
|
||||
response?.success &&
|
||||
typeof main.applyUiStateToStore === "function"
|
||||
) {
|
||||
main.applyUiStateToStore(response.data);
|
||||
}
|
||||
})
|
||||
.catch(() => null);
|
||||
}
|
||||
};
|
||||
|
||||
if (main.store && typeof main.store.set === "function") {
|
||||
const servicesInfoWidget = main.store.get()?.servicesInfoWidget;
|
||||
if (servicesInfoWidget) {
|
||||
main.store.set({
|
||||
servicesInfoWidget: {
|
||||
...servicesInfoWidget,
|
||||
data: {
|
||||
...servicesInfoWidget.data,
|
||||
tachyonStatus: "reloading",
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return this.handleSave(ev)
|
||||
.then(() => ui.changes.apply(mode == "0"))
|
||||
.then((result) => {
|
||||
if (
|
||||
main.TachyonShellMethods &&
|
||||
typeof main.TachyonShellMethods.serviceActionStart === "function"
|
||||
) {
|
||||
return main.TachyonShellMethods.serviceActionStart("reload")
|
||||
.then(() => {
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
})
|
||||
.catch(() => {
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
window.setTimeout(refreshUiState, 500);
|
||||
return result;
|
||||
})
|
||||
.catch((error) => {
|
||||
refreshUiState();
|
||||
throw error;
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
return view.extend(EntryPoint);
|
||||
|
||||
Reference in New Issue
Block a user