Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: minimal PWA manifest #310

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<title><%= htmlWebpackPlugin.options.title %> | <%= htmlWebpackPlugin.options.version %></title>
<meta name="description" content="A static HTML page that initializes an instance of IPFS Service Worker Gateway" />
<meta name="robots" content="noindex" />
<link rel="manifest" href="/manifest.json">
</head>
<body>
<div id="root" class="sans-serif f5"></div>
Expand Down
18 changes: 18 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"short_name": "InBrowser IPFS",
"name": "InBrowser IPFS Gateway",
Comment on lines +2 to +3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 ideas for better name welcome. We need something short, perhaps just go with inbrowser.link ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think thats about as short as we can go and have it still be semantic

"icons": [
{
"src": "/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"id": "/?source=pwa",
"start_url": "/?source=pwa",
"background_color": "#0B3A53",
"display": "standalone",
"scope": "/",
"theme_color": "#0B3A53",
"description": "An experimental IPFS Gateway implemented as a Service Worker with @helia/verified-fetch"
}
2 changes: 1 addition & 1 deletion src/components/input-validator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function InputValidator ({ requestPath }: { requestPath: string }
return (
<div>
<ValidationMessage protocol={protocol} cidOrPeerIdOrDnslink={cidOrPeerIdOrDnslink} requestPath={requestPath}>
<a className="db" href={swPath} target="_blank">
<a className="db" href={swPath}>
<button id="load-directly" className='button-reset pv3 tc bn bg-animate bg-teal-muted hover-bg-navy-muted white pointer f4 w-100'>Load content</button>
</a>
</ValidationMessage>
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ const common = {
{
from: `${paths.public}/_redirects`,
noErrorOnMissing: false
},
{
from: `${paths.public}/manifest.json`,
noErrorOnMissing: false
},
{
from: `${paths.public}/icon-512.png`,
noErrorOnMissing: false
}
]
}),
Expand Down
Loading