mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
feat(webui): add mobile friendly file detail and public share view (#359)
* feat(webui): add mobile friendly file detail and public share view * fix(webui): address review feedback for mobile file detail and public share view * fix(webui): use dynamic viewport and flex column layout for mobile file viewer * fix(webui): support iOS WebKit video fullscreen and guard requestFullscreen * fix(webui): compact page indicator and layout in mobile PDF control bar
This commit is contained in:
@@ -228,11 +228,12 @@ export function CompareViewer({
|
||||
)
|
||||
|
||||
const handleToggleFullScreen = useCallback(() => {
|
||||
if (!rootRef.current) return
|
||||
const el = rootRef.current
|
||||
if (!el || typeof el.requestFullscreen !== 'function') return
|
||||
if (!document.fullscreenElement) {
|
||||
rootRef.current.requestFullscreen()
|
||||
} else {
|
||||
document.exitFullscreen()
|
||||
el.requestFullscreen().catch(() => {})
|
||||
} else if (document.exitFullscreen) {
|
||||
document.exitFullscreen().catch(() => {})
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user