~tsileo/microblog.pub-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH microblog.pub] Adding Progressive Web App manifest for admin screens

Details
Message ID
<20230521135420.761255-1-acegiak@gmail.com>
DKIM signature
missing
Download raw message
Patch: +23 -1
---
 app/main.py               | 20 +++++++++++++++++++-
 app/templates/layout.html |  4 ++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/app/main.py b/app/main.py
index 4cd987d..a956e4d 100644
--- a/app/main.py
+++ b/app/main.py
@@ -1596,7 +1596,6 @@ Disallow: /admin
Disallow: /remote_interaction
Disallow: /remote_follow"""


async def _get_outbox_for_feed(db_session: AsyncSession) -> list[models.OutboxObject]:
    return (
        (
@@ -1725,3 +1724,22 @@ async def atom_feed(
        (await _gen_rss_feed(db_session, is_rss=False)).atom_str(),
        headers={"Content-Type": "application/atom+xml"},
    )


@app.get("/admin/manifest.json")
async def admin_pwa():
    manifest = {
        "name":LOCAL_ACTOR.display_name+" mb admin",
        "short_name": USERNAME+" mb",
        "scope":"/",
        "start_url":BASE_URL+"/admin/stream",
        "description":LOCAL_ACTOR.display_name+"'s microblog admin",
        "theme_color":"#080808",
        "background_color":"#080808",
        "display":"standalone",
        "orientation":"any",
        "icons":[
            {"src":BASE_URL+"/static/icon.png","sizes":"400x400"}
        ]
    }
    return manifest
diff --git a/app/templates/layout.html b/app/templates/layout.html
index cdf5959..3e0a4bd 100644
--- a/app/templates/layout.html
+++ b/app/templates/layout.html
@@ -9,6 +9,10 @@
<link rel="alternate" href="{{ url_for("rss_feed") }}" type="application/rss+xml" title="{{ local_actor.display_name}}'s microblog">
<link rel="alternate" href="{{ url_for("atom_feed") }}" type="application/atom+xml" title="{{ local_actor.display_name}}'s microblog">
<link rel="icon" type="image/x-icon" href="{{ BASE_URL }}/static/favicon.ico">
{% if '/admin' in request.url.path %}
<link rel="manifest" href="{{BASE_URL}}/admin/manifest.json" />
{% endif %}

<style>{{ highlight_css }}</style>
{% block head %}{% endblock %}
</head>
-- 
2.25.1

[microblog.pub/patches/.build.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CSS0A45SJPR0.1IB2332TGYO88@cirno2>
In-Reply-To
<20230521135420.761255-1-acegiak@gmail.com> (view parent)
DKIM signature
missing
Download raw message
microblog.pub/patches/.build.yml: FAILED in 1m12s

[Adding Progressive Web App manifest for admin screens][0] from [Ash McAllan][1]

[0]: https://lists.sr.ht/~tsileo/microblog.pub-devel/patches/41314
[1]: acegiak@gmail.com

✗ #993460 FAILED microblog.pub/patches/.build.yml https://builds.sr.ht/~tsileo/job/993460
Reply to thread Export thread (mbox)