v2land-frontend icon indicating copy to clipboard operation
v2land-frontend copied to clipboard

Display “add Langchao to your home screen” instruction on timeline page footer for iOS devices

Open zehua99 opened this issue 2 years ago • 0 comments

iOS users can add our website to their Home Screen via Safari. We should display an instruction for them to do so at the footer of the timeline page.

Details

  • Add a text button to the end of the timeline page that reads “喜欢浪潮?添加至你的 iPhone[/iPad] 首页”. When users tap on it, an Ant Design modal pop up with the detailed instructions.
  • This should only show up on iOS Safari. One can detect that on front end with navigator.userAgent.match(/(iPod|iPhone|iPad)/) && navigator.userAgent.match(/AppleWebKit/). [source]
  • This should not show up for users who are already visiting our website in the full-screen mode (meaning they have already added Surge.fm to the home screen.) One might be able to detect that on front end with !!document.fullscreenElement. [source]

zehua99 avatar May 09 '22 22:05 zehua99