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

chore: change add to import #1486

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions public/locales/en/files.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"addFile": "File",
"addFolder": "Folder",
"addByPath": "From IPFS",
"addToIPFS": "Add",
"importToIPFS": "Import",
"newFolder": "New folder",
"generating": "Generating…",
"actions": {
"add": "Add",
"import": "Import",
"delete": "Delete",
"rename": "Rename",
"download": "Download",
Expand Down Expand Up @@ -55,8 +55,8 @@
"descriptionFile": "{count, plural, one {Are you sure you want to delete this file? This action is permanent and cannot be reversed.} other {Are you sure you want to delete these {count} files? This action is permanent and cannot be reversed.}}"
},
"addByPathModal": {
"title": "Add from IPFS",
"description": "Insert an IPFS path (CID) to add.",
"title": "Import from IPFS",
"description": "Insert an IPFS path (CID) to import.",
"examples": "Examples:"
},
"newFolderModal": {
Expand Down
4 changes: 2 additions & 2 deletions src/files/file-input/FileInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const AddButton = withTranslation('files')(({ progress = null, disabled, t, tRea
const sending = progress !== null

return (
<Button id='add-button' bg='bg-navy' color='white' disabled={sending || disabled} className='f6 relative' minWidth='100px' {...props}>
<Button id='import-button' bg='bg-navy' color='white' disabled={sending || disabled} className='f6 relative' minWidth='100px' {...props}>
<div className='absolute top-0 left-0 1 pa2 w-100 z-2'>
{ sending ? `${progress.toFixed(0)}%` : (<span><span className='aqua'>+</span> {t('addToIPFS')}</span>) }
{ sending ? `${progress.toFixed(0)}%` : (<span><span className='aqua'>+</span> {t('importToIPFS')}</span>) }
</div>&nbsp;
{ sending &&
<div className='transition-all absolute top-0 br1 left-0 h-100 z-1' style={{ width: `${progress}%`, background: 'rgba(0,0,0,0.1)' }} /> }
Expand Down
2 changes: 1 addition & 1 deletion src/files/modals/add-by-path-modal/AddByPathModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function ByPathModal ({ t, tReady, onCancel, onSubmit, className, ...props }) {
title={t('addByPathModal.title')}
description={getDescription()}
icon={Icon}
submitText={t('actions.add')}
submitText={t('actions.import')}
{...props}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Files screen', () => {
await page.goto(webuiUrl + '#/files')
})

const button = 'button[id="add-button"]'
const button = 'button[id="import-button"]'

it('should have the active Add menu', async () => {
await page.waitForSelector(button, { visible: true })
Expand Down