mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
settings: show updates at top if one available
This commit is contained in:
@@ -1043,6 +1043,21 @@ export class settingsList {
|
||||
icon.classList.add("button", "~urge");
|
||||
icon.innerHTML = `<i class="ri-download-line" title="${window.lang.strings("update")}"></i>`;
|
||||
icon.onclick = () => window.updater.checkForUpdates(window.modals.updateInfo.show);
|
||||
// Put us first
|
||||
if ("order" in this._settings && this._settings.order) {
|
||||
let i = -1;
|
||||
for (let j = 0; j < this._settings.order.length; j++) {
|
||||
const member = this._settings.order[j];
|
||||
if ("section" in member && member.section == "updates") {
|
||||
i = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i != -1) {
|
||||
this._settings.order.splice(i, 1);
|
||||
this._settings.order.unshift({ section: "updates" });
|
||||
}
|
||||
}
|
||||
}
|
||||
this.addSection(section.section, section, icon);
|
||||
} else if (section.section == "matrix" && !window.matrixEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user