3x-ui/web/AGENTS.md
vladon 74267cd320 fix: enhance Telegram bot's long-polling management
- Improved handling of concurrent starts by stopping existing long-polling loops.
- Implemented mutex for thread-safe access to shared state variables.
- Updated OnReceive method to prevent multiple executions.
- Enhanced Stop method for better resource cleanup and state management.
2025-12-26 00:49:01 +03:00

1,020 B
Raw Blame History

AGENTS.md (web/)

web/ is the Go web panel (Gin) and includes embedded templates/assets for production.

Templates & assets

  • Templates: web/html/** (server-rendered HTML templates containing Vue/Ant Design UI markup).
  • Static assets: web/assets/** (vendored JS/CSS/libs).
  • Embedding:
    • Production uses //go:embed for assets, html/*, and translation/* (see web/web.go).
    • Dev mode (XUI_DEBUG=true) loads templates from disk (web/html) and serves assets from disk (web/assets).

i18n / translations

  • Translation files live in web/translation/*.toml and are embedded.
  • When adding UI strings, update the relevant TOML(s) and keep keys consistent across languages.

Common dev pitfalls

  • Run from repo root when XUI_DEBUG=true so web/html and web/assets resolve correctly.
  • Some functionality depends on an Xray binary in XUI_BIN_FOLDER (default bin/); the panel can run without Xray but Xray-related features will fail until its available.