mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 03:00:49 +08:00
feat: update document title and favicon in main.tsx, remove isLocalhost check from OAuthPage for cleaner logic, and enhance overall user experience
This commit is contained in:
15
src/main.tsx
15
src/main.tsx
@@ -1,8 +1,23 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import '@/styles/global.scss';
|
||||
import { INLINE_LOGO_JPEG } from '@/assets/logoInline';
|
||||
import App from './App.tsx';
|
||||
|
||||
document.title = 'CLI Proxy API Management Center';
|
||||
|
||||
const faviconEl = document.querySelector<HTMLLinkElement>('link[rel="icon"]');
|
||||
if (faviconEl) {
|
||||
faviconEl.href = INLINE_LOGO_JPEG;
|
||||
faviconEl.type = 'image/jpeg';
|
||||
} else {
|
||||
const newFavicon = document.createElement('link');
|
||||
newFavicon.rel = 'icon';
|
||||
newFavicon.type = 'image/jpeg';
|
||||
newFavicon.href = INLINE_LOGO_JPEG;
|
||||
document.head.appendChild(newFavicon);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
|
||||
Reference in New Issue
Block a user