feat: Codex 工作区改动迁移(支付管理/用户余额/创作页等)
将 Codex 在工作区累积的改动整体落到 refactor/rust-backend: 支付管理与用户余额页、各创作 surface、website 等。排除 boosapi.db/config.toml 等敏感文件。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
import { SplitText } from "gsap/SplitText";
|
||||
|
||||
gsap.registerPlugin(useGSAP, ScrollTrigger, ScrollToPlugin, SplitText, CustomEase);
|
||||
ScrollTrigger.config({ ignoreMobileResize: true });
|
||||
|
||||
const bossEase = CustomEase.create("boss-ease", "M0,0 C0.18,0.84 0.32,1 1,1");
|
||||
const ANCHOR_NAV_EVENT = "bossai:anchor-nav";
|
||||
@@ -397,10 +398,9 @@ function setupActiveNavigation(root: HTMLElement) {
|
||||
const activeMobileLink = links.find((link) => (
|
||||
link.getAttribute("href") === `#${id}` && Boolean(link.closest(".mobile-nav-rail"))
|
||||
));
|
||||
activeMobileLink?.scrollIntoView({
|
||||
block: "nearest",
|
||||
inline: "center",
|
||||
});
|
||||
if (activeMobileLink) {
|
||||
centerMobileNavLink(activeMobileLink);
|
||||
}
|
||||
};
|
||||
|
||||
const syncActiveFromHash = () => {
|
||||
@@ -438,6 +438,19 @@ function setupActiveNavigation(root: HTMLElement) {
|
||||
};
|
||||
}
|
||||
|
||||
function centerMobileNavLink(link: HTMLAnchorElement) {
|
||||
const rail = link.closest<HTMLElement>(".mobile-nav-rail");
|
||||
if (!rail) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nextScrollLeft = link.offsetLeft - (rail.clientWidth - link.clientWidth) / 2;
|
||||
rail.scrollTo({
|
||||
left: Math.max(0, nextScrollLeft),
|
||||
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
function setupCompactNavigation(root: HTMLElement) {
|
||||
const syncCompactState = () => {
|
||||
root.classList.toggle("is-nav-compact", window.scrollY > 18);
|
||||
|
||||
@@ -3073,3 +3073,4 @@ a {
|
||||
will-change: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user