You've already forked baupm-core
added switch to control the webapp function
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"nuxt.isNuxtApp": false
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,20 +2,22 @@
|
|||||||
<%= javascript_include_tag "baupm.js", :plugin => 'baupm_core' %>
|
<%= javascript_include_tag "baupm.js", :plugin => 'baupm_core' %>
|
||||||
<%= stylesheet_link_tag 'jquery-fab.css', :plugin => 'baupm_core', :media => "screen" %>
|
<%= stylesheet_link_tag 'jquery-fab.css', :plugin => 'baupm_core', :media => "screen" %>
|
||||||
<%= stylesheet_link_tag 'baupm.css', :plugin => 'baupm_core', :media => "screen" %>
|
<%= stylesheet_link_tag 'baupm.css', :plugin => 'baupm_core', :media => "screen" %>
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" sizes="180x180">
|
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-32x32.png" sizes="32x32" rel="shortcut icon">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-32x32.png" sizes="32x32" rel="shortcut icon">
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-16x16.png" rel="icon" type="image/png" sizes="16x16">
|
<% if Setting.plugin_baupm_core['baupm_enable_webapp'] == 1 %>
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" sizes="180x180">
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/safari-pinned-tab.svg" rel="mask-icon" size="any" color="<%= Setting.plugin_baupm_core['baupm_theme_color'] %>">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-16x16.png" rel="icon" type="image/png" sizes="16x16">
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/android-chrome-192x192.png" rel="icon" sizes="192x192">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
|
||||||
<link href="/themes/<%= Setting.ui_theme %>/images/icons/android-chrome-256x256.png" rel="icon" sizes="256x256">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/safari-pinned-tab.svg" rel="mask-icon" size="any" color="<%= Setting.plugin_baupm_core['baupm_theme_color'] %>">
|
||||||
<link href="/manifest.json" rel="manifest">
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/android-chrome-192x192.png" rel="icon" sizes="192x192">
|
||||||
<% if Setting.plugin_baupm_core['baupm_theme_color'].present? %>
|
<link href="/themes/<%= Setting.ui_theme %>/images/icons/android-chrome-256x256.png" rel="icon" sizes="256x256">
|
||||||
<meta name="theme-color" content="<%= Setting.plugin_baupm_core['baupm_theme_color'] %>">
|
<link href="/manifest.json" rel="manifest">
|
||||||
|
<% if Setting.plugin_baupm_core['baupm_theme_color'].present? %>
|
||||||
|
<meta name="theme-color" content="<%= Setting.plugin_baupm_core['baupm_theme_color'] %>">
|
||||||
|
<% end %>
|
||||||
|
<% if Setting.plugin_baupm_core['baupm_manifest_orientation'].present? %>
|
||||||
|
<meta name="screen-orientation" content="<%= Setting.plugin_baupm_core['baupm_manifest_orientation'] %>">
|
||||||
|
<% end %>
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if Setting.plugin_baupm_core['baupm_manifest_orientation'].present? %>
|
|
||||||
<meta name="screen-orientation" content="<%= Setting.plugin_baupm_core['baupm_manifest_orientation'] %>">
|
|
||||||
<% end %>
|
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<% if Setting.plugin_baupm_core['baupm_enable_webapp'] == 1 %>
|
||||||
{
|
{
|
||||||
"name": "<%= Setting.plugin_baupm_core['baupm_application_title'] %>",
|
"name": "<%= Setting.plugin_baupm_core['baupm_application_title'] %>",
|
||||||
<% if Setting.plugin_baupm_core['baupm_application_short_title'].present? %>
|
<% if Setting.plugin_baupm_core['baupm_application_short_title'].present? %>
|
||||||
@@ -39,3 +40,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
<legend><%= l(:baupm_manifest_settings) %></legend>
|
<legend><%= l(:baupm_manifest_settings) %></legend>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th><%= l(:baupm_enable_webapp) %></th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" id="baupm_enable_webapp"
|
||||||
|
value="<%= settings['baupm_enable_webapp'] %>"
|
||||||
|
name="settings[baupm_enable_webapp]">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= l(:baupm_application_title) %></th>
|
<th><%= l(:baupm_application_title) %></th>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ de:
|
|||||||
baupm_display_browser: Browser
|
baupm_display_browser: Browser
|
||||||
baupm_display_fullscreen: Vollbild
|
baupm_display_fullscreen: Vollbild
|
||||||
baupm_display_minimal_ui: Minimal
|
baupm_display_minimal_ui: Minimal
|
||||||
|
baupm_enable_webapp: Webapp aktivieren
|
||||||
|
|
||||||
# Redmine translation modifications
|
# Redmine translation modifications
|
||||||
notice_unable_delete_version: Der Meilenstein konnte nicht gelöscht werden
|
notice_unable_delete_version: Der Meilenstein konnte nicht gelöscht werden
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ en:
|
|||||||
baupm_display_browser: Browser
|
baupm_display_browser: Browser
|
||||||
baupm_display_fullscreen: Fullscreen
|
baupm_display_fullscreen: Fullscreen
|
||||||
baupm_display_minimal_ui: Minimal UI
|
baupm_display_minimal_ui: Minimal UI
|
||||||
|
baupm_enable_webapp: Enable Webapp
|
||||||
|
|
||||||
# Redmine translation modifications (@TODO Translate this)
|
# Redmine translation modifications (@TODO Translate this)
|
||||||
notice_unable_delete_version: Unable to delete the Milestone
|
notice_unable_delete_version: Unable to delete the Milestone
|
||||||
|
|||||||
1
init.rb
1
init.rb
@@ -23,5 +23,6 @@ Redmine::Plugin.register :baupm_core do
|
|||||||
'baupm_manifest_orientation' => 'portrait',
|
'baupm_manifest_orientation' => 'portrait',
|
||||||
'baupm_manifest_display' => 'standalone',
|
'baupm_manifest_display' => 'standalone',
|
||||||
'baupm_manifest_start_url' => '.'
|
'baupm_manifest_start_url' => '.'
|
||||||
|
'baupm_enable_webapp' => 1
|
||||||
}, :partial => 'settings/baupm_settings'
|
}, :partial => 'settings/baupm_settings'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user