mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
Merge pull request #4099 from xfalcox/add-to-homescreen-android
Better Add to Homescreen on Android
This commit is contained in:
commit
2a5b339be8
@ -1,13 +1,15 @@
|
||||
class ManifestJsonController < ApplicationController
|
||||
layout false
|
||||
skip_before_filter :preload_json, :check_xhr
|
||||
skip_before_filter :preload_json, :check_xhr, :redirect_to_login_if_required
|
||||
|
||||
def index
|
||||
manifest = {
|
||||
short_name: SiteSetting.title,
|
||||
display: 'browser',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
start_url: "#{Discourse.base_uri}/"
|
||||
start_url: "#{Discourse.base_uri}/",
|
||||
background_color: "##{ColorScheme.hex_for_name('secondary')}",
|
||||
theme_color: "##{ColorScheme.hex_for_name('header_background')}"
|
||||
}
|
||||
|
||||
render json: manifest.to_json
|
||||
|
Loading…
Reference in New Issue
Block a user