Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/appearance.rb')
-rw-r--r--app/models/appearance.rb8
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