refactor: establish standalone application boundary

This commit is contained in:
leefer
2026-08-03 21:42:25 +08:00
parent cc5fb8d73e
commit e1e76cd51e
324 changed files with 63090 additions and 44743 deletions
+12 -2
View File
@@ -1,8 +1,8 @@
window.XiaobaiPageModules.register("rotation", ["rotationView"], {
bind: bindRotationEvents,
enter: ["loadRotation"],
});
/* PRESERVATION-SOURCE-BEGIN app.js:1958-2124 */
async function loadRotationHistory(force = false) {
if (!state.dashboard || state.rotationLoading) return;
const key = `${elements.tradeDate.value}:9`;
@@ -170,4 +170,14 @@ function renderRotationMembers() {
bindStockRows(body);
}
/* PRESERVATION-SOURCE-END app.js:1958-2124 */
function bindRotationEvents() {
document.querySelector("#rotationExportButton").addEventListener("click", exportRotation);
document.querySelectorAll("[data-rotation-order]").forEach((button) => {
button.addEventListener("click", () => {
state.rotationOrder = button.dataset.rotationOrder === "latest" ? "latest" : "oldest";
localStorage.setItem("xiaobaiRotationOrder", state.rotationOrder);
renderRotationHistory();
});
});
}