ui: fallback to window.inner*
* Android 上, avail* 还是屏幕的
This commit is contained in:
@@ -29,9 +29,9 @@ ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.
|
||||
const onResize = () => setTimeout(() => {
|
||||
document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%")
|
||||
// deno-lint-ignore no-window
|
||||
document.body.style.setProperty('--whitesilk-window-width', (isMobileUI() ? window.screen.availWidth : window.innerWidth) + 'px')
|
||||
document.body.style.setProperty('--whitesilk-window-width', window.innerWidth + 'px')
|
||||
// deno-lint-ignore no-window
|
||||
document.body.style.setProperty('--whitesilk-window-height', (isMobileUI() ? window.screen.availHeight : window.innerHeight) + 'px')
|
||||
document.body.style.setProperty('--whitesilk-window-height', window.innerHeight + 'px')
|
||||
}, 100)
|
||||
// deno-lint-ignore no-window no-window-prefix
|
||||
window.addEventListener('resize', onResize)
|
||||
|
||||
Reference in New Issue
Block a user