[PR #1060] [MERGED] feat: add PWA support share functionality #956

Closed
opened 2026-02-25 23:36:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/1060
Author: @pudymody
Created: 2/15/2025
Status: Merged
Merged: 2/22/2025
Merged by: @fmartingr

Base: masterHead: pwa


📝 Commits (10+)

  • 458bde6 feat: Add manifest file
  • fb1cd55 fix: Embed webmanifest file
  • e8869d4 fix: use standalone mode, not fullscreen
  • d07ef66 feat: Open add dialog by default if share query params are present
  • d32e8d6 fix: Use relative url in manifest to allow subfolder
  • b51fa87 fix: Remove missing icon
  • 6556be3 fix: Repĺace current history entry if sharing
  • fbc95e1 Merge branch 'master' into pwa
  • 696e4b6 chore: Make query params consistent
  • 7e09994 feat: Add more pwa icons

📊 Changes

8 files changed (+89 additions, -2 deletions)

View changed files

📝 internal/view/assets/js/page/home.js (+38 -1)
internal/view/assets/manifest.webmanifest (+48 -0)
internal/view/assets/res/pwa-1024x1024.png (+0 -0)
internal/view/assets/res/pwa-192x192.png (+0 -0)
internal/view/assets/res/pwa-512x512.png (+0 -0)
📝 internal/view/content.html (+1 -0)
📝 internal/view/embed.go (+1 -1)
📝 internal/view/index.html (+1 -0)

📄 Description

This is based on #919. As i said in my comment it adds the share functionality.
It only allows to install it as a native app and other apps to share to it. Offline functionality could be explored in the future.

In the home page, it checks if the query param "url" or "description" are present, and if thats the case, it automatically opens the add modal dialog with the data prefilled. From there, you can always edit it before saving.
This also allows not only the native share functionality, but to trigger this from anywhere else as you only need to construct the correct url.

url maps to the url to save. description to the excerpt and name to the title.
For example: shiori.tld/?url=github.com&name=pudymody&description=pudymody+is+a+developer

Changed the display mode from "fullscreen" to "standalone" as fullscreen hides native controls needed for basic functionality. Fullscreen is targeted more towards things like games and not apps. https://developer.mozilla.org/en-US/docs/Web/Manifest/Reference/display

Removed the 512 size icon as it didnt exists and i couldnt find some bigger version to downscale and generate it.

Used relative urls for start_url and share_target to allow subfolder installations to work without needing to define the manifest file as some templated file https://developer.mozilla.org/en-US/docs/Web/Manifest/Reference/start_url

Closes #919


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/1060 **Author:** [@pudymody](https://github.com/pudymody) **Created:** 2/15/2025 **Status:** ✅ Merged **Merged:** 2/22/2025 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `pwa` --- ### 📝 Commits (10+) - [`458bde6`](https://github.com/go-shiori/shiori/commit/458bde6f20ef019ae09bd2a99557d8fbdf7f369e) feat: Add manifest file - [`fb1cd55`](https://github.com/go-shiori/shiori/commit/fb1cd55eb86387efd77a59227c49b11ab6652909) fix: Embed webmanifest file - [`e8869d4`](https://github.com/go-shiori/shiori/commit/e8869d4455302256f23111325611c881384f84e0) fix: use standalone mode, not fullscreen - [`d07ef66`](https://github.com/go-shiori/shiori/commit/d07ef66f827edda60a7d47181025bc965276cdcb) feat: Open add dialog by default if share query params are present - [`d32e8d6`](https://github.com/go-shiori/shiori/commit/d32e8d68537e7468c5336fbe276cd4ad2aca6034) fix: Use relative url in manifest to allow subfolder - [`b51fa87`](https://github.com/go-shiori/shiori/commit/b51fa872733139a67ce5e5ff0e1ea4cdddb58ea3) fix: Remove missing icon - [`6556be3`](https://github.com/go-shiori/shiori/commit/6556be3e7471f4b70a9a419e8a52151617a9a938) fix: Repĺace current history entry if sharing - [`fbc95e1`](https://github.com/go-shiori/shiori/commit/fbc95e14aa970c3287dc176762c85aa74f02421d) Merge branch 'master' into pwa - [`696e4b6`](https://github.com/go-shiori/shiori/commit/696e4b67d46af99fd7de5ba54e8525d64c57bb06) chore: Make query params consistent - [`7e09994`](https://github.com/go-shiori/shiori/commit/7e099949294ce17c93afd7acf326fbf2132f114d) feat: Add more pwa icons ### 📊 Changes **8 files changed** (+89 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/view/assets/js/page/home.js` (+38 -1) ➕ `internal/view/assets/manifest.webmanifest` (+48 -0) ➕ `internal/view/assets/res/pwa-1024x1024.png` (+0 -0) ➕ `internal/view/assets/res/pwa-192x192.png` (+0 -0) ➕ `internal/view/assets/res/pwa-512x512.png` (+0 -0) 📝 `internal/view/content.html` (+1 -0) 📝 `internal/view/embed.go` (+1 -1) 📝 `internal/view/index.html` (+1 -0) </details> ### 📄 Description This is based on #919. As i said in my comment it adds the share functionality. It only allows to install it as a native app and other apps to share to it. Offline functionality could be explored in the future. In the home page, it checks if the query param "url" or "description" are present, and if thats the case, it automatically opens the add modal dialog with the data prefilled. From there, you can always edit it before saving. This also allows not only the native share functionality, but to trigger this from anywhere else as you only need to construct the correct url. `url` maps to the url to save. `description` to the excerpt and `name` to the title. For example: `shiori.tld/?url=github.com&name=pudymody&description=pudymody+is+a+developer` Changed the display mode from "fullscreen" to "standalone" as fullscreen hides native controls needed for basic functionality. Fullscreen is targeted more towards things like games and not apps. https://developer.mozilla.org/en-US/docs/Web/Manifest/Reference/display Removed the 512 size icon as it didnt exists and i couldnt find some bigger version to downscale and generate it. Used relative urls for start_url and share_target to allow subfolder installations to work without needing to define the manifest file as some templated file https://developer.mozilla.org/en-US/docs/Web/Manifest/Reference/start_url Closes #919 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:36:01 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#956
No description provided.