2021-11-24 15:45:05 -07:00
|
|
|
# Pleroma: A lightweight social networking server
|
2023-01-02 13:38:50 -07:00
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
2021-11-24 15:45:05 -07:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Pleroma.Web.ManifestView do
|
|
|
|
use Pleroma.Web, :view
|
|
|
|
alias Pleroma.Config
|
|
|
|
alias Pleroma.Web.Endpoint
|
|
|
|
|
|
|
|
def render("manifest.json", _params) do
|
|
|
|
%{
|
|
|
|
name: Config.get([:instance, :name]),
|
|
|
|
description: Config.get([:instance, :description]),
|
|
|
|
icons: Config.get([:manifest, :icons]),
|
|
|
|
theme_color: Config.get([:manifest, :theme_color]),
|
|
|
|
background_color: Config.get([:manifest, :background_color]),
|
|
|
|
display: "standalone",
|
|
|
|
scope: Endpoint.url(),
|
|
|
|
start_url: "/",
|
|
|
|
categories: [
|
|
|
|
"social"
|
|
|
|
],
|
|
|
|
serviceworker: %{
|
|
|
|
src: "/sw.js"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|