mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
feature: show message for empty provider files
cc @kvz @arturi
This commit is contained in:
parent
ff628b67ee
commit
b576dfe37a
5 changed files with 11 additions and 15 deletions
|
|
@ -33,7 +33,8 @@ class Uppy {
|
|||
uppyServerError: 'Connection with Uppy Server failed',
|
||||
failedToUpload: 'Failed to upload',
|
||||
noInternetConnection: 'No Internet connection',
|
||||
connectedToInternet: 'Connected to the Internet'
|
||||
connectedToInternet: 'Connected to the Internet',
|
||||
noFilesFound: 'You have no files or folders here'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
.uppy-Provider-auth,
|
||||
.uppy-Provider-error,
|
||||
.uppy-Provider-loading {
|
||||
.uppy-Provider-loading,
|
||||
.uppy-Provider-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ module.exports = (props) => {
|
|||
handleScroll: props.handleScroll,
|
||||
title: props.title,
|
||||
showTitles: props.showTitles,
|
||||
getItemId: props.getItemId
|
||||
getItemId: props.getItemId,
|
||||
i18n: props.i18n
|
||||
})}
|
||||
<button class="UppyButton--circular UppyButton--blue uppy-ProviderBrowser-doneBtn"
|
||||
type="button"
|
||||
|
|
|
|||
|
|
@ -2,17 +2,9 @@ const Row = require('./Item')
|
|||
const { h } = require('preact')
|
||||
|
||||
module.exports = (props) => {
|
||||
// const headers = props.columns.map((column) => {
|
||||
// return html`
|
||||
// <th class="uppy-ProviderBrowserTable-headerColumn uppy-ProviderBrowserTable-column" onclick=${props.sortByTitle}>
|
||||
// ${column.name}
|
||||
// </th>
|
||||
// `
|
||||
// })
|
||||
|
||||
// <thead class="uppy-ProviderBrowserTable-header">
|
||||
// <tr>${headers}</tr>
|
||||
// </thead>
|
||||
if (!props.folders.length && !props.files.length) {
|
||||
return <div class="uppy-Provider-empty">{props.i18n('noFilesFound')}</div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="uppy-ProviderBrowser-body">
|
||||
|
|
|
|||
|
|
@ -590,7 +590,8 @@ module.exports = class ProviderView {
|
|||
showTitles: this.opts.showTitles,
|
||||
showFilter: this.opts.showFilter,
|
||||
showBreadcrumbs: this.opts.showBreadcrumbs,
|
||||
pluginIcon: this.plugin.icon
|
||||
pluginIcon: this.plugin.icon,
|
||||
i18n: this.plugin.uppy.i18n
|
||||
})
|
||||
|
||||
return Browser(browserProps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue