mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-03 12:42:08 +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:
@@ -5,7 +5,8 @@
|
||||
.settings-page,
|
||||
.nodes-page,
|
||||
.groups-page,
|
||||
.api-docs-page {
|
||||
.api-docs-page,
|
||||
.sponsors-page {
|
||||
--bg-page: #e6e8ec;
|
||||
--bg-card: #ffffff;
|
||||
min-height: 100vh;
|
||||
@@ -19,7 +20,8 @@
|
||||
.settings-page.is-dark,
|
||||
.nodes-page.is-dark,
|
||||
.groups-page.is-dark,
|
||||
.api-docs-page.is-dark {
|
||||
.api-docs-page.is-dark,
|
||||
.sponsors-page.is-dark {
|
||||
--bg-page: #1a1b1f;
|
||||
--bg-card: #23252b;
|
||||
}
|
||||
@@ -31,7 +33,8 @@
|
||||
.settings-page.is-dark.is-ultra,
|
||||
.nodes-page.is-dark.is-ultra,
|
||||
.groups-page.is-dark.is-ultra,
|
||||
.api-docs-page.is-dark.is-ultra {
|
||||
.api-docs-page.is-dark.is-ultra,
|
||||
.sponsors-page.is-dark.is-ultra {
|
||||
--bg-page: #000;
|
||||
--bg-card: #101013;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user