1 import { readFile } from "fs/promises";
2 import { GetSiteResponse } from "lemmy-js-client";
3 import path from "path";
5 const iconSizes = [72, 96, 128, 144, 152, 192, 384, 512];
7 const defaultLogoPathDirectory = path.join(
14 export default async function ({
18 local_site: { community_creation_admin_only },
23 description: site.description ?? "A link aggregator for the fediverse",
26 display: "standalone",
28 background_color: "#222222",
29 theme_color: "#222222",
30 icons: await Promise.all(
31 iconSizes.map(async size => {
32 const src = await readFile(
33 path.join(defaultLogoPathDirectory, `icon-${size}x${size}.png`),
34 ).then(buf => buf.toString("base64"));
37 sizes: `${size}x${size}`,
39 src: `data:image/png;base64,${src}`,
40 purpose: "any maskable",
48 description: "Perform a search.",
54 short_name: "Communities",
55 description: "Browse communities",
60 short_name: "Create Post",
61 description: "Create a post.",
64 my_user?.local_user_view.person.admin || !community_creation_admin_only
67 name: "Create Community",
68 url: "/create_community",
69 short_name: "Create Community",
70 description: "Create a community",
75 related_applications: [
78 url: "https://f-droid.org/packages/com.jerboa/",