Commit graph

29 commits

Author SHA1 Message Date
Merlijn Vos
1634263c6b
Use title consistently from locales (#5134) 2024-05-08 12:54:25 +02:00
Antoine du Hamel
00405fb24c
fix type imports (#5038)
We sometimes where importing source files, which may not be available in
production. Instead we should target extension-less paths in `lib/`
folders so the generated `.d.ts` files are used.
2024-03-27 14:32:45 +01:00
Merlijn Vos
59740ae808
@uppy/screen-capture: migrate to TS (#4965)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-03-07 11:28:16 +01:00
Antoine du Hamel
34c78e9093
meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
Alexander Zaytsev
2e596ca9a1
@uppy/dashboard: update provider icon style (#4345) 2023-03-07 16:24:48 +08:00
Artur Paikin
7c9e166401
Warn more instead of erroring (#4302) 2023-02-09 19:31:21 +00:00
Antoine du Hamel
386d72d9f4
@uppy/screen-capture: fix TODOs (#3930)
- rename `RecorderScreen` class file to match with the class name.
- rename `Stopwatch` -> `StopWatch` (PascalCase convention).
2022-08-02 14:54:37 +02:00
Artur Paikin
91e6ed2f99
@uppy/screen-capture: don't install when unsupported (#3795)
* Improve screen recording check: mediaDevices supprted on mobile, getDisplayMedia is not

* Update docs, mentioing getDisplayMedia
2022-05-30 16:49:00 +01:00
Antoine du Hamel
bddc49eebc
@uppy/screen-capture: refactor to ESM (#3698) 2022-05-11 10:07:40 +02:00
Merlijn Vos
00094af525
Refactor locale scripts & generate types and docs (#3276)
Closes #3232 

### Summary

- Create `locale.js` for every plugin instead of `this.defaultLocale` in the class
- Complete refactor of locale scripts
  - No dynamic plugin class imports with hacks to mimic the environment in order to get the `defaultLocale`.
  - Separate tests and build in separate files
  - Add two modes for test file, `unused` (fails hard) and `warnings`
- Generate docs
  - Use remark to cleanly mutate the file
  - Rename some doc files to match the plugin name (such as `statusbar` --> `status-bar`)
  - Comments in `locale.js` are kept and are present in the docs as well.
- Generate types
2021-11-10 11:43:04 +01:00
Artur Paikin
dbe3ed25b3
build: add stylelint (#3124)
* add stylelint with stylelint-config-standard

* autofix style issues

* fix more linting issues

* add stylelint-scss

* fix two more

* add stylelint-config-rational-order and autofix order

https://github.com/constverum/stylelint-config-rational-order
2021-08-24 01:37:57 +01:00
Antoine du Hamel
ec87b232e9
meta: enforce no-unused-vars linter rule (#3118)
* meta: enforce `no-unused-vars` linter rule

* meta: fix `@typescript-eslint/no-unused-vars` linter warnings

* meta: enforce `no-unused-expressions` lint rule

* @uppy/companion: fix `tsc` build
2021-08-23 13:10:17 +01:00
Antoine du Hamel
6b7ad5e7c7
Stricter linter (#3095)
* enforce some eslint rules

* enforce accessibility linter rules

* harden lint rules with only 1 or 2 warnings

* fix remaining rules with less than 3 warnings

* fix e2e tests

* fix remaining rules with less than 4 warnings

* fix remaining rules with less than 6 warnings

* fix `shuffleTaglines`

* fix companion build
2021-08-17 20:32:57 +02:00
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
Artur Paikin
d8190fa6d3 Update locale: remove unused strings 2021-07-29 13:31:14 +01:00
Merlijn Vos
f01538ba41
Resolve all type TODO's (#2963) 2021-07-20 14:40:31 +02:00
Antoine du Hamel
69397be5a0
expect built-in support for MediaDevices API (#2945)
https://caniuse.com/?search=mediadevices

IE users would need this polyfill:
https://github.com/mozdevs/mediaDevices-getUserMedia-polyfill
2021-06-28 11:46:38 +01:00
Merlijn Vos
ecec3d3213
Split Plugin into BasePlugin and extended UIPlugin (#2944) 2021-06-18 13:23:16 +02:00
Merlijn Vos
3b3e8a440c
Upgrade Preact to latest (#2926) 2021-06-16 12:46:19 +02:00
Merlijn Vos
cd3b3967da
Add preview for videos made with webcam (#2837)
* Add preview for videos made with webcam

* Update webcam and screen capture submit icon & fix prop typo

* Remove console.log

* Disable mirroring when showing recorded video

* Fix re-enable of mirroring

* Add discard button

* Don't forget to re-enable mirroring for discard button
2021-04-11 22:27:50 +01: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
Lea Anthony
9b749e6119
fix: translations for capturing (#2482) 2020-08-27 10:29:08 +02:00
Renée Kooi
335079d222
deps: upgrade ESLint to v7 (#2460) 2020-08-13 12:46:22 +02: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
Alexander Zaytsev
57da3a5a80
Dark mode design improvements (#2232)
* Modify highlight/link color

* Paler dashed outline

* Simpler input focus

* Tweak statuses' gray

* Tweak & fix :focus colors

* Swap TabBtn hover/focus colors

* Tweak dark focus outline

* Darker actionBtn

* Webcam button support

* Add isDraggingOver support

* Add ScreenCapture support

* ProviderBrowserItem-inner support

* Better fakeCheckbox support
2020-05-05 18:02:24 +02:00
Artur Paikin
908598c5d8
Fix build locales (#2221)
* add empty userAgent

//cc @MikeKovarik

* remove unused locale strings

* remove i18n from aws-s3 — it was unused?

/cc @goto-bus-stop
2020-04-23 11:54:07 +02:00
Renée Kooi
6072b1625f
screen-capture: add type tests (#2218) 2020-04-23 10:57:58 +02:00
Artur Paikin
a6c8ef15e1
ScreenCapture plugin for screenshots / screen recordings (#2132)
* Finnish locale semantics improved

* Finnish semantics improved

* Screen capture initial commit

* Fix. Removed audio constraint from video.

* ui improvements

* so Lerna doesn’t try to publish as private

* refactor, tweak icons

* remove commented code from webcam styles

* Check for MediaRecorder (hides button in Safari) and refactor everything

* update readme

* beta for now

Co-authored-by: Miika Jukakoski <miika.jukakoski@ourmind.io>
2020-04-21 20:47:20 +02:00