mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 13:44:21 +08:00
- Updated the demo API to support locale-based content rendering. - Refactored the main layout to accommodate language-specific metadata and routing. - Introduced new components for blog and documentation pages, ensuring proper language handling. - Added styles for improved UI consistency across different sections. - Removed deprecated layout files and streamlined the structure for better maintainability.
14 lines
461 B
TypeScript
14 lines
461 B
TypeScript
import { installDemoApi } from "./api";
|
|
|
|
installDemoApi();
|
|
|
|
const params = new URLSearchParams(window.location.search);
|
|
const locale = params.get("locale") === "en-US" ? "en-US" : "zh-CN";
|
|
const theme = params.get("theme") === "default-light" ? "default-light" : "default-dark";
|
|
|
|
document.documentElement.dataset.platform = "macos";
|
|
localStorage.setItem("cursor-byok.locale", locale);
|
|
localStorage.setItem("cursor-byok.theme", theme);
|
|
|
|
void import("../index");
|