logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

manifest_view.ex (794B)


  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. defmodule Pleroma.Web.ManifestView do
  5. use Pleroma.Web, :view
  6. alias Pleroma.Config
  7. alias Pleroma.Web.Endpoint
  8. def render("manifest.json", _params) do
  9. %{
  10. name: Config.get([:instance, :name]),
  11. description: Config.get([:instance, :description]),
  12. icons: Config.get([:manifest, :icons]),
  13. theme_color: Config.get([:manifest, :theme_color]),
  14. background_color: Config.get([:manifest, :background_color]),
  15. display: "standalone",
  16. scope: Endpoint.url(),
  17. start_url: "/",
  18. categories: [
  19. "social"
  20. ],
  21. serviceworker: %{
  22. src: "/sw.js"
  23. }
  24. }
  25. end
  26. end