From f5fe5b4544a4994f547c34d99174bda35062d0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 24 Sep 2022 18:34:09 +0200 Subject: [PATCH] Add shortcuts and share_target to manifest.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- lib/pleroma/web/views/manifest_view.ex | 43 +++++++++++++++++- priv/static/images/shortcuts/chats.png | Bin 0 -> 2478 bytes .../static/images/shortcuts/notifications.png | Bin 0 -> 2611 bytes priv/static/images/shortcuts/search.png | Bin 0 -> 2860 bytes 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 priv/static/images/shortcuts/chats.png create mode 100644 priv/static/images/shortcuts/notifications.png create mode 100644 priv/static/images/shortcuts/search.png diff --git a/lib/pleroma/web/views/manifest_view.ex b/lib/pleroma/web/views/manifest_view.ex index 2ae82191ee..f8adf0f58f 100644 --- a/lib/pleroma/web/views/manifest_view.ex +++ b/lib/pleroma/web/views/manifest_view.ex @@ -22,7 +22,48 @@ def render("manifest.json", _params) do ], serviceworker: %{ src: "/sw.js" - } + }, + share_target: %{ + action: "share", + method: "GET", + params: %{ + title: "title", + text: "text", + url: "url" + } + }, + shortcuts: [ + %{ + name: "Search", + url: "/search", + icons: [ + %{ + src: "/images/shortcuts/search.png", + sizes: "192x192" + } + ] + }, + %{ + name: "Notifications", + url: "/notifications", + icons: [ + %{ + src: "/images/shortcuts/notifications.png", + sizes: "192x192" + } + ] + }, + %{ + name: "Chats", + url: "/chats", + icons: [ + %{ + src: "/images/shortcuts/chats.png", + sizes: "192x192" + } + ] + } + ] } end end diff --git a/priv/static/images/shortcuts/chats.png b/priv/static/images/shortcuts/chats.png new file mode 100644 index 0000000000000000000000000000000000000000..29ddc8a4e110324e15cf41dc039c2fa84ace7776 GIT binary patch literal 2478 zcmd^=`#aN(8^=Gh4I67Fl5!ZyIddw9JZv)$`;z38MRSZ=DMTTMML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8Y)<|Tf$HY_~e>ctfuyQI}7tJlBv!OjF^Yd@)P{bAD?pLC?VIG-VF`S3a!wd zzWsfmi|Xwax3N)*#|BvdB(Dl=csTy2%zPx30P^{3ISqE$TqUDZu|a#(JF59vf_ByaiBvh zW&L~QumtpM517k?t~bipUaV$T{f%UFDYp%QY0?r4^Z#4nt?Bg9S%MVQ$fD8Z7^J=k zdsqxBt$|&76gLXeV7FX@CV@jlsN)Fq4O#Sxs1qCR6#3Ljq#Rg?Ka?$jq0Y#n6XeiK za9WE5?OH6{ViX#=xvo|PCIeM0AkqLF=?(bhg8VRmJO{WZM>Pzj8mhRnB>{K87KG0M z#|In7kMmt-V4->9BWjkuqsq^8Ky2Ft&bFt&|50@j2odkKaf}Yo(C0qS#1q2P)T>tG zK81)B6Ukp;XJ53Fy>^Q<T0i zg?!4|gqeb#6kmi;=Ydyi9GH^^!vBs$^t!3BBURLZ(%2K+6TDKrsV_-g(`uIF(nRzf z*fFra?|>vqpV#U}1QH<}t4FdV01V+EYaSX?<3xTuCXkh|%AjRGy+bI*U22qBfj*e= zZT?!2k`0@W-)#(H9IYBu!f^xR9}NnqVDHH%naat*T$ zk%@Hfv}|$*yUdnqwbECDVy>)*n?-i({VV;*v!DXBZPl%JPulxfy-lgs`#95QE=xEgOL&AKw)13wSWi)Yx&fD| z{)VR@8hcHNkI3RO%bIy=lJWPCtfVh3FtuBGy3(<)9Qg>BMP|7T&v?9zZJ&^%PickVp|a)!o70*#PEgNhRs$EaG@!N5AIvIUDsmeDkb!2$LM?P7M^wC zx13?IBfa_HJ1lm}`GmN4rf;l%2zcZ`c9me_luv4I(epAD5^QyHpMm|1?`Tlb9V>=F&bt7 literal 0 HcmV?d00001 diff --git a/priv/static/images/shortcuts/notifications.png b/priv/static/images/shortcuts/notifications.png new file mode 100644 index 0000000000000000000000000000000000000000..30114689656e1ba6f73be1bcfd6db5f844ebda07 GIT binary patch literal 2611 zcmd^A`8U*!8~qGsEM;Fpi>>S#q!7h0Vj5ea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r{>G4qB5WjjyZe2OQk zY0K_?%fsVsxOC48&;GIH;;P1=&H)P})~~GNo4tU^xP7r7jM^j{!N|ZCxLLSv4b7q= zdHBUL65^Dd;ingF!KaA2kS`5&rm6~E_5{uU%QU{Cj~02N%C)I_0ZOl`Ki!TP|_n33nH-Y>f9fs zs7OjrWnHzE&f(*0ScC{*-stvmjsolvB

0M7R}CFvUT@10HrpM zBah}n3*5mUi`?JX=HjGNg5ITk=$cFs&i*R>Z2W{ahv6F<7|#_uV*O9Zso`r8%5YfE zPyZFNuPtK|78vmapJcE14BAy#_6RkoQmG(tp(oo}-GQo=_iAkG;r#wycq^K&b?bVg dl{BY?1KbIum~3sXG#oY?fUvNI*O__Z{|Ec`aX|n8 literal 0 HcmV?d00001 diff --git a/priv/static/images/shortcuts/search.png b/priv/static/images/shortcuts/search.png new file mode 100644 index 0000000000000000000000000000000000000000..5c47de4c1e5129989996c8ac3d1dda6b1525f3c8 GIT binary patch literal 2860 zcmd^=`8(8$7so%A!JWv+kSRBFXOvOGSh8G&G1;5YC|lV{>B=%v(vUDCgh`}qk-B6n zS+kTGOO~=+*FKh!Eu&0^G27SuJHF3z-sk*qp6C2zqmXaU z!)tP``@AH(&Ww=M$Q@;+7h2OdT^2vkTu(f4<>&Jf;!;}Q_7QR|NZxXG>2QoW32xv&tJA-N(6I0G5B*OQA7)m$hA}|qh%-;Z&`{hm>~YJ?{B&M_3qQJahA!K(5=IMNM+EP2`R%5)Yd8Sx zr~W6AtP}eW?@@|%u*aX>Ywqms{(pw}{V~w}F`2}1X!3+Y^2EW1lgeq6f22<#Gp012 z%;-L)>*vzVjSS2S=PZimoL(=uywEU+@1;W@mmbLyLLi80WFvpONoLTfOe5!(YpVA1Q~Qf6@47L!AAX zRHVV-ikSGAV0oizqks@?2R=?{9OgSs4@zODrm3rbdR$z?T&>@-%zzBe)HRjS(GV*i zs-*F1={>HOD8bC9xKyY^jA zExxCw_vPweP6xMCQhcVhcVn*zm-e|>X_%;86fz;BFpFF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