-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add new Feature: sending files directly to the downloads folder. #106
base: feat/add-cleanup-mechanism-for-old-db-entries
Are you sure you want to change the base?
Add new Feature: sending files directly to the downloads folder. #106
Conversation
… the primary device Signed-off-by: nidhal-labidi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see this!
As discussed, we can have some improvements to it
<div class="min-h-screen flex items-center justify-center overflow-hidden bg-gray-50"> | ||
<div class="max-w-screen-xl w-full p-4 box-border flex flex-col items-center"> | ||
<h1 class="text-2xl font-bold text-gray-800 mb-8">Remote File Drop</h1> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to add links to the individual files here as a list instead of starting a download of them directly - this allows users to change file names and the folder when they save it.
const url = window.URL.createObjectURL(receivedFile); | ||
const a = document.createElement('a'); | ||
a.href = url; | ||
a.download = receivedFile.name; | ||
document.body.appendChild(a); | ||
a.click(); | ||
document.body.removeChild(a); | ||
window.URL.revokeObjectURL(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be put this into links for downloading
let createWebRtcChannel: () => void; | ||
let connectionStatus = 'new'; | ||
let connectionInfo = { link: '', qrCode: '' }; | ||
let progress = { currentFileNumber: 0, totalNumberOfFiles: 0, currentFileName: '' }; | ||
let error = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$state
runes here?
{/if} | ||
|
||
{#if connectionStatus === 'endpoint-created'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these could be turned into {:else if connectionStatus === '...'}
, so it's easier to see these parts are never shown at the same time
Checklist
Reviewer
Changes
Check #105