Skip to content

feat: Customize login page buttons and link colors #9671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/global/use-logo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const useLogo = async () => {
globalStore.themeConfig.loginImage = res.data?.loginImage;
globalStore.themeConfig.loginBgType = res.data?.loginBgType;
globalStore.themeConfig.loginBackground = res.data?.loginBackground;
globalStore.themeConfig.loginBtnLinkColor = res.data?.loginBtnLinkColor;
globalStore.themeConfig.favicon = res.data.favicon;
}

Expand Down
7 changes: 5 additions & 2 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ const message = {
apiKeyHelper: 'API key is used for third-party applications to access the API.',
ipWhiteList: 'IP allowlist',
ipWhiteListEgs: 'One per line. For example,\n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: 'IPs within the allowlist can access the API.',
ipWhiteListHelper: 'IPs within the allowlist can access the API,0.0.0.0/0 (all IPv4), ::/0 (all IPv6)',
apiKeyValidityTime: 'Validity period of interface key',
apiKeyValidityTimeEgs: 'Validity period of interface key (in minutes)',
apiKeyValidityTimeHelper:
Expand Down Expand Up @@ -2868,7 +2868,7 @@ const message = {
apiInterfaceHelper:
'Supports panel API interface access (this feature needs to be enabled for the panel app)',
apiInterfaceHelper1:
"Panel app access requires adding the visitor to the whitelist; for non-fixed IPs, it's recommended to add 0.0.0.0/0",
"Panel app access requires adding the visitor to the whitelist; for non-fixed IPs, it's recommended to add 0.0.0.0/0 (all IPv4), ::/0 (all IPv6)",
qrCodeExpired: 'Refresh time',
apiLeakageHelper: 'Do not disclose the QR code. Ensure it is used only in trusted environments.',
},
Expand Down Expand Up @@ -3287,6 +3287,9 @@ const message = {
loginBgColorHelper: 'Displayed as background color on the login page',
image: 'Image',
bgColor: 'Background Color',
loginGroup: 'Login Page',
loginBtnLinkColor: 'Button/Link Color',
loginBtnLinkColorHelper: 'Will be displayed as the button/link color on the login page',
},
helper: {
wafTitle1: 'Interception Map',
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ const message = {
apiKeyHelper: 'APIキーは、サードパーティアプリケーションに使用されてAPIにアクセスします。',
ipWhiteList: 'IP AllowList',
ipWhiteListEgs: '1行に1つ。たとえば、 n172.161.10.111 n172.161.10.0/24',
ipWhiteListHelper: 'AllowList内のIPSはAPIにアクセスできます',
ipWhiteListHelper: 'AllowList内のIPSはAPIにアクセスできます、0.0.0.0/0(すべての IPv4)、::/0(すべての IPv6)',
apiKeyReset: 'インターフェイスキーリセット',
apiKeyResetHelper: '関連するキーサービスは無効になります。サービスに新しいキーを追加してください',
confDockerProxy: 'Dockerプロキシを構成します',
Expand Down Expand Up @@ -2746,7 +2746,7 @@ const message = {
apiInterfaceHelper:
'パネルAPIインターフェースアクセスをサポート(この機能はパネルアプリで有効にする必要があります)',
apiInterfaceHelper1:
'パネルアプリのアクセスには訪問者をホワイトリストに追加する必要があります。固定IPでない場合、0.0.0.0/0 を追加することをお勧めします',
'パネルアプリのアクセスには訪問者をホワイトリストに追加する必要があります。固定IPでない場合、0.0.0.0/0(すべての IPv4)、::/0(すべての IPv6)を追加することをお勧めします',
qrCodeExpired: 'リフレッシュ時間',
apiLeakageHelper: 'QRコードを漏洩しないでください。信頼できる環境でのみ使用してください。',
},
Expand Down Expand Up @@ -3156,6 +3156,9 @@ const message = {
loginBgColorHelper: 'ログインページの背景色として表示されます',
image: '画像',
bgColor: '背景色',
loginGroup: 'ログインページ',
loginBtnLinkColor: 'ボタン/リンクの色',
loginBtnLinkColorHelper: 'ログインページに表示されるボタン/リンクの色になります',
},
helper: {
wafTitle1: 'インターセプションマップ',
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ const message = {
apiKeyHelper: 'API 키는 서드파티 애플리케이션이 API 에 접근하는 데 사용됩니다.',
ipWhiteList: 'IP 허용 목록',
ipWhiteListEgs: '한 줄에 하나씩 입력하십시오. 예:\n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: '허용 목록에 있는 IP만 API 에 접근할 수 있습니다.',
ipWhiteListHelper: '허용 목록에 있는 IP만 API 에 접근할 수 있습니다. 0.0.0.0/0(모든 IPv4), ::/0(모든 IPv6)',
apiKeyValidityTime: '인터페이스 키 유효 기간',
apiKeyValidityTimeEgs: '인터페이스 키 유효 기간 (분 단위)',
apiKeyValidityTimeHelper:
Expand Down Expand Up @@ -2699,7 +2699,7 @@ const message = {
apiStatusHelper: '패널 APP 는 API 인터페이스 기능을 활성화해야 합니다',
apiInterfaceHelper: '패널 API 인터페이스 액세스를 지원합니다(패널 앱에서 이 기능을 활성화해야 합니다)',
apiInterfaceHelper1:
'패널 앱의 액세스에는 방문자를 화이트리스트에 추가해야 하며, 고정 IP가 아닌 경우 0.0.0.0/0 을 추가하는 것이 좋습니다',
'패널 앱의 액세스에는 방문자를 화이트리스트에 추가해야 하며, 고정 IP가 아닌 경우 0.0.0.0/0(모든 IPv4), ::/0(모든 IPv6) 을 추가하는 것이 좋습니다',
qrCodeExpired: '새로 고침 시간',
apiLeakageHelper: 'QR 코드를 누출하지 마십시오. 신뢰할 수 있는 환경에서만 사용하십시오.',
},
Expand Down Expand Up @@ -3104,6 +3104,9 @@ const message = {
loginBgColorHelper: '로그인 페이지의 배경 색상으로 표시됩니다',
image: '이미지',
bgColor: '배경 색상',
loginGroup: '로그인 페이지',
loginBtnLinkColor: '버튼/링크 색상',
loginBtnLinkColorHelper: '로그인 페이지의 버튼/링크 색상으로 표시됩니다',
},
helper: {
wafTitle1: '차단 지도',
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ const message = {
apiKeyHelper: 'Kunci API digunakan untuk aplikasi pihak ketiga mengakses API.',
ipWhiteList: 'Senarai putih IP',
ipWhiteListEgs: 'Satu per baris. Contoh,\n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: 'IP dalam senarai putih boleh mengakses API.',
ipWhiteListHelper: 'IP dalam senarai putih boleh mengakses API, 0.0.0.0/0 (semua IPv4), ::/0 (semua IPv6)',
apiKeyValidityTime: 'Tempoh sah kunci antara muka',
apiKeyValidityTimeEgs: 'Tempoh sah kunci antara muka (dalam minit)',
apiKeyValidityTimeHelper:
Expand Down Expand Up @@ -2807,7 +2807,7 @@ const message = {
apiInterfaceHelper:
'Menyokong akses antara muka API panel (fungsi ini perlu diaktifkan untuk aplikasi panel)',
apiInterfaceHelper1:
'Akses aplikasi panel memerlukan penambahan pelawat ke dalam senarai putih, untuk IP yang tidak tetap, disyorkan untuk menambah 0.0.0.0/0',
'Akses aplikasi panel memerlukan penambahan pelawat ke dalam senarai putih, untuk IP yang tidak tetap, disyorkan untuk menambah 0.0.0.0/0(semua IPv4), ::/0 (semua IPv6)',
qrCodeExpired: 'Masa penyegaran',
apiLeakageHelper: 'Jangan dedahkan kod QR. Pastikan ia hanya digunakan di persekitaran yang dipercayai.',
},
Expand Down Expand Up @@ -3227,6 +3227,9 @@ const message = {
loginBgColorHelper: 'Akan dipaparkan sebagai warna latar belakang halaman log masuk',
image: 'Imej',
bgColor: 'Warna Latar',
loginGroup: 'Halaman Log Masuk',
loginBtnLinkColor: 'Warna Butang/Pautan',
loginBtnLinkColorHelper: 'Akan dipaparkan sebagai warna butang/pautan di halaman log masuk',
},
helper: {
wafTitle1: 'Peta Pencegahan',
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,8 @@ const message = {
apiKeyHelper: 'A chave da API é usada para aplicativos de terceiros acessarem a API.',
ipWhiteList: 'Lista de IPs permitidos',
ipWhiteListEgs: 'Um por linha. Exemplo: \n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: 'IPs na lista de permitidos podem acessar a API.',
ipWhiteListHelper:
'IPs na lista de permitidos podem acessar a API, 0.0.0.0/0 (todos os IPv4), ::/0 (todos os IPv6)',
apiKeyReset: 'Redefinir chave da interface',
apiKeyResetHelper:
'O serviço associado à chave se tornará inválido. Por favor, adicione uma nova chave ao serviço',
Expand Down Expand Up @@ -2809,7 +2810,7 @@ const message = {
apiInterfaceHelper:
'Suporta acesso à interface de API do painel (essa funcionalidade precisa ser ativada no aplicativo do painel)',
apiInterfaceHelper1:
'O acesso ao aplicativo do painel requer que o visitante seja adicionado à lista de permissões; para IPs não fixos, recomenda-se adicionar 0.0.0.0/0',
'O acesso ao aplicativo do painel requer que o visitante seja adicionado à lista de permissões; para IPs não fixos, recomenda-se adicionar 0.0.0.0/0(todos os IPv4), ::/0 (todos os IPv6)',
qrCodeExpired: 'Tempo de atualização',
apiLeakageHelper: 'Não revele o QR code. Garanta que ele seja usado apenas em ambientes confiáveis.',
},
Expand Down Expand Up @@ -3234,6 +3235,9 @@ const message = {
loginBgColorHelper: 'Será exibida como cor de fundo na página de login',
image: 'Imagem',
bgColor: 'Cor de Fundo',
loginGroup: 'Página de login',
loginBtnLinkColor: 'Cor do botão/link',
loginBtnLinkColorHelper: 'Será exibido como a cor do botão/link na página de login',
},
helper: {
wafTitle1: 'Mapa de Interceptação',
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,8 @@ const message = {
apiKeyHelper: 'API ключ используется сторонними приложениями для доступа к API.',
ipWhiteList: 'Белый список IP',
ipWhiteListEgs: 'По одному в строке. Например,\n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: 'IP-адреса из белого списка могут получить доступ к API.',
ipWhiteListHelper:
'IP-адреса из белого списка могут получить доступ к API, 0.0.0.0/0 (все IPv4), ::/0 (все IPv6)',
apiKeyValidityTime: 'Срок действия ключа интерфейса',
apiKeyValidityTimeEgs: 'Срок действия ключа интерфейса (в единицах)',
apiKeyValidityTimeHelper:
Expand Down Expand Up @@ -2801,7 +2802,7 @@ const message = {
apiInterfaceHelper:
'Поддержка доступа к API-интерфейсу панели (эта функция должна быть включена для мобильного приложения панели)',
apiInterfaceHelper1:
'Для доступа к приложению панели необходимо добавить посетителя в белый список. Для нестабильных IP рекомендуется добавить 0.0.0.0/0',
'Для доступа к приложению панели необходимо добавить посетителя в белый список. Для нестабильных IP рекомендуется добавить 0.0.0.0/0 (все IPv4), ::/0 (все IPv6)',
qrCodeExpired: 'Время обновления',
apiLeakageHelper: 'Не раскрывайте QR-код. Убедитесь, что он используется только в доверенных средах.',
},
Expand Down Expand Up @@ -3219,6 +3220,9 @@ const message = {
loginBgColorHelper: 'Будет отображаться как цвет фона страницы входа',
image: 'Изображение',
bgColor: 'Цвет фона',
loginGroup: 'Страница входа',
loginBtnLinkColor: 'Цвет кнопки/ссылки',
loginBtnLinkColorHelper: 'Будет отображаться как цвет кнопки/ссылки на странице входа',
},
helper: {
wafTitle1: 'Карта Перехватов',
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/lang/modules/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ const message = {
apiKeyHelper: 'API anahtarı, üçüncü taraf uygulamaların API’ye erişmesi için kullanılır.',
ipWhiteList: 'IP izin listesi',
ipWhiteListEgs: 'Her satıra bir tane. Örneğin,\n172.161.10.111\n172.161.10.0/24',
ipWhiteListHelper: 'İzin listesindeki IP’ler API’ye erişebilir.',
ipWhiteListHelper: 'İzin listesindeki IP’ler API’ye erişebilir, 0.0.0.0/0 (tüm IPv4), ::/0 (tüm IPv6)',
apiKeyValidityTime: 'Arayüz anahtarının geçerlilik süresi',
apiKeyValidityTimeEgs: 'Arayüz anahtarının geçerlilik süresi (dakika cinsinden)',
apiKeyValidityTimeHelper:
Expand Down Expand Up @@ -2905,7 +2905,7 @@ const message = {
apiInterfaceHelper:
'Panel API arayüz erişimini destekler (bu özellik, panel uygulaması için etkinleştirilmelidir)',
apiInterfaceHelper1:
'Panel uygulama erişimi, ziyaretçinin beyaz listeye eklenmesini gerektirir; sabit olmayan IP’ler için 0.0.0.0/0 eklenmesi önerilir',
'Panel uygulama erişimi, ziyaretçinin beyaz listeye eklenmesini gerektirir; sabit olmayan IP’ler için 0.0.0.0/0(tüm IPv4), ::/0 (tüm IPv6) eklenmesi önerilir',
qrCodeExpired: 'Yenileme zamanı',
apiLeakageHelper: 'QR kodunu paylaşmayın. Yalnızca güvenilir ortamlarda kullanıldığından emin olun.',
},
Expand Down Expand Up @@ -3321,6 +3321,9 @@ const message = {
loginBgColorHelper: 'Giriş sayfasında arka plan rengi olarak gösterilir',
image: 'Görüntü',
bgColor: 'Arka Plan Rengi',
loginGroup: 'Giriş Sayfası',
loginBtnLinkColor: 'Buton/Bağlantı Rengi',
loginBtnLinkColorHelper: 'Giriş sayfasındaki buton/bağlantı rengi olarak gösterilecektir',
},
helper: {
wafTitle1: 'Engelleme Haritası',
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,8 @@ const message = {
apiKeyHelper: '接口密钥用於外部應用訪問 API 接口',
ipWhiteList: 'IP白名單',
ipWhiteListEgs: '當存在多個 IP 時,需要換行顯示,例:\n172.16.10.111 \n172.16.10.0/24',
ipWhiteListHelper: '必需在 IP 白名單清單中的 IP 才能訪問面板 API 接口',
ipWhiteListHelper:
'必需在 IP 白名單清單中的 IP 才能訪問面板 API 接口,0.0.0.0/0(所有 IPv4),::/0(所有 IPv6)',
apiKeyValidityTime: '介面金鑰有效期',
apiKeyValidityTimeEgs: '介面金鑰有效期(組織分)',
apiKeyValidityTimeHelper: '介面時間戳記到請求時的當前時間戳之間有效(組織分),設定為0時,不做時間戳記校驗',
Expand Down Expand Up @@ -2673,7 +2674,8 @@ const message = {
qrCode: '二維碼',
apiStatusHelper: '面板 APP 需要開啟 API 接口功能',
apiInterfaceHelper: '支持面板 API 接口訪問功能(面板 APP 需要開啟該功能)',
apiInterfaceHelper1: '面板 APP 訪問需將訪問者添加至白名單,非固定 IP 建議添加 0.0.0.0/0',
apiInterfaceHelper1:
'面板 APP 訪問需將訪問者添加至白名單,非固定 IP 建議添加 0.0.0.0/0(所有 IPv4),::/0(所有 IPv6)',
qrCodeExpired: '刷新時間',
apiLeakageHelper: '請勿洩露二維碼,確保僅在受信任的環境中使用',
},
Expand Down Expand Up @@ -3067,6 +3069,9 @@ const message = {
loginBgColorHelper: '將會顯示在登入頁面背景顏色',
image: '圖片',
bgColor: '背景色',
loginGroup: '登入頁面',
loginBtnLinkColor: '按鈕顏色',
loginBtnLinkColorHelper: '將顯示為登入頁面上的按鈕顏色',
},
helper: {
wafTitle1: '攔截地圖',
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,8 @@ const message = {
apiKeyHelper: '接口密钥用于外部应用访问 API 接口',
ipWhiteList: 'IP 白名单',
ipWhiteListEgs: '当存在多个 IP 时,需要换行显示,例: \n172.16.10.111 \n172.16.10.0/24',
ipWhiteListHelper: '必需在 IP 白名单列表中的 IP 才能访问面板 API 接口',
ipWhiteListHelper:
'必需在 IP 白名单列表中的 IP 才能访问面板 API 接口,0.0.0.0/0(所有 IPv4),::/0(所有 IPv6)',
apiKeyValidityTime: '接口密钥有效期',
apiKeyValidityTimeEgs: '接口密钥有效期(单位分)',
apiKeyValidityTimeHelper: '接口时间戳到请求时的当前时间戳之间有效(单位分),设置为 0 时,不做时间戳校验',
Expand Down Expand Up @@ -3037,6 +3038,9 @@ const message = {
loginBgColorHelper: '将会显示在登录页面背景颜色',
image: '图片',
bgColor: '背景色',
loginGroup: '登录页',
loginBtnLinkColor: '按钮/链接颜色',
loginBtnLinkColorHelper: '将会显示在登录页面按钮/链接颜色',
},
helper: {
wafTitle1: '拦截地图',
Expand Down Expand Up @@ -3404,7 +3408,8 @@ const message = {
qrCode: '二维码',
apiStatusHelper: '面板 APP 需要开启 API 接口功能',
apiInterfaceHelper: '支持面板 API 接口访问功能(面板 APP 需要开启该功能)',
apiInterfaceHelper1: '面板 APP 访问需将访问者添加至白名单,非固定 IP 建议添加 0.0.0.0/0',
apiInterfaceHelper1:
'面板 APP 访问需将访问者添加至白名单,非固定 IP 建议添加 0.0.0.0/0(所有 IPv4),::/0(所有 IPv6)',
qrCodeExpired: '刷新时间',
apiLeakageHelper: '请勿泄露二维码,确保仅在受信任的环境中使用',
},
Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/interface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface ThemeConfigProp {
loginImage: string;
loginBgType: string;
loginBackground: string;
loginBtnLinkColor: string;
themeColor: string;
}

Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/modules/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const GlobalStore = defineStore({
loginImage: '',
loginBackground: '',
loginBgType: '',
loginBtnLinkColor: '',
},
openMenuTabs: false,
isFullScreen: false,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/element-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ html.dark {
--panel-logs-bg-color: var(--panel-main-bg-color-9);
--panel-alert-bg-color: var(--panel-main-bg-color-10);

--el-menu-item-bg-color: var(--panel-main-bg-color-10);
--el-menu-item-bg-color: var(--panel-main-bg-color-9);
--el-menu-item-bg-color-active: var(--panel-main-bg-color-8);
--el-menu-hover-bg-color: var(--panel-main-bg-color-8);
--el-menu-text-color: var(--panel-main-bg-color-2);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/utils/xpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export async function getXpackSettingForTheme() {
globalStore.themeConfig.loginImage = res2.data?.loginImage;
globalStore.themeConfig.loginBgType = res2.data?.loginBgType;
globalStore.themeConfig.loginBackground = res2.data?.loginBackground;
globalStore.themeConfig.loginBtnLinkColor = res2.data?.loginBtnLinkColor;
globalStore.themeConfig.themeColor = res2.data?.themeColor;
if (res2.data?.theme) {
globalStore.themeConfig.theme = res2.data.theme;
Expand Down
Loading
Loading