Explorar o código

🖌️ feat(ui): always show colorful console banner for NewAPI in every environment

Add a branded console log to `web/src/index.js` that prints:

“We ❤ NewAPI  Github: https://github.com/QuantumNous/new-api”

Changes include:
• Remove the `NODE_ENV` guard so the banner appears in both development and production.
• Increase font size to 24 px and keep “NewAPI” in bold green for stronger branding.

This is a purely visual/developer-experience enhancement—no runtime behavior is affected.
t0ng7u hai 7 meses
pai
achega
48afa821e4
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      web/src/index.js

+ 7 - 0
web/src/index.js

@@ -10,6 +10,13 @@ import PageLayout from './components/layout/PageLayout.js';
 import './i18n/i18n.js';
 import './index.css';
 
+// 欢迎信息(二次开发者不准将此移除)
+if (typeof window !== 'undefined') {
+  console.log('%cWe ❤ NewAPI%c Github: https://github.com/QuantumNous/new-api',
+    'color: #10b981; font-weight: bold; font-size: 24px;',
+    'color: inherit; font-size: 14px;');
+}
+
 // initialization
 
 const root = ReactDOM.createRoot(document.getElementById('root'));