move to 2.5.5
[anni] / lib / pleroma / web / views / manifest_view.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ManifestView do
6   use Pleroma.Web, :view
7   alias Pleroma.Config
8   alias Pleroma.Web.Endpoint
9
10   def render("manifest.json", _params) do
11     %{
12       name: Config.get([:instance, :name]),
13       description: Config.get([:instance, :description]),
14       icons: Config.get([:manifest, :icons]),
15       theme_color: Config.get([:manifest, :theme_color]),
16       background_color: Config.get([:manifest, :background_color]),
17       display: "standalone",
18       scope: Endpoint.url(),
19       start_url: "/",
20       categories: [
21         "social"
22       ],
23       serviceworker: %{
24         src: "/sw.js"
25       }
26     }
27   end
28 end