-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Peersky already has pages/p2p/index.html, but it’s basically just a list. I’d like to turn this into a simple P2P app management UI for the home screen’s P2P bar.
Goals
Always‑visible P2P bar
Keep a constant blue element/icon on P2P bar at the bottom on the home screen that cannot be removed/unpinned.
This bar should always link to peersky://p2p/.
- SVG: https://icons.getbootstrap.com/icons/box/
- Path: https://github.com/p2plabsxyz/peersky-browser/tree/main/src/pages/static/assets/svg
- Color:
--browser-theme-primary-highlight
Manage apps from peersky://p2p/
Use pages/p2p/index.html as a management page for P2P apps.
- Replace the existing “sorted list” view with a table:
- Columns: Pin/Unpin, App name, Open.
- “App name” should still link to the app, same as today (e.g. peersky://p2p/chat).
- Pin/unpin controls determine whether that app appears on the home screen’s P2P bar.
Implementation hint
- Follow the same pattern as “hide clock” in Settings (how it updates the clock on the home screen), but this time the source of truth is
peersky://p2p/instead ofpeersky://settings/. - p2p-list.js should remain the registry, but now also track the pinned state used by the home bar.
- The P2P Bar UI on home screen should update (large or small) depending on the pinned apps icon list;
home.css,peer-bar.js - Also it would be cool to see "scale pop-in", or "pulse-in" animation in CSS for those SVG icons when home screen loads.
Note: Please use web components for reusability: https://developer.mozilla.org/en-US/docs/Web/API/Web_components
Docs
Update docs/P2P.md (the p2p-list.js section) to mention the new management features (pin/unpin, constant P2P bar, and where to manage apps).
Files:
https://github.com/p2plabsxyz/peersky-browser/blob/main/src/pages/peer-bar.js
https://github.com/p2plabsxyz/peersky-browser/blob/main/src/pages/theme/home.css
https://github.com/p2plabsxyz/peersky-browser/blob/main/src/pages/p2p/index.html
https://github.com/p2plabsxyz/peersky-browser/blob/main/src/pages/unified-preload.js