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

More PWA functions #276

Closed
Zac0511 opened this issue Apr 13, 2024 · 2 comments
Closed

More PWA functions #276

Zac0511 opened this issue Apr 13, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@Zac0511
Copy link
Contributor

Zac0511 commented Apr 13, 2024

I've read the manifest documentation, and found some useful things that could be added to Puter's manifest file such as :

  • Screenshots that shows up when the PWA gets installed
  • Description that shows up when the PWA gets installed
  • Shortcuts (that shows on the app icon on the real OS (like windows)) for like opening file explorer from the real os taskbar

Here's an example of an app with a description and screenshots set in his manifest file (image is in french but i will look something like that) :
image

I got the manifest file from DevTools, and here's a modified version of the manifest file with a description and some of the things i mentionned :

{
    "name": "Puter",
    "short_name": "Puter",
    "display": "standalone",
    "start_url": "/",
	"description": "A cloud-based operating system",
	"shortcuts": [
     {
       "name": "Open explorer",
       "short_name": "Explorer",
       "description": "Opens the file explorer",
       "url": "TYPE THE EXPLORER OPEN URL HERE",
       "icons": [{ "src": "PUT THE SOURCE HERE", "sizes": "PUT THE SIZE HERE" }]
     },
     {
       "name": "PUT SHORTCUT NAME HERE",
       "short_name": "PUT THE SHORT NAME HERE",
       "description": "PUT A DESCRIPTION HERE",
       "url": "PUT AN URL HERE",
       "icons": [{ "src": "PUT THE SOURCE HERE", "sizes": "PUT THE SIZE HERE" }]
     }
    ],
     "icons": [
         {
             "src": "/favicons/android-icon-36x36.png",
             "sizes": "36x36",
             "type": "image/png",
             "density": "0.75"
         },
         {
             "src": "/favicons/android-icon-48x48.png",
             "sizes": "48x48",
             "type": "image/png",
             "density": "1.0"
         },
         {
             "src": "/favicons/android-icon-72x72.png",
             "sizes": "72x72",
             "type": "image/png",
             "density": "1.5"
         },
         {
             "src": "/favicons/android-icon-96x96.png",
             "sizes": "96x96",
             "type": "image/png",
             "density": "2.0"
         },
         {
             "src": "/favicons/android-icon-144x144.png",
             "sizes": "144x144",
             "type": "image/png",
             "density": "3.0"
         },
         {
             "src": "/favicons/android-icon-192x192.png",
             "sizes": "192x192",
             "type": "image/png",
             "density": "4.0"
         }
    ],
    "screenshots": [
        {
          "src": "PUT SCREENSHOT SOURCE HERE",
          "type": "PUT THE TYPE HERE",
          "sizes": "PUT THE SIZE HERE",
          "form_factor": "PUT THE FORM FACTOR HERE"
        },
        {
          "src": "PUT SCREENSHOT SOURCE HERE",
          "type": "PUT THE TYPE HERE",
          "sizes": "PUT THE SIZE HERE",
          "form_factor": "PUT THE FORM FACTOR HERE"
        }
    ]
}

Some source and things like that are not filled, so they have the correct thing once its inside Puter's source, and some parts may be broken because i didn't tested all the code.

@jelveh jelveh added the good first issue Good for newcomers label Apr 13, 2024
@Zac0511
Copy link
Contributor Author

Zac0511 commented Apr 15, 2024

New update :

I've made a more optimised manifest file with the help of PWABuilder, it no longer have the screenshots part, but it can be added later.

New file :

{
  "name": "Puter",
  "short_name": "Puter",
  "display": "standalone",
  "start_url": "/",
  "icons": [
    {
      "src": "/favicons/android-icon-36x36.png",
      "sizes": "36x36",
      "type": "image/png",
      "density": "0.75"
    },
    {
      "src": "/favicons/android-icon-48x48.png",
      "sizes": "48x48",
      "type": "image/png",
      "density": "1.0"
    },
    {
      "src": "/favicons/android-icon-72x72.png",
      "sizes": "72x72",
      "type": "image/png",
      "density": "1.5"
    },
    {
      "src": "/favicons/android-icon-96x96.png",
      "sizes": "96x96",
      "type": "image/png",
      "density": "2.0"
    },
    {
      "src": "/favicons/android-icon-144x144.png",
      "sizes": "144x144",
      "type": "image/png",
      "density": "3.0"
    },
    {
      "src": "/favicons/android-icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png",
      "density": "4.0"
    }
  ],
  "theme_color": "#000000",
  "background_color": "#000000",
  "id": "puter",
  "description": "A cloud-based operating system, working anywhere at any time.",
  "dir": "auto",
  "lang": "en",
  "orientation": "any",
  "scope": "https://puter.com/",
  "categories": [
    "entertainment",
    "games",
    "navigation",
    "productivity",
    "utilities"
  ]
}

@jelveh jelveh closed this as completed in e683325 Jul 18, 2024
@jelveh
Copy link
Contributor

jelveh commented Jul 18, 2024

Thanks for the suggestion! I just pushed a commit implementing these. ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants