|
@@ -41,6 +41,14 @@ function prependPath (path, component) {
|
|
|
return `${path}/${component}`
|
|
|
}
|
|
|
|
|
|
+export function defaultPickerIcon () {
|
|
|
+ return (
|
|
|
+ <svg aria-hidden="true" focusable="false" width="30" height="30" viewBox="0 0 30 30">
|
|
|
+ <path d="M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z" />
|
|
|
+ </svg>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Class to easily generate generic views for Provider plugins
|
|
|
*/
|
|
@@ -453,11 +461,13 @@ export default class ProviderView extends View {
|
|
|
const { files, folders, filterInput, loading, currentSelection } = this.plugin.getPluginState()
|
|
|
const { isChecked, toggleCheckbox, recordShiftKeyPress, filterItems } = this
|
|
|
const hasInput = filterInput !== ''
|
|
|
+ const pluginIcon = this.plugin.icon || defaultPickerIcon
|
|
|
+
|
|
|
const headerProps = {
|
|
|
showBreadcrumbs: targetViewOptions.showBreadcrumbs,
|
|
|
getFolder: this.getFolder,
|
|
|
breadcrumbs: this.plugin.getPluginState().breadcrumbs,
|
|
|
- pluginIcon: this.plugin.icon,
|
|
|
+ pluginIcon,
|
|
|
title: this.plugin.title,
|
|
|
logout: this.logout,
|
|
|
username: this.username,
|
|
@@ -495,7 +505,7 @@ export default class ProviderView extends View {
|
|
|
viewType: targetViewOptions.viewType,
|
|
|
showTitles: targetViewOptions.showTitles,
|
|
|
showBreadcrumbs: targetViewOptions.showBreadcrumbs,
|
|
|
- pluginIcon: this.plugin.icon,
|
|
|
+ pluginIcon,
|
|
|
i18n: this.plugin.uppy.i18n,
|
|
|
uppyFiles: this.plugin.uppy.getFiles(),
|
|
|
validateRestrictions: (...args) => this.plugin.uppy.validateRestrictions(...args),
|
|
@@ -514,7 +524,7 @@ export default class ProviderView extends View {
|
|
|
<CloseWrapper onUnmount={this.clearSelection}>
|
|
|
<AuthView
|
|
|
pluginName={this.plugin.title}
|
|
|
- pluginIcon={this.plugin.icon}
|
|
|
+ pluginIcon={pluginIcon}
|
|
|
handleAuth={this.handleAuth}
|
|
|
i18n={this.plugin.uppy.i18n}
|
|
|
i18nArray={this.plugin.uppy.i18nArray}
|