DEV: Allow actions to change the manifest endpoint (#14522)
This commit is contained in:
parent
6141ed31c7
commit
b632ffd802
|
@ -613,6 +613,13 @@ module ApplicationHelper
|
||||||
absolute_url
|
absolute_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def manifest_url
|
||||||
|
# If you want the `manifest_url` to be different for a specific action,
|
||||||
|
# in the action set @manifest_url = X. Originally added for chat to add a
|
||||||
|
# separate manifest
|
||||||
|
@manifest_url || "#{Discourse.base_path}/manifest.webmanifest"
|
||||||
|
end
|
||||||
|
|
||||||
def can_sign_up?
|
def can_sign_up?
|
||||||
SiteSetting.allow_new_registrations &&
|
SiteSetting.allow_new_registrations &&
|
||||||
!SiteSetting.invite_only &&
|
!SiteSetting.invite_only &&
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<%= render_google_tag_manager_head_code %>
|
<%= render_google_tag_manager_head_code %>
|
||||||
<%= render_google_universal_analytics_code %>
|
<%= render_google_universal_analytics_code %>
|
||||||
<link rel="manifest" href="<%= Discourse.base_path %>/manifest.webmanifest" crossorigin="use-credentials">
|
<link id="manifest-link" rel="manifest" href=<%= manifest_url %> crossorigin="use-credentials">
|
||||||
|
|
||||||
<%- if include_ios_native_app_banner? %>
|
<%- if include_ios_native_app_banner? %>
|
||||||
<meta name="apple-itunes-app" content="app-id=<%= SiteSetting.ios_app_id %><%= ios_app_argument %>">
|
<meta name="apple-itunes-app" content="app-id=<%= SiteSetting.ios_app_id %><%= ios_app_argument %>">
|
||||||
|
|
Loading…
Reference in New Issue