mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-01-15 10:09:34 +00:00
- 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.
1,020 B
1,020 B
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:embedforassets,html/*, andtranslation/*(seeweb/web.go). - Dev mode (
XUI_DEBUG=true) loads templates from disk (web/html) and serves assets from disk (web/assets).
- Production uses
i18n / translations
- Translation files live in
web/translation/*.tomland 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=truesoweb/htmlandweb/assetsresolve correctly. - Some functionality depends on an Xray binary in
XUI_BIN_FOLDER(defaultbin/); the panel can run without Xray but Xray-related features will fail until it’s available.