diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/models/appearance.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/models/appearance.rb')
-rw-r--r-- | app/models/appearance.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/appearance.rb b/app/models/appearance.rb index 4a046b3ab20..3a5e06e9a1c 100644 --- a/app/models/appearance.rb +++ b/app/models/appearance.rb @@ -6,7 +6,7 @@ class Appearance < ApplicationRecord include WithUploads attribute :title, default: '' - attribute :short_title, default: '' + attribute :pwa_short_name, default: '' attribute :description, default: '' attribute :new_project_guidelines, default: '' attribute :profile_image_guidelines, default: '' @@ -23,6 +23,7 @@ class Appearance < ApplicationRecord cache_markdown_field :footer_message, pipeline: :broadcast_message validates :logo, file_size: { maximum: 1.megabyte } + validates :pwa_icon, file_size: { maximum: 1.megabyte } validates :header_logo, file_size: { maximum: 1.megabyte } validates :message_background_color, allow_blank: true, color: true validates :message_font_color, allow_blank: true, color: true @@ -31,6 +32,7 @@ class Appearance < ApplicationRecord validate :single_appearance_row, on: :create mount_uploader :logo, AttachmentUploader + mount_uploader :pwa_icon, AttachmentUploader mount_uploader :header_logo, AttachmentUploader mount_uploader :favicon, FaviconUploader @@ -49,6 +51,10 @@ class Appearance < ApplicationRecord logo_system_path(logo, 'logo') end + def pwa_icon_path + logo_system_path(pwa_icon, 'pwa_icon') + end + def header_logo_path logo_system_path(header_logo, 'header_logo') end |