mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
- Added support for long press to play Live Photos on mobile devices. - Implemented a ref for LivePhoto component to control play and stop actions. - Updated localization files to include new strings for Live Photo playback status. - Enhanced CSS styles to prevent text selection and improve layout consistency. - Refactored ExifPanel and ProgressiveImage components for better integration with Live Photo features. Signed-off-by: Innei <tukon479@gmail.com>
14 lines
406 B
TypeScript
14 lines
406 B
TypeScript
export const isSafari =
|
|
/Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent)
|
|
|
|
export const isMobileDevice = (() => {
|
|
if (typeof window === 'undefined') return false
|
|
return (
|
|
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
navigator.userAgent,
|
|
) ||
|
|
// 现代检测方式:支持触摸且屏幕较小
|
|
'ontouchstart' in window
|
|
)
|
|
})()
|