FEATURE: Use `display: browser` in webmanifest for iOS devices
Since iOS doesn't have a back button and can have issues on log in. See https://twitter.com/firt/status/1021477243909033984
This commit is contained in:
parent
7b412727bb
commit
c8b5e6baae
|
@ -19,10 +19,12 @@ class MetadataController < ApplicationController
|
|||
end
|
||||
file_info = get_file_info(logo)
|
||||
|
||||
display = request.user_agent =~ /iPad|iPhone/ ? 'browser' : 'standalone'
|
||||
|
||||
manifest = {
|
||||
name: SiteSetting.title,
|
||||
short_name: SiteSetting.title,
|
||||
display: 'standalone',
|
||||
display: display,
|
||||
orientation: 'any',
|
||||
start_url: Discourse.base_uri.present? ? "#{Discourse.base_uri}/" : '.',
|
||||
background_color: "##{ColorScheme.hex_for_name('secondary')}",
|
||||
|
|
Loading…
Reference in New Issue