Skip to content
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

feat: add warnings about the public and permanent nature of w3up uploads #502

Merged
merged 4 commits into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions examples/react/w3console/src/components/Uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,34 @@ const UploaderForm = (): JSX.Element => {
const [{ status, file }] = useUploaderComponent()
const hasFile = file !== undefined
return (
<UploaderCore.Form>
<div className={`relative h-52 p-8 rounded-md bg-white/5 hover:bg-white/10 border-2 border-dashed border-gray-600 flex flex-col justify-center items-center`}>
{hasFile ? '' : <span className='mb-5'><CloudArrowUpIcon className='w-8 h-8 text-gray-600'/></span>}
<label className={`${hasFile ? 'hidden' : 'block h-px w-px overflow-hidden absolute whitespace-nowrap'}`}>File:</label>
<UploaderCore.Input className={`${hasFile ? 'hidden' : 'block absolute inset-0 cursor-pointer w-full opacity-0'}`} />
<UploaderContents />
{hasFile ? '' : <span>Drag files or Click to Browse</span>}
<>
<UploaderCore.Form>
<div className={`relative h-52 p-8 rounded-md bg-white/5 hover:bg-white/10 border-2 border-dashed border-gray-600 flex flex-col justify-center items-center text-center`}>
{hasFile ? '' : <span className='mb-5'><CloudArrowUpIcon className='w-8 h-8 text-gray-600' /></span>}
<label className={`${hasFile ? 'hidden' : 'block h-px w-px overflow-hidden absolute whitespace-nowrap'}`}>File:</label>
<UploaderCore.Input className={`${hasFile ? 'hidden' : 'block absolute inset-0 cursor-pointer w-full opacity-0'}`} />
<UploaderContents />
{hasFile ? '' : <span>Drag files or Click to Browse</span>}
</div>
</UploaderCore.Form>
<div className='flex flex-col lg:flex-row space-y-4 lg:space-y-0 lg:space-x-4 mt-4 text-center lg:text-left'>
<div className=''>
<h4 className='text-sm mb-2'>🌎&nbsp;&nbsp;Public Data</h4>
<p className='text-xs'>
All data uploaded to w3up is available to anyone who requests it using the correct CID.
Do not store any private or sensitive information in an unencrypted form using w3up.
</p>
</div>
<div className=''>
<h4 className='text-sm mb-2'>♾️&nbsp;&nbsp;Permanent Data</h4>
<p className='text-xs'>
Removing files from w3up will remove them from the file listing for your account, but that
doesn’t prevent nodes on the decentralized storage network from retaining copies of the data
indefinitely. Do not use w3up for data that may need to be permanently deleted in the future.
</p>
</div>
</div>
</UploaderCore.Form>
</>
)
}

Expand Down Expand Up @@ -132,7 +151,7 @@ const UploaderContents = (): JSX.Element => {
</button>
</div>
</>
)
)
: <></>
} else {
return (
Expand Down