diff --git a/admin-web/static/app.js b/admin-web/static/app.js index 690aa3e..39f07d7 100644 --- a/admin-web/static/app.js +++ b/admin-web/static/app.js @@ -605,6 +605,9 @@ function setPage(page, push = true) { if (push && location.hash !== `#${next}`) { history.replaceState(null, "", `#${next}`); } + requestAnimationFrame(() => { + window.scrollTo({ top: 0, behavior: push ? "smooth" : "auto" }); + }); if (next === "traffic") { refreshStats().catch((err) => toast(err.message)); } else if (next === "keys") { diff --git a/admin-web/static/index.html b/admin-web/static/index.html index bd8fc8d..e187059 100644 --- a/admin-web/static/index.html +++ b/admin-web/static/index.html @@ -400,6 +400,6 @@ - + diff --git a/admin-web/static/styles.css b/admin-web/static/styles.css index d734b4c..1587edf 100644 --- a/admin-web/static/styles.css +++ b/admin-web/static/styles.css @@ -935,6 +935,7 @@ td small { .user-traffic-panel { margin-top: 18px; + scroll-margin-top: 112px; } .status-control {