mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
- New API endpoint /panel/api/inbounds/userSubscriptions for non-admin users - Redesigned /panel/user with Clash link card (copy button) and Quick Import dropdown (Android/iOS/Desktop with icons) - Added i18n keys for en_US and zh_CN - Bumped version to v1.7.2.5
1.4 KiB
1.4 KiB
2026-04-25 — User Panel: Add Clash Link & Quick Import Button
Summary
Optimized the user panel (/panel/user) to show subscription info and add a one-click import dropdown.
Changes
Backend
- Added
settingServicefield toInboundController - New endpoint
GET /panel/api/inbounds/userSubscriptions— returnssubId,subClashEnable,subClashUrlfor the logged-in user - Route registered before
checkAdminmiddleware so non-admin users can access
Frontend (web/html/user.html)
- Redesigned page with 3 cards:
- User Info — traffic stats, expiry, status (polished)
- Clash Link — shows Clash subscription URL with copy button, or "暂无订阅" if not enabled
- Quick Import — dropdown button with Android/iOS/Desktop options with icons (visual only, functionality TBD)
- Added copy-to-clipboard via
ClipboardManager
i18n
- Added keys to
translate.en_US.tomlandtranslate.zh_CN.toml:clashUrl,quickImport,android,ios,desktop,copied,noSubscription
Files Modified
web/controller/inbound.go— added settingService, getUserSubscriptions methodweb/controller/api.go— registered new routeweb/html/user.html— redesigned user panel pageweb/translation/translate.en_US.toml— new i18n keysweb/translation/translate.zh_CN.toml— new i18n keysconfig/version— bumped to v1.7.2.5