From bbf2e3f4451d41fa3c1a52000bab97b583ebd957 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Mon, 28 Nov 2022 22:44:20 +0000 Subject: [PATCH] Add PWA info --- config/config.exs | 8 +------- lib/pleroma/web/views/manifest_view.ex | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/config/config.exs b/config/config.exs index 8e0104400..90dcc057f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -313,7 +313,7 @@ loginMethod: "password", logo: "/static/logo.svg", logoMargin: ".1em", - logoMask: true, + logoMask: false, noAttachmentLinks: false, nsfwCensorImage: "", postContentType: "text/plain", @@ -346,12 +346,6 @@ default_mascot: :pleroma_fox_tan config :pleroma, :manifest, - icons: [ - %{ - src: "/static/logo.svg", - type: "image/svg+xml" - } - ], theme_color: "#282c37", background_color: "#191b22" diff --git a/lib/pleroma/web/views/manifest_view.ex b/lib/pleroma/web/views/manifest_view.ex index cc78ea347..1d78b594e 100644 --- a/lib/pleroma/web/views/manifest_view.ex +++ b/lib/pleroma/web/views/manifest_view.ex @@ -11,7 +11,17 @@ def render("manifest.json", _params) do %{ name: Config.get([:instance, :name]), description: Config.get([:instance, :description]), - icons: Config.get([:manifest, :icons]), + icons: [ + %{ + src: "/static/logo.svg", + type: "image/svg+xml" + }, + %{ + src: "/static/logo-512.png", + sizes: "512x512", + type: "image/png" + } + ], theme_color: Config.get([:manifest, :theme_color]), background_color: Config.get([:manifest, :background_color]), display: "standalone", @@ -21,7 +31,7 @@ def render("manifest.json", _params) do "social" ], serviceworker: %{ - src: "/sw.js" + src: "/sw-pleroma.js" } } end