WeltAn_X on X: the source updates come from sits in Settings › Network and sharing, though it is an update setting. Update source (Automatic, usemagpie.ai only, GitHub only) is now the row right under Download source in Settings › About, with Automatic updates, Update channel and the other update rows. Same menu, same updateSource value, same save; the Network page loses the row. App updates' proxy stays on Network, beside the other proxies. No new tab, label or line. It goes under Download source rather than above it: placed above, the About page scrolled at update-mirror's 420px window, and Use a mirror… then slid Download source 2-10px. That slide is on main too in a shorter window (#6739), not fixed here. Docs: the Mirrors page (en, zh, ja) and reference.md say About › Update source; llms-full.txt and the search indexes are regenerated. Run at60ebaea03+ this change, on mica; rebased since onto02f1cee79, which touches only internal/plugin, internal/provider, internal/cli and a subsystem page: - gofmt -l internal: clean. go test -tags nogui ./internal/gui/...: ok (TestCoreScriptBudget included). node --test site/*.test.mjs: 132/132. - GUI, chromium and webkit: settings-update-source (en, zh, zh-TW, ja, de at 1100 and 420px; now opens About, the row is under Download source, none on Network), update-mirror, update-channel, update-auto, update-restart, settings-search, settings-sections, settings-places, settings-general, settings-update-proxy, settings-plugin-proxy, about-log, about-notices, about-report, about-website, cli-path, uninstall-settings, click-scroll, i18n-keys, i18n-en-no-cjk: all ok. - Reds that fail the same on origin/main2e1c0a377, run there on mote: old-webkit's two (#6030, #5919), settings-hints ja/de 420px (#6107), settings-lines-wrap chromium de 440px (#6353). - The new settings-update-source is red 20/20 on origin/main2e1c0a377. Not tried: the real app; the GUI tests stand in for it.
21 lines
1.0 KiB
JavaScript
21 lines
1.0 KiB
JavaScript
// Settings › About's Update source (RootSir and Sakugar_ on X): where an
|
||
// update is read and downloaded from, one menu button as the language's is.
|
||
// app.js imports this when the page is drawn, so it weighs nothing on the
|
||
// core. "" is automatic; site never goes to GitHub, github never to
|
||
// usemagpie.ai.
|
||
window.updateSourcePick = function updateSourcePick(s, keep) {
|
||
const names = { "": "Automatic", site: "usemagpie.ai only", github: "GitHub only" };
|
||
const b = $("#updateSourcePick");
|
||
const chosen = s.updateSource in names ? s.updateSource : "";
|
||
b.dataset.value = chosen;
|
||
b.setAttribute("aria-label", t("Update source"));
|
||
b.replaceChildren(el("span", "", t(names[chosen])), svg(CHEV, 11, 1.6));
|
||
b.onclick = (e) => {
|
||
e.stopPropagation();
|
||
if (b.classList.contains("open")) return closeProtoMenu();
|
||
openProtoMenu(b, Object.entries(names).map(([v, name]) => ({ v, name, note: "" })), chosen, (v) => {
|
||
if (v !== chosen) savePrefs({ ...keep, updateSource: v });
|
||
}, "Update source", "sess-menu", "right");
|
||
};
|
||
};
|