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: update icon and make this app a pwa #110

Merged
merged 6 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
218 changes: 97 additions & 121 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#edffff</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
7 changes: 6 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
<link rel="mask-icon" href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#edffff">
<meta name="theme-color" content="#ffffff">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
106 changes: 98 additions & 8 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,105 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "IPFS-Share",
rafaelramalho19 marked this conversation as resolved.
Show resolved Hide resolved
"name": "IPFS Share",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "./index.html",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"start_url": "/",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"share_target": {
"action": "/upload",
"method": "POST",
Copy link
Member

@lidel lidel Feb 4, 2021

Choose a reason for hiding this comment

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

Hm.. are we planning to handle POST via Service Worker? I remember issues with non-GETs and SW.
If looking into this takes too much time we can extract it into a separate issue.

Having PWA mode, even without share target is already a win ❤️ 🚀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to test this out, but is hard since JS-IPFS requires https and I have to test with my phone, but will update #106 with news 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the share for now, please approve the rest 🙏

"enctype": "multipart/form-data",
"params": {
"files": [
{
"name": "flac",
"accept": ["audio/flac", ".flac"]
},
{
"name": "x-m4a",
"accept": ["audio/x-m4a", ".x-m4a"]
},
{
"name": "mp3",
"accept": ["audio/mp3", ".mp3"]
},
{
"name": "ogg",
"accept": ["audio/ogg", ".ogg"]
},
{
"name": "wav",
"accept": ["audio/wav", ".wav"]
},
{
"name": "webm",
"accept": ["audio/webm", ".webm"]
},
{
"name": "bmp",
"accept": ["image/bmp", ".bmp"]
},
{
"name": "gif",
"accept": ["image/gif", ".gif"]
},
{
"name": "x-icon",
"accept": ["image/x-icon", ".x-icon"]
},
{
"name": "svg+xml",
"accept": ["image/svg+xml", ".svg+xml"]
},
{
"name": "tiff",
"accept": ["image/tiff", ".tiff"]
},
{
"name": "webp",
"accept": ["image/webp", ".webp"]
},
{
"name": "css",
"accept": ["text/css", ".css"]
},
{
"name": "html",
"accept": ["text/html", ".html"]
},
{
"name": "plain",
"accept": ["text/plain", ".plain"]
},
{
"name": "mp4",
"accept": ["video/mp4", ".mp4"]
},
{
"name": "mpeg",
"accept": ["video/mpeg", ".mpeg"]
},
{
"name": "ogg",
"accept": ["video/ogg", ".ogg"]
},
{
"name": "webm",
"accept": ["video/webm", ".webm"]
}
]
}
}
}
Binary file added public/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions public/offline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>IPFS Share | Offline</title>
</head>
<body>
<script>
function reload() {
window.location.reload()
}
</script>
<div style="text-align:center; margin-top:40px;" onclick="reload()">
<svg viewBox='0 0 100 100' width="100" style="cursor: pointer">
<path d='M50 20.11A29.89 29.89 0 1 0 79.89 50 29.89 29.89 0 0 0 50 20.11zm-3.22 17a3.22 3.22 0 0 1 6.44 0v6.43a3.22 3.22 0 0 1-6.44 0zM50 66.08a16.14 16.14 0 0 1-11.41-27.49 3.28 3.28 0 0 1 1.76-.65 2.48 2.48 0 0 1 2.42 2.41 2.58 2.58 0 0 1-.77 1.77A10.81 10.81 0 0 0 38.59 50a11.25 11.25 0 0 0 22.5 0 10.93 10.93 0 0 0-3.21-7.88 3.37 3.37 0 0 1-.65-1.77 2.48 2.48 0 0 1 2.42-2.41 2.16 2.16 0 0 1 1.76.65A16.14 16.14 0 0 1 50 66.08z' />
</svg>
<p>You are currently online.</p>
<div>
</body>
</html>
Loading