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

23 lines
1,020 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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.