mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6952] feat(tgbot): port Get one, the links header and setup guides to the screen bot #6536
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6536
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6952
Author: @pcxzs
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:feat/tgbot-customer-port📝 Commits (3)
2dbda6bfeat(tgbot): let customers get one link, see what is left, and read setup guidesa420bccdocs: document the bot's Get one, setup guides and links header7dba6ddfix(tgbot): name VMess links in Get one by their remark📊 Changes
29 files changed (+997 additions, -67 deletions)
View changed files
📝
docs/content/docs/en/operations/telegram-bot.mdx(+4 -2)📝
docs/content/docs/fa/operations/telegram-bot.mdx(+4 -2)📝
docs/content/docs/ru/operations/telegram-bot.mdx(+4 -2)📝
docs/content/docs/zh/operations/telegram-bot.mdx(+4 -2)➕
internal/web/service/tgbot/screen_client_guide.go(+63 -0)➕
internal/web/service/tgbot/screen_client_guide_test.go(+82 -0)➕
internal/web/service/tgbot/screen_client_header.go(+52 -0)➕
internal/web/service/tgbot/screen_client_header_test.go(+88 -0)➕
internal/web/service/tgbot/screen_client_one_link.go(+133 -0)➕
internal/web/service/tgbot/screen_client_one_link_test.go(+204 -0)📝
internal/web/service/tgbot/screen_client_views.go(+8 -2)📝
internal/web/service/tgbot/screen_views.go(+11 -4)📝
internal/web/service/tgbot/screens_art.go(+1 -1)📝
internal/web/service/tgbot/tgbot_client_links_authz_test.go(+23 -0)📝
internal/web/service/tgbot/tgbot_router.go(+50 -10)📝
internal/web/translation/ar-EG.json(+19 -3)📝
internal/web/translation/en-US.json(+19 -3)📝
internal/web/translation/es-ES.json(+19 -3)📝
internal/web/translation/fa-IR.json(+19 -3)📝
internal/web/translation/id-ID.json(+19 -3)...and 9 more files
📄 Description
Summary
Ports the three customer screens #6760 did not have, as invited when #6697 was closed, rebuilt on the screen model: Get one, an expiry and traffic-left header on the link pages, and per-platform setup guides.
This PR first also carried two fixes: customers could not page long screens, and a dead client-card button. #7033 landed the same fixes, so they are dropped here and the branch is rebased onto it.
Why
What changes
Three commits, meant to be read one at a time:
feat(tgbot): Get one, header and guides.http,httpsandtg://.docs: the Telegram bot page, in en, fa, ru and zh.fix(tgbot): VMess links in Get one, from the review below. A VMess link keeps its remark aspsinside its base64 body, with no#fragment, so the picker listed every VMess inbound as "1. VMESS", "2. VMESS". It now reads that remark through the panel's ownlink.ParseLink.The code changes stay inside
internal/web/service/tgbot/. The only other files are the 14 locale files (16 new keys, all translated, Slovak included) and the four docs pages.Security
client_one_linkandlink_onename a client, so they go through the existing per-client branch and itsclientOwnedByTgUsercheck.link_onecarries the link's index after the email. The index is split off before the check, so it is never read as part of the client name.TestEveryClientLinkActionRefusesAForeignClientcovers all five link actions./startand/id, and groups are still ignored.Type of change
Areas affected
How was this tested?
screen_client_one_link_test.godrives Get one through real share links from the subscription provider: the picker, the chosen link and its QR, the single-link shortcut, a stale index, and VMess links named by their remark.screen_client_header_test.gocovers the header: a dated config, an overspent one, an unlimited one, one that counts from first use, and an email escaped exactly once (I18nBotescapes its parameters sincefac90093).screen_client_guide_test.gocovers the guides.go test -shuffle=on ./...(with-raceon the bot package),golangci-lintv2.15.0 (the CI pin) and the i18n dead-keys test all pass. The one exception isTestNextWeeklyRenewal_RepeatedMidnightininternal/web/service, a DST case that fails the same way onmainin my time zone. Every commit builds and passes on its own.Screenshots / recordings
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.