mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 08:18:35 +08:00
18 lines
508 B
Ruby
18 lines
508 B
Ruby
|
class ManifestJsonController < ApplicationController
|
||
|
layout false
|
||
|
skip_before_filter :preload_json, :check_xhr, :redirect_to_login_if_required
|
||
|
|
||
|
def index
|
||
|
manifest = {
|
||
|
short_name: SiteSetting.title,
|
||
|
display: 'standalone',
|
||
|
orientation: 'portrait',
|
||
|
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
|
||
|
end
|
||
|
end
|