Skip to content

Conversation

@nidhal-labidi
Copy link
Contributor

Checklist

Reviewer

  • I've checked out the code and tested it myself.

Changes

Check #105

… the primary device

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
@nidhal-labidi nidhal-labidi changed the base branch from main to feat/add-cleanup-mechanism-for-old-db-entries January 7, 2025 10:44
@nidhal-labidi nidhal-labidi requested a review from Narigo January 7, 2025 10:44
Copy link
Member

@Narigo Narigo left a 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>

Copy link
Member

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.

Comment on lines +67 to +74
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);
Copy link
Member

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

Comment on lines +5 to +9
let createWebRtcChannel: () => void;
let connectionStatus = 'new';
let connectionInfo = { link: '', qrCode: '' };
let progress = { currentFileNumber: 0, totalNumberOfFiles: 0, currentFileName: '' };
let error = '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$state runes here?

Comment on lines +106 to +108
{/if}

{#if connectionStatus === 'endpoint-created'}
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New use case

3 participants