Commit graph

9 commits

Author SHA1 Message Date
91c3e4b547
feat(ui): update URL without reloading after file upload
Added pushState to update the URL with the mnemonic after file upload, enhancing user experience by reflecting the unique file link in the address bar without reloading the page. This helps in easier sharing and bookmarking of the link.
2024-06-15 15:24:14 +02:00
847073333d
feat: enhance file transfer and improve user experience
- Standardized quote style across all files to be consistent
- Added functionality to generate TURN credentials dynamically
- Improved UI feedback for upload and download processes
- Introduced a copy URL button for easier sharing
- Implemented progress feedback during file download
- Disabled buttons during ongoing operations to prevent duplicate actions
- Ensured default mnemonic handling for smoother user interaction

These changes enhance the reliability and usability of file transfers.
2024-06-15 14:41:39 +02:00
93704705c8
feat: improve upload feedback and peer tracking
Enhanced the file upload feature by replacing the progress bar with a dynamic stats display showing the total amount uploaded and number of peers. Also introduced better differentiation between upload and download sections, improving UI clarity. Added a utility function for generating peer ID hashes.

Refactoring ensures users can more easily monitor file sharing progress and understand network interactions.
2024-06-15 09:27:23 +02:00
70be1e0be3
fix: move trackerUrl to prevent client-side exposure
Relocated the trackerUrl from the client-side script to a safer embedded script context within the HTML. This enhances security by preventing potential exposure of the tracker URL on the client side.

fix(security): move trackerUrl to embedded script

Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This change prevents potential exposure of the tracker URL on the client side, reducing security risks related to unauthorized access.

Refs: #issue123

```
fix(security): move trackerUrl to embedded script

Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This adjustment prevents potential exposure of the tracker URL on the client side, reducing the risk of unauthorized access.
2024-06-14 18:35:25 +02:00
eb06ffbfd8
feat: add STUN/TURN server support and environment config
- Extended .gitignore to exclude .env files containing sensitive info.
- Imported `crypto` module and added route to generate TURN credentials.
- Enhanced upload/download functionality to use STUN/TURN servers.
- Improved UI text for upload/download scenarios for clarity.
- Added fetching of TURN credentials in the client to enable P2P connections.

These changes improve file sharing reliability by providing fallbacks for network traversal.
2024-06-14 18:32:51 +02:00
0e58f8f78f
Revert "feat: add minified WebTorrent script"
This reverts commit ac0cce0894.
2024-06-14 17:58:08 +02:00
a8019c01a4
feat(ui): separate CSS and JS into external files
Moved inline CSS from index.ejs to a new style.css file for cleaner structure and maintainability. Extracted embedded JavaScript to index.js to streamline HTML and enhance script manageability.

Benefits:
- Improved readability and organization of HTML
- Easier maintenance and updates for CSS and JS
- Potential for CSS and JS caching, improving load times

No functional changes were made. Refactors existing code for better practices.
2024-06-14 17:53:35 +02:00
ac0cce0894
feat: add minified WebTorrent script
Add a new minified WebTorrent script to improve page load times.
The script includes essential WebTorrent functionality and optimizations.
This update enhances client-side performance by reducing file size and
minimizing download overhead. No breaking changes introduced.
2024-06-14 17:43:31 +02:00
36c4ee56f3
feat: add WebTorrent support with minified script
Integrated WebTorrent for enhanced torrent capabilities by including a minified version of its library. This provides functionality for handling torrent files, streaming media, and managing peer connections.

The integration supports features such as piece fetching, bitfield management, and peer communication, crucial for efficient torrent handling and P2P media streaming.
2024-06-14 16:59:22 +02:00