FIX: Include subfolder base_path in web app manifest shortcuts (#10878)
This commit is contained in:
parent
8fd183c439
commit
5e3130ac26
|
@ -45,13 +45,13 @@ class MetadataController < ApplicationController
|
||||||
name: SiteSetting.title,
|
name: SiteSetting.title,
|
||||||
short_name: SiteSetting.short_title.presence || SiteSetting.title.truncate(12, separator: ' ', omission: ''),
|
short_name: SiteSetting.short_title.presence || SiteSetting.title.truncate(12, separator: ' ', omission: ''),
|
||||||
display: display,
|
display: display,
|
||||||
start_url: Discourse.base_uri.present? ? "#{Discourse.base_uri}/" : '.',
|
start_url: Discourse.base_path.present? ? "#{Discourse.base_path}/" : '.',
|
||||||
background_color: "##{ColorScheme.hex_for_name('secondary', scheme_id)}",
|
background_color: "##{ColorScheme.hex_for_name('secondary', scheme_id)}",
|
||||||
theme_color: "##{ColorScheme.hex_for_name('header_background', scheme_id)}",
|
theme_color: "##{ColorScheme.hex_for_name('header_background', scheme_id)}",
|
||||||
icons: [
|
icons: [
|
||||||
],
|
],
|
||||||
share_target: {
|
share_target: {
|
||||||
action: "/new-topic",
|
action: "#{Discourse.base_path}/new-topic",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
enctype: "application/x-www-form-urlencoded",
|
enctype: "application/x-www-form-urlencoded",
|
||||||
params: {
|
params: {
|
||||||
|
@ -63,7 +63,7 @@ class MetadataController < ApplicationController
|
||||||
{
|
{
|
||||||
name: I18n.t('js.topic.create_long'),
|
name: I18n.t('js.topic.create_long'),
|
||||||
short_name: I18n.t('js.topic.create'),
|
short_name: I18n.t('js.topic.create'),
|
||||||
url: "/new-topic",
|
url: "#{Discourse.base_path}/new-topic",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "#{icon_url_base}/plus.svg",
|
src: "#{icon_url_base}/plus.svg",
|
||||||
|
@ -75,7 +75,7 @@ class MetadataController < ApplicationController
|
||||||
{
|
{
|
||||||
name: I18n.t('js.user.messages.inbox'),
|
name: I18n.t('js.user.messages.inbox'),
|
||||||
short_name: I18n.t('js.user.messages.inbox'),
|
short_name: I18n.t('js.user.messages.inbox'),
|
||||||
url: "/my/messages",
|
url: "#{Discourse.base_path}/my/messages",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "#{icon_url_base}/envelope.svg",
|
src: "#{icon_url_base}/envelope.svg",
|
||||||
|
@ -87,7 +87,7 @@ class MetadataController < ApplicationController
|
||||||
{
|
{
|
||||||
name: I18n.t('js.user.bookmarks'),
|
name: I18n.t('js.user.bookmarks'),
|
||||||
short_name: I18n.t('js.user.bookmarks'),
|
short_name: I18n.t('js.user.bookmarks'),
|
||||||
url: "/my/bookmarks",
|
url: "#{Discourse.base_path}/my/bookmarks",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "#{icon_url_base}/bookmark.svg",
|
src: "#{icon_url_base}/bookmark.svg",
|
||||||
|
@ -99,7 +99,7 @@ class MetadataController < ApplicationController
|
||||||
{
|
{
|
||||||
name: I18n.t('js.filters.top.title'),
|
name: I18n.t('js.filters.top.title'),
|
||||||
short_name: I18n.t('js.filters.top.title'),
|
short_name: I18n.t('js.filters.top.title'),
|
||||||
url: "/top",
|
url: "#{Discourse.base_path}/top",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "#{icon_url_base}/signal.svg",
|
src: "#{icon_url_base}/signal.svg",
|
||||||
|
|
Loading…
Reference in New Issue