chore: 迁移工具方法 isMobileUI
This commit is contained in:
@@ -21,7 +21,8 @@ urlParams.get('debug') == 'true' && window.addEventListener('error', ({ message,
|
||||
|
||||
import App from './ui/App.tsx'
|
||||
import AppMobile from './ui/AppMobile.tsx'
|
||||
ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.createElement(urlParams.get('mobile') == 'true' ? AppMobile : App, null))
|
||||
import isMobileUI from "./ui/isMobileUI.ts"
|
||||
ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.createElement(isMobileUI() ? AppMobile : App, null))
|
||||
|
||||
const onResize = () => {
|
||||
document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%")
|
||||
|
||||
3
client/ui/isMobileUI.ts
Normal file
3
client/ui/isMobileUI.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function isMobileUI() {
|
||||
return new URL(location.href).searchParams.get('mobile') == 'true'
|
||||
}
|
||||
Reference in New Issue
Block a user