Logo and login bg fixes.
This commit is contained in:
@@ -20,6 +20,7 @@ RUN set -eux; \
|
||||
# Apply patches
|
||||
git apply project_identifier.patch; \
|
||||
git apply uxupgrade_cleanstartup.patch; \
|
||||
git apply uxupgrade_logo.patch; \
|
||||
git apply workload_sql.patch; \
|
||||
git apply workload_style.patch; \
|
||||
git apply workload_module.patch; \
|
||||
@@ -44,6 +45,7 @@ RUN set -eux; \
|
||||
mv /pre-entrypoint.sh /docker-entrypoint.sh; \
|
||||
# Copy themes
|
||||
cp -r plugins/000_redmine_x_ux_upgrade/assets/themes/redminex_theme public/themes/; \
|
||||
chown -R 999:999 public/themes/redminex_theme; \
|
||||
# Clean-up
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
|
||||
|
||||
56
patches/uxupgrade_logo.patch
Normal file
56
patches/uxupgrade_logo.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
--- a/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade.rb
|
||||
+++ b/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade.rb
|
||||
@@ -41,7 +41,7 @@ module RedmineXUxUpgrade
|
||||
|
||||
logo = settings.attachments.where(description: 'logo')&.last
|
||||
redmine_x_ux_theme_path = File.join(Rails.root, 'public', 'themes', 'redminex_theme', 'images')
|
||||
- path_to_logo = "#{redmine_x_ux_theme_path}/#{logo.disk_filename}" if logo
|
||||
+ path_to_logo = "#{redmine_x_ux_theme_path}/logo.png" if logo
|
||||
|
||||
if path_to_logo && File.exist?(path_to_logo)
|
||||
return ActionController::Base.helpers.asset_path("#{Redmine::Utils::relative_url_root}/themes/redminex_theme/images/#{logo.disk_filename}", :plugin => '000_redmine_x_ux_upgrade')
|
||||
--- a/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade/ux_upgrade_attachments.rb
|
||||
+++ b/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade/ux_upgrade_attachments.rb
|
||||
@@ -13,6 +13,7 @@ module RedmineXUxUpgrade
|
||||
LOGIN_NAME = 'login'
|
||||
LOGIN_DESKTOP_NAME = 'login_desktop'
|
||||
LOGIN_MOBILE_NAME = 'login_mobile'
|
||||
+ LOGO_FILE = 'logo.png'
|
||||
LOGIN_DESKTOP_FILE = 'login-2k.jpg'
|
||||
LOGIN_MOBILE_FILE = 'login.jpg'
|
||||
|
||||
@@ -153,10 +154,8 @@ module RedmineXUxUpgrade
|
||||
# @param [String | nil] filename - name of the filename of the logo file
|
||||
# @return [String] - path to file corresponding to the given name
|
||||
def self.image_path(name, filename=nil)
|
||||
- if name == LOGO_NAME && filename
|
||||
- File.join(Rails.root, 'public', 'themes', 'redminex_theme', 'images', filename)
|
||||
- elsif name == LOGO_NAME && filename.nil?
|
||||
- File.join(Rails.root, 'public', 'themes', 'redminex_theme', 'images')
|
||||
+ if name == LOGO_NAME
|
||||
+ File.join(Rails.root, 'public', 'themes', 'redminex_theme', 'images', LOGO_FILE)
|
||||
elsif name == LOGIN_DESKTOP_NAME
|
||||
File.join(Rails.root, 'public', 'themes', 'redminex_theme', 'images', LOGIN_DESKTOP_FILE)
|
||||
elsif name == LOGIN_MOBILE_NAME
|
||||
--- a/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade/application_helper_patch.rb
|
||||
+++ b/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade/application_helper_patch.rb
|
||||
@@ -70,19 +70,6 @@ module RedmineXUxUpgrade
|
||||
super *sources, options
|
||||
end
|
||||
|
||||
- # Redefined - line 1723
|
||||
- def favicon
|
||||
- favicon_path = "#{Redmine::Utils::relative_url_root}/themes/redminex_theme/images/favicon"
|
||||
-
|
||||
- "<link rel='apple-touch-icon' sizes='180x180' href='#{favicon_path}/apple-touch-icon.png'>
|
||||
- <link rel='icon' type='image/png' sizes='32x32' href='#{favicon_path}/favicon-32x32.png'>
|
||||
- <link rel='icon' type='image/png' sizes='16x16' href='#{favicon_path}/favicon-16x16.png'>
|
||||
- <link rel='manifest' href='#{favicon_path}/site.webmanifest'>
|
||||
- <link rel='mask-icon' href='#{favicon_path}/safari-pinned-tab.svg' color='#5bbad5'>
|
||||
- <link rel='shortcut icon' href='#{favicon_path}/favicon.ico'> <meta name='msapplication-TileColor' content='#ffffff'>
|
||||
- <meta name='theme-color' content='#ffffff'>".html_safe
|
||||
- end
|
||||
-
|
||||
# ***************
|
||||
# * New methods *
|
||||
# ***************
|
||||
Reference in New Issue
Block a user