refactor: establish standalone application boundary
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user