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

manifest.json.erb « pwa « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82730105a533c738c9d3929326837d435f3d47a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<%- cache current_appearance do %>
{
  "name": "<%= appearance_pwa_name %>",
  "short_name": "<%= appearance_pwa_short_name %>",
  "description": "<%= appearance_pwa_description %>",
  "start_url": "<%= root_path %>",
  "scope": "<%= root_path %>",
  "display": "browser",
  "orientation": "any",
  "background_color": "#fff",
  "theme_color": "<%= user_theme_primary_color %>",
  "icons": [
  <% widths = Appearance::ALLOWED_PWA_ICON_SCALER_WIDTHS %>
  <% widths.each do |width| -%>
  {
    <% if source = appearance_pwa_icon_path_scaled(width) -%>
    "src": "<%= source %>",
    "sizes": "<%=  width.to_s + "x" + width.to_s %>",
    "type": "image/png"
    <% else -%>
    "error": "<%= "#{width} is not an allowed PWA scale" %>"
    <% end -%>
  }
  <% unless width == widths.last -%>
  ,
  <% end -%>
  <% end -%>
  <% unless current_appearance&.pwa_icon.present? -%>
  ,{
    "src": "<%= appearance_maskable_logo %>",
    "sizes": "512x512",
    "type": "image/png",
    "purpose": "maskable"
  }
  <% end -%>]
}
<% end %>