Commit graph

17 commits

Author SHA1 Message Date
Artur Paikin
4ca78ab543
Set plugin titles from locale (#3023)
* What is happening "*"

* Instead of re-creating i18nInit, we could just make it part of the BasePlugin

* set plugin title and allow changing it from locale

* remove i18nInit method, since we now include it in BasePlugin

* All provider titles should come from locale

* Update en_US.js

* make translator private

//cc @aduh95

* init locale after calling setOptions

* Update en_US.js

* Update packages/@uppy/core/src/BasePlugin.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update packages/@uppy/core/src/index.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Bind `i18n` functions

* Remove duplicate i18nInit — it’s in BasePlugin already

* fix formatting

* fix name

* Update en_US.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-30 13:02:32 +01:00
Merlijn Vos
f01538ba41
Resolve all type TODO's (#2963) 2021-07-20 14:40:31 +02:00
Artur Paikin
ce959456ed
companion: Remove deprecated serverHeaders in favour of companionHeaders (#2995)
* remove deprecated serverHeaders in favour of companionHeaders

* remove TL_UPPY_SERVER and exports.UPPY_SERVER

@kvz @goto-bus-stop ok to do this already, right?
2021-07-08 18:10:14 +01:00
Merlijn Vos
ecec3d3213
Split Plugin into BasePlugin and extended UIPlugin (#2944) 2021-06-18 13:23:16 +02:00
Kevin van Zonneveld
764c2ccada
Update Linter (#2796)
* relocate .vscode

* Switch to transloadit linter

* Update .eslintrc.json

* autofix code

* unlink and install eslint-config-transloadit@1.1.1

* Change 0 to "off"

* Don't change 'use strict'

* Do not vertically align

* disable key-spacing

* add import/no-extraneous-dependencies per package

* add more react/a11y warnings

* Revert "autofix code"

This reverts commit 14c8a8cde8.

* add import/no-extraneous-dependencies per example and main package

* autofix code (2)

* Allow devDependencies in ./bin

* Change import/no-extraneous-dependencies to warn again

* upgrade linter

* Set import/no-extraneous-dependencies to warn
2021-03-15 16:25:17 +00:00
Artur Paikin
8a60cf160b
Add opts.disabled for the Dashboard (#2768)
* Introduce opts.disabled for the Dashboard

* Reduce opacity, disable user-select, set cursor

* Add classes to providers' background circles

So they can be grayscaled via css

* add disableAllFocusableElements and run it in afterUpdate hook, if needed

* increase opacity for readability

* Store previous tabindex value and use it when restoring (setting disable: false)

//cc @goto-bus-stop

* Add disabled docs

* add disabled option to website example

Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
2021-02-26 03:21:53 +00:00
Ifedapo .A. Olarewaju
c7b097cd90
companion: add support to allow custom oauth credentials at request time (#2622)
* companion: add support to allow custom oauth credentials at request time

other affected ackages: dropbox, google-drive, zoom, instagram, facebook, onedrive, provider-views

* companion: avoid re-using "state" value from previous oauth dance

* companion: fix tests

* companion: add test for preauth endpoint

* companion: document functions

* companion: add tests for oauth credentials fetcher module

* companion: rename "params" to "parameters" to avoid ambiguity with transloadit's API

* companion: fix typos

Co-authored-by: Renée Kooi <renee@kooi.me>

* companion-client: use qs-stringify for url queries

* companion-client: rename "credentialsRequestParams" -> "companionKeysParams"

Co-authored-by: Renée Kooi <renee@kooi.me>
2021-01-15 10:50:12 +01:00
Ifedapo .A. Olarewaju
3b5d19f363
companion-client: support options cookies send rule (#2618)
* companion-client: support options cookies send rule

fixes #2241

* companion-client: prefix cookiesSendRule option with "companion"

* companion-client: set "companionCookiesRule" as optional field
2021-01-12 14:54:36 +01:00
Ifedapo .A. Olarewaju
d586a4cf53
companion,unsplash: Unsplash provider (#2431)
* unsplash[wip]: implement unsplash provider + plugin

* unsplash,provider-views,companion-client: fully working unsplash plugin

* unsplash: clean up plugin implementation

* provider-views: refactor CloseWrapper

* companion-client: encode search text before adding it to URL

Co-authored-by: Renée Kooi <renee@kooi.me>

* companion: use object spread over Object.assign

Co-authored-by: Renée Kooi <renee@kooi.me>

* zoom: fix provider-view import

* circle icon

* update locale strings and package-lock

* move truncateString to @uppy/utils and use it for Unsplash name-description conversion, adding .jpg

* use alt_description if description in null

* companion: handle name truncation internally

* companion: handling carriage for truncation + fix urlmeta import

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-10-28 19:50:51 +01:00
Ifedapo .A. Olarewaju
69f653eb47
provider-views: handle all plugin state in provider-views (#2318)
other plugins concerned onedrive,dropbox,instagram,google-drive
2020-06-15 14:39:54 +01:00
Artur Paikin
68f36b1ac2
Refactor FileProgress component (#2303)
* refactor FileProgress component; pass hideCancelButton, hidePauseResumeButton and hideRetryButton

* move icons to where they are rendered, rename UppyIcon to uppy-u-icon

* cleanup: rename DashboardItem, remove xmlns

* update docs to specify the option also hides action button on each individual file
2020-06-06 04:10:01 +02:00
Artur Paikin
5079d98584
dashboard: 2020 redesign 🍿 (#2015)
* ProviderViews: Improve Instagram’s “video thumbnail”

* Update all provider icons to nicer round ones

* Change “drop files” copy depending on number of acquirers and Dashboard width

* Translator: support multiple components in options

When the source contains multiple placeholders for interpolation, we should ignore chunks that are not strings, because those can be JSX objects and will be otherwise incorrectly turned into strings.

Without this condition we’d get this: [object Object] hello [object Object] my <button>

* Remove unused locale strings

* Rever renderSingleInlineProvider, use Browse button instead of link, tweak styles

* Try “Browse My Device” button

* Introduce “Dark Mode“: new Dashboard option 'theme': 'light', 'dark' or 'auto'

* Refactor to also add uninstall/removeListener for the darkModeMediaQuery; remove all bindings in favor of class properties

* More dark mode styles: Providers, FileCard, tweaking focus, inputs, etc

* My Device: mobile and desktop icons

* add isMobileDevice capability, very simple detection

* More dark mode styles

* refactor

* switch back to single simple my device icon

* chrome 78 for android doesn’t support document.querySelector 👌

* nobr --> span white-space: nowrap

* Major style tweaks for mobile provider list, show dashed borders only when DnD is supported

* Add color after “import from”

just for Russian for now, because I’m thinking if this should be a part of the language string or html? @goto-bus-stop @kvz, what do you think?

* improve isMobileDevice, add tests

* don’t set the isMobileDevice capability in core for now

* add checks for typeof window !== 'undefined', otherwise fails in Node/RN

* update locales

* refactor renderDropFilesSubtitle
2020-03-24 18:05:11 +01:00
ifedapoolarewaju
83ec63efb2
providers: remove redundant use of options 2020-01-31 14:54:13 +01:00
ifedapoolarewaju
c2e3e1b611
facebook, provider-views: support grid view for facebook 2019-10-14 04:50:51 +03:00
Renée Kooi
733de659da
Upgrade standard to v14 (#1860)
* Update eslint dependencies.

* standard --fix

* build: disable handler name lint rule

* status-bar: manually fix lint errors

* webcam: manually fix lint errors

* url: manually fix lint errors

* react-native: manually fix lint errors

* dashboard: manually fix lint errors

* informer: manually fix linting errors

* progress-bar: manually fix lint errors

* provider-views: manually fix lint errors

* redux-dev-tools: manually fix lint errors

* build: disable buggy no-unused-vars rule

* examples: manually fix lint errors

* ` quotes for code things, ' for text things
2019-10-09 14:53:02 +02:00
Renée Kooi
d6d4b05425
companion-client: rename serverHeaders to companionHeaders (#1861) 2019-10-09 14:34:52 +02:00
ifedapoolarewaju
c3ea4d384f
companion,facebook: add support for facebook provider 2019-08-22 14:50:48 +01:00