{props.i18n('importFrom', { name: props.activePickerPanel.name })}
-
+ onclick={props.hideAllPanels}
+ >{props.i18n('done')}
+
{props.getPlugin(props.activePickerPanel.id).render(props.state)}
diff --git a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js
index abea2bd3b9..e5fd46206a 100644
--- a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js
+++ b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js
@@ -78,36 +78,36 @@ function PanelTopBar (props) {
return (
- { // always on the left
- !props.isAllComplete
- ?
- :
- }
+ {!props.isAllComplete ? (
+
+ ) : (
+
+ )}
- { // always on the right
- allowNewUpload
- ?
- :
- }
+ {allowNewUpload ? (
+
+ ) : (
+
+ )}
)
}
diff --git a/packages/@uppy/dashboard/src/components/icons.js b/packages/@uppy/dashboard/src/components/icons.js
index 453416ef2a..ab3223c1cc 100644
--- a/packages/@uppy/dashboard/src/components/icons.js
+++ b/packages/@uppy/dashboard/src/components/icons.js
@@ -3,111 +3,143 @@ const { h } = require('preact')
// https://css-tricks.com/creating-svg-icon-system-react/
function defaultPickerIcon () {
- return
+ return (
+
+ )
}
function iconCopy () {
- return
+ return (
+
+ )
}
function iconResume () {
- return
+ return (
+
+ )
}
function iconPause () {
- return
+ return (
+
+ )
}
function localIcon () {
- return
+ return (
+
+ )
}
function iconRetry () {
- return
+ return (
+
+ )
}
function checkIcon () {
- return
+ return (
+
+ )
}
function iconAudio () {
- return
+ return (
+
+ )
}
function iconVideo () {
- return
+ return (
+
+ )
}
function iconPDF () {
- return
+ return (
+
+ )
}
function iconFile () {
- return
+ return (
+
+ )
}
function iconText () {
- return
+ return (
+
+ )
}
function iconCopyLink () {
- return
+ return (
+
+ )
}
function iconPencil () {
- return
+ return (
+
+ )
}
function iconCross () {
- return
+ return (
+
+ )
}
function iconPlus () {
- return
+ return (
+
+ )
}
module.exports = {
diff --git a/packages/@uppy/dashboard/src/utils/createSuperFocus.js b/packages/@uppy/dashboard/src/utils/createSuperFocus.js
index e5dfe17052..72c2301ed7 100644
--- a/packages/@uppy/dashboard/src/utils/createSuperFocus.js
+++ b/packages/@uppy/dashboard/src/utils/createSuperFocus.js
@@ -19,7 +19,7 @@ module.exports = function createSuperFocus () {
// [Practical check] without this line, typing in the search input in googledrive overlay won't work.
if (isFocusInOverlay && lastFocusWasOnSuperFocusableEl) return
- const superFocusableEl = overlayEl.querySelector(`[data-uppy-super-focusable]`)
+ const superFocusableEl = overlayEl.querySelector('[data-uppy-super-focusable]')
// If we are already in the topmost overlay, AND there are no super focusable elements yet, - leave focus up to the user.
// [Practical check] without this line, if you are in an empty folder in google drive, and something's uploading in the bg, - focus will be jumping to Done all the time.
if (isFocusInOverlay && !superFocusableEl) return
diff --git a/packages/@uppy/drag-drop/src/index.js b/packages/@uppy/drag-drop/src/index.js
index 98d72abe94..2697183abf 100644
--- a/packages/@uppy/drag-drop/src/index.js
+++ b/packages/@uppy/drag-drop/src/index.js
@@ -139,7 +139,8 @@ module.exports = class DragDrop extends Plugin {
name={this.opts.inputName}
multiple={restrictions.maxNumberOfFiles !== 1}
accept={restrictions.allowedFileTypes}
- onchange={this.handleInputChange} />
+ onchange={this.handleInputChange}
+ />
)
}
@@ -189,7 +190,8 @@ module.exports = class DragDrop extends Plugin {
onClick={() => this.fileInputRef.click()}
onDragOver={this.handleDragOver}
onDragLeave={this.handleDragLeave}
- onDrop={this.handleDrop} >
+ onDrop={this.handleDrop}
+ >
{this.renderHiddenFileInput()}
{this.renderArrowSvg()}
diff --git a/packages/@uppy/facebook/src/index.js b/packages/@uppy/facebook/src/index.js
index ef0d88eb76..e53b28841e 100644
--- a/packages/@uppy/facebook/src/index.js
+++ b/packages/@uppy/facebook/src/index.js
@@ -12,14 +12,20 @@ module.exports = class Facebook extends Plugin {
Provider.initPlugin(this, opts)
this.title = this.opts.title || 'Facebook'
this.icon = () => (
-
)
diff --git a/packages/@uppy/file-input/src/index.js b/packages/@uppy/file-input/src/index.js
index 5954b6459a..6fa1f2790b 100644
--- a/packages/@uppy/file-input/src/index.js
+++ b/packages/@uppy/file-input/src/index.js
@@ -90,21 +90,24 @@ module.exports = class FileInput extends Plugin {
return (
- { this.input = input }} />
+ ref={(input) => { this.input = input }}
+ />
{this.opts.pretty &&
-
- }
+ }
)
}
diff --git a/packages/@uppy/informer/src/index.js b/packages/@uppy/informer/src/index.js
index 0d2f7abf20..646ca8088a 100644
--- a/packages/@uppy/informer/src/index.js
+++ b/packages/@uppy/informer/src/index.js
@@ -30,17 +30,23 @@ module.exports = class Informer extends Plugin {
const { isHidden, message, details } = state.info
return (
-
- { props.showFilter &&
}
+ {props.showFilter &&
}
- this.props.filterQuery(e)}
- value={this.props.filterInput} />
-
- { this.props.filterInput &&
-
- }
-
+ return (
+
+
this.props.filterQuery(e)}
+ value={this.props.filterInput}
+ />
+
+ {this.props.filterInput && (
+
+ )}
+
+ )
}
}
diff --git a/packages/@uppy/provider-views/src/FooterActions.js b/packages/@uppy/provider-views/src/FooterActions.js
index fa00e654ab..d26a282f8c 100644
--- a/packages/@uppy/provider-views/src/FooterActions.js
+++ b/packages/@uppy/provider-views/src/FooterActions.js
@@ -1,14 +1,16 @@
const { h } = require('preact')
module.exports = (props) => {
- return
+ return (
+
+ )
}
diff --git a/packages/@uppy/provider-views/src/Item/components/GridLi.js b/packages/@uppy/provider-views/src/Item/components/GridLi.js
index 096b85e052..8bb98a0cae 100644
--- a/packages/@uppy/provider-views/src/Item/components/GridLi.js
+++ b/packages/@uppy/provider-views/src/Item/components/GridLi.js
@@ -2,21 +2,23 @@ const { h } = require('preact')
// it could be a
module.exports = (props) => {
- return
-
-
+ role="option"
+ aria-label={props.isChecked ? props.i18n('unselectFileNamed', { name: props.title }) : props.i18n('selectFileNamed', { name: props.title })}
+ aria-selected={props.isChecked}
+ aria-disabled={props.isDisabled}
+ data-uppy-super-focusable
+ >
+ {props.itemIconEl}
+ {props.showTitles && props.title}
+
+
+ )
}
diff --git a/packages/@uppy/provider-views/src/Item/components/ItemIcon.js b/packages/@uppy/provider-views/src/Item/components/ItemIcon.js
index 4252220231..406723f60d 100644
--- a/packages/@uppy/provider-views/src/Item/components/ItemIcon.js
+++ b/packages/@uppy/provider-views/src/Item/components/ItemIcon.js
@@ -1,21 +1,40 @@
const { h } = require('preact')
+function FileIcon () {
+ return (
+
+ )
+}
+
+function FolderIcon () {
+ return (
+
+ )
+}
+
+function VideoIcon () {
+ return (
+
+ )
+}
+
module.exports = (props) => {
if (props.itemIconString === null) return
switch (props.itemIconString) {
case 'file':
- return
+ return
case 'folder':
- return
+ return
case 'video':
- return
+ return
default:
return
}
diff --git a/packages/@uppy/provider-views/src/Item/components/ListLi.js b/packages/@uppy/provider-views/src/Item/components/ListLi.js
index 4716772513..844615e258 100644
--- a/packages/@uppy/provider-views/src/Item/components/ListLi.js
+++ b/packages/@uppy/provider-views/src/Item/components/ListLi.js
@@ -23,29 +23,30 @@ const getAriaLabelOfCheckbox = (props) => {
// + checkbox (selects file)
// + file name (selects file)
module.exports = (props) => {
- return
-
- id={props.id}
- role="option"
- aria-label={getAriaLabelOfCheckbox(props)}
- aria-selected={props.isChecked}
- aria-disabled={props.isDisabled}
- data-uppy-super-focusable
- />
+ return (
+
+
+ id={props.id}
+ role="option"
+ aria-label={getAriaLabelOfCheckbox(props)}
+ aria-selected={props.isChecked}
+ aria-disabled={props.isDisabled}
+ data-uppy-super-focusable
+ />
- {
- props.type === 'file'
+ {props.type === 'file' ? (
// label for a checkbox
- ?
+ )}
+
+ )
}
diff --git a/packages/@uppy/provider-views/src/ItemList.js b/packages/@uppy/provider-views/src/ItemList.js
index 1f88b0fba2..1d773d0649 100644
--- a/packages/@uppy/provider-views/src/ItemList.js
+++ b/packages/@uppy/provider-views/src/ItemList.js
@@ -20,11 +20,13 @@ module.exports = (props) => {
return (
-
not focusable for firefox
- tabindex="-1">
+ tabindex="-1"
+ >
{props.folders.map(folder =>
Item({
...getSharedProps(folder, props),
diff --git a/packages/@uppy/provider-views/src/Loader.js b/packages/@uppy/provider-views/src/Loader.js
index 03b8fd6475..83d629ae2a 100644
--- a/packages/@uppy/provider-views/src/Loader.js
+++ b/packages/@uppy/provider-views/src/Loader.js
@@ -1,7 +1,9 @@
const { h } = require('preact')
module.exports = (props) => {
- return
- {props.i18n('loading')}
-
+ return (
+
+ {props.i18n('loading')}
+
+ )
}
diff --git a/packages/@uppy/provider-views/src/index.js b/packages/@uppy/provider-views/src/index.js
index 63a644bde9..0b22685a4e 100644
--- a/packages/@uppy/provider-views/src/index.js
+++ b/packages/@uppy/provider-views/src/index.js
@@ -41,7 +41,8 @@ module.exports = class ProviderView {
static VERSION = require('../package.json').version
/**
- * @param {object} instance of the plugin
+ * @param {object} plugin instance of the plugin
+ * @param {object} opts
*/
constructor (plugin, opts) {
this.plugin = plugin
@@ -586,7 +587,8 @@ module.exports = class ProviderView {
pluginIcon={this.plugin.icon}
handleAuth={this.handleAuth}
i18n={this.plugin.uppy.i18n}
- i18nArray={this.plugin.uppy.i18nArray} />
+ i18nArray={this.plugin.uppy.i18nArray}
+ />
)
}
diff --git a/packages/@uppy/react-native/file-picker/index.js b/packages/@uppy/react-native/file-picker/index.js
index 27b811d4fd..afc81c5273 100644
--- a/packages/@uppy/react-native/file-picker/index.js
+++ b/packages/@uppy/react-native/file-picker/index.js
@@ -4,7 +4,8 @@ import {
Modal,
Text,
ScrollView,
- TouchableOpacity } from 'react-native'
+ TouchableOpacity
+} from 'react-native'
import takePicture from './takePicture'
import selectImage from './selectImage'
import selectDocument from './selectDocument'
@@ -104,20 +105,23 @@ export default class UppyReactNativeFilePicker extends React.Component {
renderSourceList () {
return (
+ contentContainerStyle={styles.providerList}
+ >
{this.state.providers.map((item, index) => {
return (
this.chooseProvider(item.id)}>
+ onPress={ev => this.chooseProvider(item.id)}
+ >
{item.title}
)
})}
this.props.onRequestClose()}>
+ onPress={ev => this.props.onRequestClose()}
+ >
Cancel
@@ -131,9 +135,10 @@ export default class UppyReactNativeFilePicker extends React.Component {
transparent={false}
visible={this.props.show}
supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']}
- onRequestClose={this.props.onRequestClose}>
- {this.state.openProvider
- ?
+ {this.state.openProvider ? (
+ {
@@ -142,9 +147,11 @@ export default class UppyReactNativeFilePicker extends React.Component {
})
this.props.onRequestClose()
}}
- {...this.props} />
- : this.renderSourceList()
- }
+ {...this.props}
+ />
+ ) : (
+ this.renderSourceList()
+ )}
)
}
diff --git a/packages/@uppy/react-native/file-picker/instagram.js b/packages/@uppy/react-native/file-picker/instagram.js
index 1805b68ef6..2372dc80a6 100644
--- a/packages/@uppy/react-native/file-picker/instagram.js
+++ b/packages/@uppy/react-native/file-picker/instagram.js
@@ -4,7 +4,8 @@ import {
View,
FlatList,
Image,
- WebView } from 'react-native'
+ WebView
+} from 'react-native'
import Instagram from '@uppy/instagram'
function getQueryParamValueFromUrl (name, url) {
@@ -78,18 +79,20 @@ export default class UppyRNInstagram extends React.Component {
renderInstagram () {
console.log(this.state.authUrl)
- return {
- const url = ev.url
- const token = getQueryParamValueFromUrl('uppyAuthToken', url)
- console.log(token)
- this.plugin.provider.setAuthToken(token)
- console.log(this.plugin.provider.list('recent'))
- // return this.renderGrid(this.state.instagram.items)
- }}
- />
+ return (
+ {
+ const url = ev.url
+ const token = getQueryParamValueFromUrl('uppyAuthToken', url)
+ console.log(token)
+ this.plugin.provider.setAuthToken(token)
+ console.log(this.plugin.provider.list('recent'))
+ // return this.renderGrid(this.state.instagram.items)
+ }}
+ />
+ )
}
render () {
diff --git a/packages/@uppy/react-native/file-picker/url.js b/packages/@uppy/react-native/file-picker/url.js
index d6dc3de8dc..a836a97850 100644
--- a/packages/@uppy/react-native/file-picker/url.js
+++ b/packages/@uppy/react-native/file-picker/url.js
@@ -5,7 +5,8 @@ import {
TouchableOpacity,
Text,
TextInput,
- View } from 'react-native'
+ View
+} from 'react-native'
import Url from '@uppy/url'
export default class UppyRNUrl extends React.Component {
@@ -58,12 +59,14 @@ export default class UppyRNUrl extends React.Component {
/>
+ onPress={this.onPressImport}
+ >
Import
this.props.onDone()}>
+ onPress={ev => this.props.onDone()}
+ >
Cancel
diff --git a/packages/@uppy/redux-dev-tools/src/index.js b/packages/@uppy/redux-dev-tools/src/index.js
index a44f00425d..fe6673f912 100644
--- a/packages/@uppy/redux-dev-tools/src/index.js
+++ b/packages/@uppy/redux-dev-tools/src/index.js
@@ -40,11 +40,12 @@ module.exports = class ReduxDevTools extends Plugin {
case 'RESET':
this.uppy.reset()
return
- case 'IMPORT_STATE':
+ case 'IMPORT_STATE': {
const computedStates = message.payload.nextLiftedState.computedStates
this.uppy.store.state = Object.assign({}, this.uppy.getState(), computedStates[computedStates.length - 1].state)
this.uppy.updateAll(this.uppy.getState())
return
+ }
case 'JUMP_TO_STATE':
case 'JUMP_TO_ACTION':
this.uppy.store.state = Object.assign({}, this.uppy.getState(), JSON.parse(message.state))
diff --git a/packages/@uppy/status-bar/src/StatusBar.js b/packages/@uppy/status-bar/src/StatusBar.js
index 55edf8141a..2750f68645 100644
--- a/packages/@uppy/status-bar/src/StatusBar.js
+++ b/packages/@uppy/status-bar/src/StatusBar.js
@@ -52,7 +52,8 @@ function togglePauseResume (props) {
module.exports = (props) => {
props = props || {}
- const { newFiles,
+ const {
+ newFiles,
allowNewUpload,
isUploadInProgress,
isAllPaused,
@@ -61,7 +62,8 @@ module.exports = (props) => {
hideUploadButton,
hidePauseResumeButton,
hideCancelButton,
- hideRetryButton } = props
+ hideRetryButton
+ } = props
const uploadState = props.uploadState
@@ -120,18 +122,20 @@ module.exports = (props) => {
return (
-
+ aria-valuenow={progressValue}
+ />
{progressBarContent}
- { showUploadBtn ?
: null }
- { showRetryBtn ?
: null }
- { showPauseResumeBtn ?
: null }
- { showCancelBtn ?
: null }
+ {showUploadBtn ?
: null}
+ {showRetryBtn ?
: null}
+ {showPauseResumeBtn ?
: null}
+ {showCancelBtn ?
: null}
)
@@ -146,23 +150,28 @@ const UploadBtn = (props) => {
{ 'uppy-c-btn-primary': props.uploadState === statusBarStates.STATE_WAITING }
)
- return
- {props.newFiles && props.isUploadStarted
- ? props.i18n('uploadXNewFiles', { smart_count: props.newFiles })
- : props.i18n('uploadXFiles', { smart_count: props.newFiles })
- }
-
+ return (
+
+ {props.newFiles && props.isUploadStarted
+ ? props.i18n('uploadXNewFiles', { smart_count: props.newFiles })
+ : props.i18n('uploadXFiles', { smart_count: props.newFiles })}
+
+ )
}
const RetryBtn = (props) => {
return (
-
+ data-uppy-super-focusable
+ >
@@ -172,64 +181,75 @@ const RetryBtn = (props) => {
}
const CancelBtn = (props) => {
- return
-
-
+ return (
+
+
+
+ )
}
const PauseResumeButton = (props) => {
const { isAllPaused, i18n } = props
const title = isAllPaused ? i18n('resume') : i18n('pause')
- return togglePauseResume(props)}
- data-uppy-super-focusable>
- {isAllPaused
- ?
- :
- }
-
+ return (
+ togglePauseResume(props)}
+ data-uppy-super-focusable
+ >
+ {isAllPaused ? (
+
+ ) : (
+
+ )}
+
+ )
}
const LoadingSpinner = () => {
- return
+ return (
+
+ )
}
const ProgressBarProcessing = (props) => {
const value = Math.round(props.value * 100)
- return
-
- {props.mode === 'determinate' ? `${value}% \u00B7 ` : ''}
- {props.message}
-
+ return (
+
+
+ {props.mode === 'determinate' ? `${value}% \u00B7 ` : ''}
+ {props.message}
+
+ )
}
const renderDot = () =>
@@ -238,43 +258,47 @@ const renderDot = () =>
const ProgressDetails = (props) => {
const ifShowFilesUploadedOfTotal = props.numUploads > 1
- return
- {
- ifShowFilesUploadedOfTotal &&
- props.i18n('filesUploadedOfTotal', {
- complete: props.complete,
- smart_count: props.numUploads
- })
- }
-
- {/* When should we render this dot?
- 1. .-additionalInfo is shown (happens only on desktops)
- 2. AND 'filesUploadedOfTotal' was shown
- */}
- {ifShowFilesUploadedOfTotal && renderDot()}
-
+ return (
+
{
- props.i18n('dataUploadedOfTotal', {
- complete: prettyBytes(props.totalUploadedSize),
- total: prettyBytes(props.totalSize)
+ ifShowFilesUploadedOfTotal &&
+ props.i18n('filesUploadedOfTotal', {
+ complete: props.complete,
+ smart_count: props.numUploads
})
}
+
+ {/* When should we render this dot?
+ 1. .-additionalInfo is shown (happens only on desktops)
+ 2. AND 'filesUploadedOfTotal' was shown
+ */}
+ {ifShowFilesUploadedOfTotal && renderDot()}
+
+ {
+ props.i18n('dataUploadedOfTotal', {
+ complete: prettyBytes(props.totalUploadedSize),
+ total: prettyBytes(props.totalSize)
+ })
+ }
- {renderDot()}
+ {renderDot()}
- {
- props.i18n('xTimeLeft', {
- time: prettyETA(props.totalETA)
- })
- }
-
-
+ {
+ props.i18n('xTimeLeft', {
+ time: prettyETA(props.totalETA)
+ })
+ }
+
+
+ )
}
const UnknownProgressDetails = (props) => {
- return
- { props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads }) }
-
+ return (
+
+ {props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads })}
+
+ )
}
const UploadNewlyAddedFiles = (props) => {
@@ -285,17 +309,21 @@ const UploadNewlyAddedFiles = (props) => {
'uppy-StatusBar-actionBtn--uploadNewlyAdded'
)
- return
-
- { props.i18n('xMoreFilesAdded', { smart_count: props.newFiles }) }
+ return (
+
+
+ {props.i18n('xMoreFilesAdded', { smart_count: props.newFiles })}
+
+
+ {props.i18n('upload')}
+
-
- {props.i18n('upload')}
-
-
+ )
}
const ThrottledProgressDetails = throttle(ProgressDetails, 500, { leading: true, trailing: true })
@@ -310,16 +338,15 @@ const ProgressBarUploading = (props) => {
return (
- { !props.isAllPaused ?
: null }
+ {!props.isAllPaused ?
: null}
{props.supportsUploadProgress ? `${title}: ${props.totalProgress}%` : title}
- { !props.isAllPaused && !showUploadNewlyAddedFiles && props.showProgressDetails
+ {!props.isAllPaused && !showUploadNewlyAddedFiles && props.showProgressDetails
? (props.supportsUploadProgress ?
:
)
- : null
- }
- { showUploadNewlyAddedFiles ?
: null }
+ : null}
+ {showUploadNewlyAddedFiles ?
: null}
)
@@ -354,11 +381,15 @@ const ProgressBarError = ({ error, retryAll, hideRetryButton, i18n }) => {
{/* {!hideRetryButton &&
{i18n('pleasePressRetry')}
} */}
-
?
+ role="tooltip"
+ >
+ ?
+
)
}
diff --git a/packages/@uppy/tus/src/index.js b/packages/@uppy/tus/src/index.js
index d197a70608..c6122b1fdb 100644
--- a/packages/@uppy/tus/src/index.js
+++ b/packages/@uppy/tus/src/index.js
@@ -66,6 +66,7 @@ module.exports = class Tus extends Plugin {
/**
* Simultaneous upload limiting is shared across all uploads with this plugin.
+ *
* @type {RateLimitedQueue}
*/
this.requests = new RateLimitedQueue(this.opts.limit)
@@ -293,7 +294,7 @@ module.exports = class Tus extends Plugin {
* @param {UppyFile} file for use with upload
* @param {number} current file in a queue
* @param {number} total number of files in a queue
- * @return {Promise}
+ * @returns {Promise}
*/
uploadRemote (file, current, total) {
this.resetUploaderReferences(file.id)
diff --git a/packages/@uppy/url/src/UrlUI.js b/packages/@uppy/url/src/UrlUI.js
index 61e6af53ce..b9321b86f8 100644
--- a/packages/@uppy/url/src/UrlUI.js
+++ b/packages/@uppy/url/src/UrlUI.js
@@ -22,22 +22,26 @@ class UrlUI extends Component {
}
render () {
- return
- { this.input = input }}
- data-uppy-super-focusable />
-
- {this.props.i18n('import')}
-
-
+ return (
+
+ { this.input = input }}
+ data-uppy-super-focusable
+ />
+
+ {this.props.i18n('import')}
+
+
+ )
}
}
diff --git a/packages/@uppy/url/src/index.js b/packages/@uppy/url/src/index.js
index e77c1a6f6a..421d51daf1 100644
--- a/packages/@uppy/url/src/index.js
+++ b/packages/@uppy/url/src/index.js
@@ -5,6 +5,14 @@ const { RequestClient } = require('@uppy/companion-client')
const UrlUI = require('./UrlUI.js')
const forEachDroppedOrPastedUrl = require('./utils/forEachDroppedOrPastedUrl')
+function UrlIcon () {
+ return (
+
+ )
+}
+
/**
* Url
*
@@ -17,9 +25,7 @@ module.exports = class Url extends Plugin {
this.id = this.opts.id || 'Url'
this.title = this.opts.title || 'Link'
this.type = 'acquirer'
- this.icon = () =>
+ this.icon = () =>
// Set default options and locale
this.defaultLocale = {
@@ -162,9 +168,7 @@ module.exports = class Url extends Plugin {
}
render (state) {
- return
+ return
}
install () {
diff --git a/packages/@uppy/webcam/src/CameraIcon.js b/packages/@uppy/webcam/src/CameraIcon.js
index 81a02b9f07..08f8b6965a 100644
--- a/packages/@uppy/webcam/src/CameraIcon.js
+++ b/packages/@uppy/webcam/src/CameraIcon.js
@@ -1,7 +1,9 @@
const { h } = require('preact')
module.exports = (props) => {
- return
+ return (
+
+ )
}
diff --git a/packages/@uppy/webcam/src/RecordButton.js b/packages/@uppy/webcam/src/RecordButton.js
index c5a4ec6e76..ebfe0fd470 100644
--- a/packages/@uppy/webcam/src/RecordButton.js
+++ b/packages/@uppy/webcam/src/RecordButton.js
@@ -3,12 +3,14 @@ const { h } = require('preact')
module.exports = function RecordButton ({ recording, onStartRecording, onStopRecording, i18n }) {
if (recording) {
return (
-
+ data-uppy-super-focusable
+ >
@@ -17,12 +19,14 @@ module.exports = function RecordButton ({ recording, onStartRecording, onStopRec
}
return (
-
+ data-uppy-super-focusable
+ >
diff --git a/packages/@uppy/webcam/src/SnapshotButton.js b/packages/@uppy/webcam/src/SnapshotButton.js
index 65f0de652e..4b63f9a607 100644
--- a/packages/@uppy/webcam/src/SnapshotButton.js
+++ b/packages/@uppy/webcam/src/SnapshotButton.js
@@ -3,12 +3,14 @@ const CameraIcon = require('./CameraIcon')
module.exports = ({ onSnapshot, i18n }) => {
return (
-
+ data-uppy-super-focusable
+ >
{CameraIcon()}
)
diff --git a/packages/@uppy/webcam/src/index.js b/packages/@uppy/webcam/src/index.js
index 2878812d05..b2a6a9941d 100644
--- a/packages/@uppy/webcam/src/index.js
+++ b/packages/@uppy/webcam/src/index.js
@@ -345,24 +345,27 @@ module.exports = class Webcam extends Plugin {
const webcamState = this.getPluginState()
if (!webcamState.cameraReady) {
- return
+ return (
+
+ )
}
- return
+ return (
+
+ )
}
install () {
diff --git a/test/endtoend/transloadit/test.js b/test/endtoend/transloadit/test.js
index 2e4f764092..e648bf9081 100644
--- a/test/endtoend/transloadit/test.js
+++ b/test/endtoend/transloadit/test.js
@@ -40,7 +40,7 @@ describe('Transloadit file processing', () => {
selectFakeFile,
'uppyTransloadit',
path.basename(img), // name
- `image/jpeg`, // type
+ 'image/jpeg', // type
fs.readFileSync(img, 'base64') // b64
)
// browser.execute(selectFakeFile, 'uppyTransloadit')
diff --git a/test/endtoend/utils.js b/test/endtoend/utils.js
index ddb9883f07..e3050e61ce 100644
--- a/test/endtoend/utils.js
+++ b/test/endtoend/utils.js
@@ -159,7 +159,7 @@ class TusService {
const proxy = httpProxy.createProxyServer()
this.slowServer = http.createServer((req, res) => {
proxy.web(req, res, {
- target: `http://localhost:1080`,
+ target: 'http://localhost:1080',
// 200 kbps max upload, checking the rate limit every 20ms
buffer: req.pipe(brake({
period: 20,
diff --git a/website/inject.js b/website/inject.js
index 77d1bd0875..a3cec47377 100644
--- a/website/inject.js
+++ b/website/inject.js
@@ -156,8 +156,8 @@ async function injectGhStars () {
async function injectMarkdown () {
const sources = {
- '.github/ISSUE_TEMPLATE/integration_help.md': `src/_template/integration_help.md`,
- '.github/CONTRIBUTING.md': `src/_template/contributing.md`
+ '.github/ISSUE_TEMPLATE/integration_help.md': 'src/_template/integration_help.md',
+ '.github/CONTRIBUTING.md': 'src/_template/contributing.md'
}
for (const src in sources) {
@@ -173,9 +173,9 @@ async function injectMarkdown () {
let content = `\n\n`
content += parts.join('---\n')
fs.writeFileSync(dstpath, content, 'utf-8')
- console.info(chalk.green(`✓ injected: `), chalk.grey(srcpath))
+ console.info(chalk.green('✓ injected: '), chalk.grey(srcpath))
}
- touch(path.join(webRoot, `/src/support.md`))
+ touch(path.join(webRoot, '/src/support.md'))
}
function injectLocaleList () {
@@ -215,7 +215,7 @@ function injectLocaleList () {
const dstpath = path.join(webRoot, 'src', '_template', 'list_of_locale_packs.md')
fs.writeFileSync(dstpath, resultingMdTable, 'utf-8')
- console.info(chalk.green(`✓ injected: `), chalk.grey(dstpath))
+ console.info(chalk.green('✓ injected: '), chalk.grey(dstpath))
}
async function readConfig () {
diff --git a/website/scripts/highlight.js b/website/scripts/highlight.js
index 7375ebbe64..24b0162b4c 100644
--- a/website/scripts/highlight.js
+++ b/website/scripts/highlight.js
@@ -17,7 +17,7 @@ const unhighlightedCodeRx = /([\s\S]*?)<\/code><\/pr
function highlight (lang, code) {
const startTag = ``
+ const endTag = '
'
let parsedCode = ''
if (Prism.languages[lang]) {
parsedCode = Prism.highlight(code, Prism.languages[lang])