mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-15 17:45:03 +03:00
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:
@@ -121,6 +121,7 @@
|
||||
"outbounds": "Outbounds",
|
||||
"apiDocs": "API Docs",
|
||||
"donate": "Donate",
|
||||
"sponsors": "Sponsors",
|
||||
"docs": "Documentation",
|
||||
"openMenu": "Open menu",
|
||||
"pinSidebar": "Pin sidebar",
|
||||
@@ -2256,6 +2257,27 @@
|
||||
},
|
||||
"defaultOutbound": "Default Outbound",
|
||||
"defaultOutboundDesc": "Traffic that does not match any routing rule uses this outbound (Xray uses the first outbound in the list)."
|
||||
},
|
||||
"sponsors": {
|
||||
"title": "Sponsors",
|
||||
"intro": "Companies that support 3X-UI development. Sponsored links open in a new tab.",
|
||||
"become": "Become a sponsor",
|
||||
"tag": "Sponsor",
|
||||
"visit": "Visit",
|
||||
"yourBrand": "Your brand here",
|
||||
"yourBrandText": "Put your company in front of thousands of server admins who open 3X-UI every day.",
|
||||
"placements": "Available placements",
|
||||
"placementDashboard": "Overview banner",
|
||||
"placementDashboardDesc": "Premium spot at the top of the dashboard, one sponsor at a time.",
|
||||
"placementSidebar": "Sidebar card",
|
||||
"placementSidebarDesc": "Shown on every panel page, rotating between sponsors.",
|
||||
"placementLogin": "Login page",
|
||||
"placementLoginDesc": "Seen by the admin at every sign-in.",
|
||||
"placementPage": "Sponsors page",
|
||||
"placementPageDesc": "Listed here with logo, description and link.",
|
||||
"available": "Available",
|
||||
"takenUntil": "Taken until {date}",
|
||||
"activeCount": "{count} active"
|
||||
}
|
||||
},
|
||||
"tgbot": {
|
||||
|
||||
Reference in New Issue
Block a user