discourse/app/assets/javascripts/admin/addon/components
Loïc Guitaut 1166db12b4
FIX: Make watched words uploads work as intended (#17097)
* FIX: Make watched words uploads work as intended

Currently when we upload a file containing watched words, it will always
add the words to the action that was initially selected: this is the
`block` action by default but if changing manually the action in the URL
to `flag` for example, then this action will be selected and uploaded
watched words will be categorised as `flag` no matter what.

The problem lies with how the component works: it’s an Uppy object where
extra data is defined to provide an action key to the server but when
navigating to another listed action, while this action key is properly
updated on the component itself, the underlying Uppy object has already
been created and doesn’t care about the new value.

This patch solves this by using the `_perFileData` method instead of
`data`: the former is merged just before uploading a file whereas the
latter is used when the Uppy object is created.
2022-06-17 11:07:58 +02:00
..
report-filters DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
site-settings DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
ace-editor.js FEATURE: Automatic admin editor dark mode (#15419) 2021-12-29 11:02:37 -05:00
admin-backups-logs.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
admin-editable-field.js
admin-form-row.js
admin-graph.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
admin-nav.js
admin-penalty-history.js FEATURE: Penalty history improvements (#13359) 2021-07-12 11:36:56 -07:00
admin-report-chart.js DEV: drops jquery usage un admin-report-chart (#14661) 2021-10-20 14:28:49 +02:00
admin-report-counters.js
admin-report-counts.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-report-inline-table.js
admin-report-per-day-counts.js
admin-report-stacked-chart.js FIX: prepare data before creating chart to avoid side effect (#16570) 2022-04-27 14:04:09 +02:00
admin-report-storage-stats.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-report-table-cell.js UX: Add title attribute to reports cells (#15137) 2021-11-30 14:58:42 +03:00
admin-report-table-header.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-report-table-row.js
admin-report-table.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-report-trust-level-counts.js
admin-report.js FIX: ensures we don't apply charts options to other modes (#13570) 2021-06-29 21:58:35 +02:00
admin-theme-editor.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
admin-user-field-item.js REFACTOR: admin-user-field-item (#16499) 2022-04-19 13:31:43 +02:00
admin-watched-word.js FIX: only delete the word/phrase when the 'x' icon is clicked (#13547) 2021-06-28 15:14:18 +05:30
admin-web-hook-event-chooser.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-web-hook-event.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-web-hook-status.js DEV: Remove 'htmlSafe' string prototype extensions (#16766) 2022-05-13 14:58:26 -05:00
admin-wrapper.js FEATURE: Add `admin-area` class to HTML tag (#12459) 2021-03-22 11:36:26 +11:00
cancel-link.js
color-input.js FEATURE: Use native color-picker (#15748) 2022-02-01 11:18:13 -03:00
dashboard-new-features.js DEV: Fix set-after-destroy issues (#15078) 2021-11-24 20:13:52 +01:00
email-styles-editor.js UX: Allow saving with cmd+s/ctrl+s with Ace editor (#12674) 2021-05-04 12:56:10 +01:00
embeddable-host.js FIX: Display embeddable host's post to category. (#14517) 2021-10-05 13:59:27 -03:00
embedding-setting.js DEV: Remove 'dasherize' string prototype extensions (#16740) 2022-05-13 10:56:23 -05:00
emoji-value-list.js DEV: Added support for custom site setting 'emoji_list' (#12414) 2021-04-07 15:32:05 +02:00
flag-user-lists.js
highlighted-code.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
inline-edit-checkbox.js FIX: Checkbox value should not leak between themes (#11327) 2020-11-24 12:10:28 +02:00
install-theme-item.js
ip-lookup.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
moderation-history-item.js
penalty-post-action.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
permalink-form.js DEV: jquery removal/listeners/cleanup of permalink form (#14944) 2021-11-16 10:25:54 +01:00
screened-ip-address-form.js UX: Normalize sizing for inputs, buttons, dropdowns (#14226) 2021-09-09 11:01:56 -04:00
secret-value-list.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
silence-details.js
simple-list.js FEATURE: Ability to re-order value lists (#15775) 2022-02-03 22:47:02 +01:00
site-setting.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
site-text-summary.js DEV: Remove jQuery autoellipsis dependency (#15336) 2021-12-17 11:45:12 -05:00
staff-actions.js DEV: drops jquery/simplify code/removes leaked event (#14947) 2021-11-16 10:26:39 +01:00
suspension-details.js Fix typo (#13087) 2021-05-19 11:09:50 +10:00
tags-uploader.js FEATURE: Use uppy for tags uploader (#14821) 2021-11-08 08:18:09 +10:00
theme-setting-editor.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
theme-setting-relatives-selector.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
theme-translation.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
themes-list-item.js DEV: Remove jquery from themes list (#16980) 2022-06-02 16:01:24 -05:00
themes-list.js FEATURE: Add filter box to the themes/components list (#13767) 2021-07-19 09:33:58 +08:00
value-list.js FEATURE: Ability to re-order value lists (#15775) 2022-02-03 22:47:02 +01:00
watched-word-form.js DEV: Use `key` over the deprecated `keyCode` (#13795) 2021-08-09 11:41:36 +02:00
watched-word-uploader.js FIX: Make watched words uploads work as intended (#17097) 2022-06-17 11:07:58 +02:00