feat(panel): add sponsor slots fed from sponsors.sanaei.dev

Monthly sponsor placements need to change without cutting a panel
release. Panels now read 3X/sponsors.json from the MHSanaei/sponsors
repo (GitHub Pages on sponsors.sanaei.dev) and show active sponsors in
four slots: an overview banner, a rotating sidebar card (max three), the
login page and a new Sponsors page that also lists open placements.

An entry shows only while enable is not false and until is in the
future; links must be https and logos are png/webp/jpg by name only.
The list is cached for an hour and the last good copy survives upstream
failures; logos are proxied through /sponsors/logo/:name with failures
cached, so CSP stays 'self' and admin browsers never reach a third
party. Admins can hide a slot for 24h. Under XUI_DEBUG the panel reads
a sibling ../sponsors/3X checkout so edits can be previewed before push.
This commit is contained in:
MHSanaei
2026-09-26 03:31:51 +02:00
parent 89e200ead4
commit fd7b3559bc
47 changed files with 2323 additions and 10 deletions
+22
View File
@@ -120,6 +120,7 @@
"outbounds": "Outbound",
"apiDocs": "Tài liệu API",
"donate": "Quyên góp",
"sponsors": "Nhà tài trợ",
"hosts": "Hosts",
"docs": "Tài liệu",
"openMenu": "Mở menu",
@@ -2256,6 +2257,27 @@
"badTag": "Tag không hợp lệ",
"badVlessRoute": "Nhập một số duy nhất từ 0 đến 65535"
}
},
"sponsors": {
"title": "Nhà tài trợ",
"intro": "Các công ty hỗ trợ phát triển 3X-UI. Liên kết tài trợ mở trong tab mới.",
"become": "Trở thành nhà tài trợ",
"tag": "Tài trợ",
"visit": "Truy cập",
"yourBrand": "Thương hiệu của bạn ở đây",
"yourBrandText": "Đưa công ty bạn đến hàng nghìn quản trị viên máy chủ mở 3X-UI mỗi ngày.",
"placements": "Vị trí hiện có",
"placementDashboard": "Banner tổng quan",
"placementDashboardDesc": "Vị trí cao cấp ở đầu bảng điều khiển, mỗi lần một nhà tài trợ.",
"placementSidebar": "Thẻ thanh bên",
"placementSidebarDesc": "Hiển thị trên mọi trang của panel, luân phiên giữa các nhà tài trợ.",
"placementLogin": "Trang đăng nhập",
"placementLoginDesc": "Quản trị viên thấy mỗi lần đăng nhập.",
"placementPage": "Trang nhà tài trợ",
"placementPageDesc": "Được liệt kê tại đây với logo, mô tả và liên kết.",
"available": "Còn trống",
"takenUntil": "Đã đặt đến {date}",
"activeCount": "{count} đang hoạt động"
}
},
"tgbot": {