iris webmanifest, images and .well-known

This commit is contained in:
Martti Malmi 2023-10-04 16:10:22 +03:00
parent 4d12de302d
commit 88d5ff73e0
10 changed files with 73 additions and 9 deletions

View File

@ -3,5 +3,5 @@
"appNameCapitalized": "Iris",
"appTitle": "iris",
"nip05Domain": "iris.to",
"favicon": "public/iris.ico"
"favicon": "public/iris/favicon.ico"
}

View File

@ -0,0 +1,12 @@
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "to.iris.twa",
"sha256_cert_fingerprints": [
"63:B5:70:E8:F1:75:7E:D6:EF:81:11:66:F4:9D:47:AB:49:3C:2E:00:B9:67:92:40:89:A5:03:0B:96:B9:40:09"
]
}
}
]

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,41 @@
{
"short_name": "Iris",
"name": "Iris",
"description": "Fast nostr web ui",
"id": "/",
"icons": [
{
"src": "/public/iris/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/public/iris/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/public/iris/maskable_icon.png",
"sizes": "640x640",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/public/iris/maskable_icon_x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
}
],
"start_url": "/",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#000000",
"protocol_handlers": [
{
"protocol": "web+nostr",
"url": "/%s"
}
]
}

View File

@ -14,6 +14,23 @@ const appConfig = require("config");
const isProduction = process.env.NODE_ENV == "production";
const appTitle = appConfig.get("appTitle");
const copyPatterns = [
{ from: "public/robots.txt" },
{ from: "public/nostrich_512.png" },
{ from: "public/nostrich_256.png" },
{ from: "_headers" },
];
if (appTitle === "iris") {
copyPatterns.push({ from: "public/iris/manifest_iris.json", to: "manifest.json" });
copyPatterns.push({ from: "public/iris/img", to: "img" });
copyPatterns.push({ from: "public/iris/.well-known", to: ".well-known" });
} else {
copyPatterns.push({ from: "public/manifest.json" });
}
const config = {
entry: {
main: "./src/index.tsx",
@ -39,20 +56,14 @@ const config = {
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "public/manifest.json" },
{ from: "public/robots.txt" },
{ from: "public/nostrich_512.png" },
{ from: "public/nostrich_256.png" },
{ from: "_headers" },
],
patterns: copyPatterns,
}),
new HtmlWebpackPlugin({
template: "public/index.html",
favicon: appConfig.get("favicon"),
excludeChunks: ["pow", "bench"],
templateParameters: {
appTitle: appConfig.get("appTitle"),
appTitle,
},
}),
new HtmlWebpackPlugin({