Compare commits

...
804 Commits
Author SHA1 Message Date
Kim Gardner 049357a09c Bump version 4.8.1 (#2218) 2019-03-07 16:00:18 +00:00
Wyatt Johnson 5e7fe7cf5a fix: upgrade passport-google-oauth2 (#2217)
- Fixes #2215
2019-03-07 01:12:08 +00:00
Kim Gardner 6243fcba91 Merge pull request #2212 from vittoboa/italian-translation
Italian translation
2019-03-04 11:53:41 -05:00
vittoboa 805825e5d2 Fix typo 2019-03-02 22:42:13 +01:00
vittoboa a40e721a68 Fix typo 2019-03-02 22:38:16 +01:00
vittoboa 1dd8d0a706 Add italian translation for plugins 2019-03-02 22:33:52 +01:00
Leandro da1a8bb539 Remove duplicate placeholder proptype. (#2211) 2019-03-01 19:34:24 +01:00
Kim Gardner 18add4cdea Merge pull request #2210 from sanoma/feature/talk_470_dutch_translations
Feature/talk 470 dutch translations
2019-02-28 12:28:17 -05:00
Kim Gardner de5de26c82 Merge branch 'master' into feature/talk_470_dutch_translations 2019-02-28 11:09:19 -05:00
Besma 934e4b4754 Replace email with e-mail for Dutch translation consistency 2019-02-27 10:11:39 +01:00
Kim Gardner 049658508c Merge pull request #2206 from coralproject/bump-version-4-8-0
v4.8.0
2019-02-26 17:03:38 -05:00
Kim Gardner f0ead66f68 v4.8.0 2019-02-26 14:30:35 -05:00
David Burke 14f1343930 Additional Replies Increment (#2203)
* added ADDTL_REPLIES_ON_LOAD_MORE variable

* feat: added docs and onbuild ref
2019-02-26 16:18:55 +00:00
Besma b21845b963 Update translations 2019-02-26 09:39:54 +01:00
Kim Gardner 0ff20bed5e Merge pull request #2201 from mazzi/fix/issue-2141
Suspended vs. Banned  translations and typos in Spanish fixed
2019-02-25 17:33:27 -05:00
Besma 0bb2d4cbca Add Dutch translation 2019-02-25 16:18:33 +01:00
Lautaro Mazzitelli 927a34a579 ci: quotation not needed 2019-02-22 17:37:38 -03:00
Lautaro Mazzitelli 75f2f05534 fix: Suspended vs. Banned. Fixed in spanish translations. 2019-02-22 17:21:56 -03:00
Lautaro Mazzitelli 2998db46ad fix: three different typos were fixed on spanish translation file. 2019-02-22 16:21:02 -03:00
Gerardo Gálvez 8163b52301 Flag users as "Always premoderate" (#2145)
* Flag users as "Always premoderate"

Status can be set using the action dropdown in the People tab and in User Details.
Users flagged as "Always premoderate" will have their comments sent to the premod queue.
Users can be filtered with the Always Premoderate status.
Include Always Premoderate status changes in User History.
Add spanish translations.

* Reorder CSS as per cvle's suggestion

* Address second comment
2019-02-13 20:08:22 +01:00
Kim Gardner 19b425dc1a Merge pull request #2182 from mkonikov/snackbar-improvements
Snackbar improvements
2019-02-13 13:57:35 -05:00
Kim Gardner be81ced2f5 Merge branch 'master' into snackbar-improvements 2019-02-13 11:42:57 -05:00
Kim Gardner f6e5f24722 Merge pull request #2189 from javierbarriosafonso/master
Spanish (es) translations for talk notifications plugins
2019-02-13 11:42:48 -05:00
Kim Gardner 2c1dc9c118 Merge branch 'master' into master 2019-02-13 11:34:21 -05:00
Steven 657bf388cf fix: rename devToolsExtension (#2192)
Note that starting from v2.7, window.devToolsExtension was renamed to window.__REDUX_DEVTOOLS_EXTENSION__ / window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__.
2019-02-12 17:12:29 +01:00
Javier Barrios b3412a46cf Spanish (es) translations for talk notifications plugins 2019-02-11 14:08:31 -03:00
Mendel Konikov c6ee54c2f5 Rename classes to match id 2019-02-08 10:46:32 -05:00
Mendel Konikov 174a80c377 Reorder style as previous 2019-02-08 10:34:40 -05:00
Mendel Konikov 17a05059d9 Add working close button and style 2019-02-08 10:31:57 -05:00
Mendel Konikov 8c53c25a89 Merge branch 'master' of github.com:mkonikov/talk into snackbar-improvements 2019-02-08 09:15:07 -05:00
Mendel Konikov 1928a7b02e Create Moderation actions notification plugin (#2175)
* Create Moderation actions plugin

* Clarify env var in readme

* Reword log message

* Update with suggestion from Wyatt

* Whitelist notification types

* Update messaging

* Rename unpublished to pending
2019-02-07 15:20:44 +01:00
immber 5173af2a27 talk-plugin-toxic-comments - ADD MODEL VARIABLE TO TOXIC COMMENTS (#2178)
* updated readme

* added config var TALK_PERSPECTIVE_MODEL

* fixed duplication on readme

* fixed link on readme

* fix: applied some changes
2019-02-07 00:22:10 +00:00
Kim Gardner 9077f31872 Merge pull request #2179 from mkonikov/patch-1
Break word on long description
2019-02-06 18:14:51 -05:00
Mendel Konikov 51e8035533 Break word on long description
Also fix font size
2019-02-06 11:40:51 -05:00
Wyatt Johnson 94786c2711 fix: repairs poor performance for assets (#2174)
- fixes #2158
2019-02-05 22:06:05 +01:00
Nacho Toledo 456abaf862 Update appropriate <section> class in Profile section (#2170)
* Update appropriate <section> class in user profile section

Download my comment history has `talk-plugin-ignore-user-section` class. Should be `talk-plugin-profile-data--download-my-comment-history` (couldn't figure out the proper naming convention used).

* Fix linting error

* Fix lint second try
2019-02-05 16:49:25 +01:00
Kim Gardner fe9f92d3fc Merge pull request #2165 from mkonikov/hebrew
Add Hebrew Language Support
2019-02-04 17:37:46 -05:00
Kim Gardner a49fbf2d05 Yml fix 2019-02-04 17:16:15 -05:00
Kim Gardner 51bb158446 Merge branch 'master' into hebrew 2019-02-04 15:52:14 -05:00
Kim Gardner d601bd1466 Merge pull request #2177 from coralproject/remove-pt-link
Update Readme
2019-02-04 15:51:53 -05:00
immber 8eb8294987 Merge branch 'master' into remove-pt-link 2019-02-04 12:08:11 -08:00
Kim Gardner 99332323a8 Merge branch 'master' into hebrew 2019-02-04 14:52:29 -05:00
Kim Gardner 1a23cc1fa7 Merge pull request #2159 from mkonikov/fix-ios-copy
Fix Permalink copy on iOS
2019-02-04 19:48:38 +00:00
Kim Gardner 798f55ed79 Merge branch 'master' into hebrew 2019-02-04 19:47:24 +00:00
Kim Gardner 6897c0e18d Merge branch 'master' into fix-ios-copy 2019-02-04 19:34:31 +00:00
Kim Gardner 9d7b9a91cd Merge pull request #2153 from ljubar/master
sr_ME translations (Montenegrin version of Serbian language, Latin letters)
2019-02-04 19:32:56 +00:00
Kim Gardner 51a62b8c26 Merge branch 'master' into master 2019-02-04 19:28:23 +00:00
Kim Gardner f11a51ebfc Update Readme 2019-02-04 12:56:50 -05:00
Kim Gardner dbdf38af73 Merge branch 'master' into hebrew 2019-02-04 17:30:32 +00:00
Mendel Konikov abc1664ef7 WIP: Snackbar close 2019-01-31 09:59:58 -05:00
immber c16514502c Update recommended release version to link (#2168)
* Update recommended release version to 4.7

* update release link on readme!
2019-01-29 20:41:26 +00:00
Mendel Konikov 9d3e3ce45d Add additional Hebrew translations 2019-01-27 21:59:38 -05:00
Mendel Konikov f6bfef3fb5 Sort Translations ABC, Add missing Hebrew 2019-01-27 21:31:51 -05:00
Mendel Konikov 9b0173e6bf Add few more translations 2019-01-26 21:41:02 -05:00
Mendel Konikov 43219eed4b Replace quote marks 2019-01-24 22:32:50 -05:00
Mendel Konikov 9300359ed1 Merge branch 'master' of github.com:coralproject/talk into hebrew 2019-01-24 22:31:15 -05:00
Mendel Konikov 80c3367259 Merge branch 'master' into fix-ios-copy 2019-01-24 13:58:22 -05:00
Andrew Losowsky ef731f719d added Vox Media link (#2161) 2019-01-24 18:11:04 +00:00
Kim Gardner 9c09509a08 Merge pull request #2163 from mkonikov/fix-typo
Fix typo for Asset URL translation
2019-01-23 20:10:58 +00:00
Mendel Konikov 313310a097 Fix typo 2019-01-23 00:55:23 -05:00
Mendel Konikov fa42c028df Fix quotes 2019-01-23 00:45:31 -05:00
Mendel Konikov 905e43e745 Remove deleted plugin 2019-01-23 00:41:29 -05:00
Mendel Konikov 6cc0c60ade Add Final hebrew translations 2019-01-23 00:38:53 -05:00
Mendel Konikov ca44588095 Add Hebrew profile translations - server 2019-01-22 23:38:10 -05:00
Mendel Konikov 9a49044030 Add client profile translations 2019-01-22 23:30:39 -05:00
Mendel Konikov 02963dc5ac Fix translation 2019-01-22 23:18:18 -05:00
Mendel Konikov 5ad90e00cb Add Hebrew to profile plugin 2019-01-22 23:16:09 -05:00
Mendel Konikov 1dfc4b83c7 Remove unnecessary diffs 2019-01-22 23:11:25 -05:00
Mendel Konikov d522a72d42 Add additional hebrew 2019-01-22 23:09:30 -05:00
Mendel Konikov d1a22f9dc8 Remove merge comments 2019-01-22 22:10:53 -05:00
Mendel Konikov 5ac3910687 Fix lint 2019-01-22 22:08:29 -05:00
Mendel Konikov d007c2295e Fix Permalink copy on iOS 2019-01-21 17:15:16 -05:00
Kim Gardner 7ebcc4c793 Merge pull request #2157 from coralproject/docs-update
added native comments pdf
2019-01-18 19:41:19 +00:00
immber 582d45bb21 moved pdf to wp and updated copy 2019-01-17 09:56:55 -08:00
immber 6ef5c3a42f added link to sidebar 2019-01-16 14:29:35 -08:00
immber 00883a3739 added link to sidebar 2019-01-16 14:25:52 -08:00
immber d7fb0056be added native comments pdf 2019-01-16 14:16:04 -08:00
Kim Gardner ad55d715f6 Merge branch 'master' into master 2019-01-16 21:24:52 +00:00
Kim Gardner 0a855cd3d4 Merge pull request #2154 from coralproject/losowsky-patch-1
Fixed blog url
2019-01-16 21:24:18 +00:00
Andrew Losowsky c02d2b9b4e Fixed blog url 2019-01-16 10:46:49 -05:00
Kim Gardner 68255bec70 Merge branch 'master' into master 2019-01-16 14:44:51 +00:00
immber 28edd98ff1 Merge pull request #2151 from coralproject/docs-update
added TALK_CONCURRENCY to adv config
2019-01-14 13:53:12 -08:00
immber d1b5409e44 Merge branch 'master' into docs-update 2019-01-14 13:46:43 -08:00
Wyatt Johnsonandimmber df5e863cc4 updated default phrasing to be consistent
Co-Authored-By: immber <jessiekrushing@gmail.com>
2019-01-14 13:45:28 -08:00
immber acc83e27ce added TALK_CONCURRENCY to adv config 2019-01-14 10:37:36 -08:00
Kim Gardner ca13fde87d Merge pull request #2148 from coralproject/docs-update
Docs update
2019-01-11 15:46:35 +00:00
immber f69a9c826d removed link to community from faq 2019-01-10 17:04:22 -08:00
immber 76ef0f7d52 pulled community link from readme 2019-01-10 10:55:20 -08:00
immber 8f54c1d3c3 fixed md typo 2019-01-09 12:38:33 -08:00
immber 83379b58a7 em that can not be opted out of 2019-01-08 16:46:49 -08:00
immber b0b5807c8b added scaling talk 2019-01-08 16:39:06 -08:00
immber c98d227411 updated notifications page 2019-01-08 15:12:44 -08:00
immber 83819df922 added talk-plugin-comment-count to plugins directory 2019-01-08 13:27:08 -08:00
immber db5bf9a676 added twitter faq 2019-01-08 10:04:39 -08:00
immber ba31dbbdf9 added logout wait time 2019-01-08 09:53:46 -08:00
immber 8f633fbe78 added comment count to checklist 2019-01-04 17:20:49 -08:00
immber 886222260d fb requires ssl 2019-01-04 16:55:56 -08:00
immber 2c3589cdac added cert to auth section 2019-01-04 16:49:16 -08:00
Ljuba Rankovic ed953b5e7e Change translation 2018-12-24 15:41:05 +01:00
Ljuba Rankovic 79d1f059c2 fixes 2018-12-22 16:34:16 +01:00
Kim Gardner dd0601a801 Merge pull request #2135 from coralproject/concurrency
Concurrency
2018-12-19 20:53:30 +00:00
Wyatt Johnson 9f7d485871 Update package.json 2018-12-19 20:39:25 +00:00
Wyatt Johnson ec816636e6 feat: added concurrency features 2018-12-19 12:40:08 -07:00
Kim Gardner 08f579225b Bump version 4.6.11 (#2130) 2018-12-17 16:34:43 +00:00
Kim Gardner 46987b6303 Merge pull request #2122 from oafx/oafx/qbb-localization
Add localization for QuestionBoxBuilder
2018-12-17 15:09:31 +00:00
Kim Gardner c2d07ec79f Merge branch 'master' into oafx/qbb-localization 2018-12-17 14:43:32 +00:00
Kim Gardner a98f5ef980 Merge pull request #2128 from oafx/oafx/fix/moderate-commentcontainer-wordbreak
fix minor ui/css bug in moderation/comment component caused by long links
2018-12-17 14:42:54 +00:00
Christian Ruttorf d6515e23f8 fix ui/css bug in moderation/comment component caused by long words/links 2018-12-16 08:48:21 +01:00
Ljuba Rankovic 282db6847a locale sr added 2018-12-15 09:40:53 +01:00
immber a3db05845d Merge pull request #2126 from coralproject/docs-update
Add Documentation Redirect - asset management to cms integration
2018-12-14 13:06:59 -08:00
Wyatt Johnson c8fc419cec Update _redirects 2018-12-14 20:46:57 +00:00
immber 677c8a0828 Merge branch 'master' into docs-update 2018-12-14 12:06:22 -08:00
immber 08146fd979 added redirect 2018-12-14 12:04:28 -08:00
Kim Gardner ab92fe3fe8 Merge branch 'master' into oafx/qbb-localization 2018-12-14 18:18:33 +00:00
immber 95435f0793 Docs update (#2120)
* merging in typo fixes from docs (rtd) branch

* revert generateIntrospectionResult.json

* revert git ignore

* added asset mgmt to prelaunch checklist

* updated cusotm plugin docker onbuild instructions

* add google to auth options

* add google to auth options

* added yarn watch to from source

* added dev links to quickstart

* typo on following

* fixed typos

* fixing links

* added lazy render and updated lazy load

* added version note

* renamed asset management to cms-integration

* added link to asset scraping
2018-12-14 17:05:52 +00:00
immber 7eed540671 added link to asset scraping 2018-12-13 13:10:14 -08:00
immber 374951bd33 renamed asset management to cms-integration 2018-12-13 13:04:01 -08:00
immber 42a694f56e Merge branch 'master' of https://github.com/coralproject/talk into docs-update 2018-12-13 12:52:18 -08:00
immber 1c997aea31 Merge branch 'docs-update' of https://github.com/coralproject/talk into docs-update 2018-12-13 12:51:58 -08:00
immber 44830f6cb1 added version note 2018-12-13 12:51:50 -08:00
Wyatt Johnson 22d263c6d2 Embed Optimizations (#2121)
* feat: refactored bridge

- Cleaned up implementation of bridge
- Removed unneeded babel-polyfill and webpack globals

* fix: fixed up some static headers

- bumped version

* fix: moved intersection observer out of chunk

* fix: fixed misplaced "!"
2018-12-13 20:41:40 +00:00
Christian Ruttorf 78ba82cc05 add localization for QuestionBoxBuilder title, add PropTypes for QuestionBoxBuilder 2018-12-13 17:42:50 +01:00
immber a6b9cc57ac Merge branch 'master' into docs-update 2018-12-12 12:46:04 -08:00
immber cd9cb56844 added lazy render and updated lazy load 2018-12-12 12:44:19 -08:00
Wyatt Johnson d331bdee18 fix: fixed misplaced "!" 2018-12-12 12:59:54 -07:00
Wyatt Johnson d6f6fbcd9c CDN + Observabilities fixes (#2119)
* feat: added heroku fixes

- Support pulling the request id from the request
  headers
- Add proper cache headers to static files

* Update package.json
2018-12-12 18:45:50 +00:00
immber 1ed5df71da fix bug in cli-setup (#2116)
* fix bug in cli-setup

* fix cli setup bug

* fix: fixed password bug
2018-12-12 00:20:16 +00:00
immber 8b1b61f695 pulling changes from upstream 2018-12-10 14:26:58 -08:00
Kim Gardner f1a3a5ca28 Lazy Load Fix (#2110)
* Bump version 4.6.8

* fix: added JS fix for static URL's
2018-12-06 22:45:52 +00:00
Wyatt Johnson 8ef44dc6f5 fix: dep order 2018-12-06 14:41:39 -07:00
Kiwi 362f29f77e Support lazy rendering (#2109)
* feat: support lazy rendering

* fix: added new env var to onbuild args

* review: apply suggestions
2018-12-06 21:24:31 +00:00
immber 08d342ea2e Docs update (#2105)
* merging in typo fixes from docs (rtd) branch

* revert generateIntrospectionResult.json

* revert git ignore

* added asset mgmt to prelaunch checklist

* updated cusotm plugin docker onbuild instructions

* add google to auth options

* add google to auth options

* added yarn watch to from source

* added dev links to quickstart

* typo on following

* fixed typos

* fixing links
2018-12-03 19:47:46 +00:00
immber 99777d6b49 fixing links 2018-12-03 11:07:40 -08:00
immber 6f6da1fa25 merging changes from master 2018-12-03 09:34:25 -08:00
immber 2fac304163 fixed typos 2018-12-03 09:33:03 -08:00
immber 5ca7c092db Merge branch 'master' into docs-update 2018-11-30 18:05:35 -08:00
immber cfae6b5374 typo on following 2018-11-30 18:04:20 -08:00
immber 3668a2cffa added dev links to quickstart 2018-11-30 17:56:20 -08:00
immber 92681f52aa added yarn watch to from source 2018-11-30 17:39:02 -08:00
immber 847ded5bb4 add google to auth options 2018-11-30 17:19:27 -08:00
immber 76c959f790 add google to auth options 2018-11-30 17:11:42 -08:00
immber 4659392ad3 updated cusotm plugin docker onbuild instructions 2018-11-30 15:10:00 -08:00
immber e9cec73966 added asset mgmt to prelaunch checklist 2018-11-30 14:44:35 -08:00
immber bac0ee9c3b revert git ignore 2018-11-28 14:00:07 -08:00
immber 5ae293af89 revert generateIntrospectionResult.json 2018-11-28 13:58:56 -08:00
immber cce464b82a merging in typo fixes from docs (rtd) branch 2018-11-28 13:56:31 -08:00
Kim Gardner 5d32c4ec03 Merge pull request #2097 from richardvenneman/nl-talk-plugins
Add/fix Dutch (nl_NL) translations for Talk plugins
2018-11-28 18:01:22 +00:00
Kim Gardner 50d4e2bb9b Merge branch 'master' into nl-talk-plugins 2018-11-27 21:08:22 +00:00
Richard Venneman debdd3eae4 Fix nl typo 2018-11-27 16:56:56 -04:00
Richard Venneman 286d9baddf Update Dutch (nl_NL) translations for talk-plugin-love 2018-11-27 16:56:49 -04:00
Richard Venneman 9c06a63afd Add Dutch (nl_NL) translations for talk notifications plugins 2018-11-27 16:55:32 -04:00
Richard Venneman f38e72c4df Add Dutch (nl_NL) translations for talk-plugin-google-auth 2018-11-27 16:32:36 -04:00
Richard Venneman e2fac4a2dc Fix and update talk-plugin-auth Dutch (nl_NL) translations 2018-11-27 16:30:42 -04:00
Richard Venneman ba0513fd6c Fix talk-plugin-member-since Dutch (nl_NL) translation
Member != User
2018-11-27 16:22:00 -04:00
Richard Venneman 8e29f0094c Add Dutch (nl_NL) translations for talk-plugin-facebook-auth 2018-11-27 16:20:39 -04:00
Kim Gardner f60c7e3ca6 Version 4.6.7 (#2096) 2018-11-27 20:20:00 +00:00
Richard Venneman b3c034d89d Add Dutch (nl_NL) translation for talk-plugin-local-auth 2018-11-27 16:16:34 -04:00
Kim Gardner be2657eb30 Merge pull request #2095 from richardvenneman/update-nl-translations
Update Dutch (nl_NL) translations
2018-11-27 19:39:16 +00:00
Richard Venneman fd32d2aa24 Merge branch 'master' into update-nl-translations 2018-11-27 15:29:05 -04:00
Richard Venneman 809b39ae2a Update Dutch (nl_NL) translations 2018-11-27 15:25:14 -04:00
Kim Gardner 6197981480 Merge pull request #2092 from coralproject/sp-trans-4
Fixed Sp translations
2018-11-27 18:39:51 +00:00
Kim Gardner eb58dd52f8 Fixed Sp translations 2018-11-26 15:25:44 +00:00
Kim Gardner f5c011f44b Merge pull request #2077 from coralproject/ie11-fixes
Fix IE11 issues in Admin
2018-11-16 12:59:04 -05:00
Chi Vinh Le 396ccbd6c2 fix: workaround flexbox bug in IE11 2018-11-15 23:51:28 +01:00
Chi Vinh Le 4fd61b3731 fix: polyfill missing forEach for NodeLists in IE11 2018-11-15 23:51:14 +01:00
Kim Gardner cbd795dc95 Merge pull request #2073 from coralproject/sp-trans-3
Add Spanish translations for blank comment history
2018-11-09 16:18:02 -05:00
Kim Gardner 65a6b484a9 Add Spanish translations for blank comment history 2018-11-09 10:00:53 -05:00
Kim Gardner 45c193b9bf Merge pull request #2069 from coralproject/wyattjoh-patch-1
Toxic Comments Fix
2018-11-08 11:53:41 -05:00
Wyatt Johnson ed037f8461 Merge branch 'master' into wyattjoh-patch-1 2018-11-08 16:00:46 +00:00
Kim Gardner 7bb0c73ee4 Merge pull request #2070 from coralproject/add-email-iframe-size
Fix add email dialog cutoff
2018-11-08 10:33:43 -05:00
Chi Vinh Le f13654b297 fix: lint 2018-11-08 16:04:16 +00:00
Chi Vinh Le 4a165c0972 fix: ensure iframe is big enough for add email dialog 2018-11-08 15:58:26 +00:00
Wyatt Johnson bbf034a595 Update ToxicDetail.js 2018-11-07 22:27:48 +00:00
Kim Gardner 9f6ddd3801 Version 4.6.6 (#2066) 2018-11-07 18:31:06 +00:00
Kim Gardner 34184d07eb Merge pull request #2065 from coralproject/button-trans-es
Fix button translation
2018-11-06 20:32:26 +00:00
Kim Gardner 057d083341 Merge branch 'master' into button-trans-es 2018-11-06 20:07:35 +00:00
Kim Gardner c5f107a168 Merge pull request #2067 from coralproject/perspective-feedback
Perspective Feedback
2018-11-06 20:05:32 +00:00
Wyatt Johnson 17a801d6d2 fix: removed url parsing 2018-11-06 13:02:20 -07:00
Kim Gardner 888a61f895 Merge branch 'master' into perspective-feedback 2018-11-06 19:56:31 +00:00
Wyatt Johnson 9edf1d7c41 feat: added perspective feedback 2018-11-06 12:39:16 -07:00
Kim Gardner b802fdd5eb Merge pull request #2061 from coralproject/display-avatar-left
Display avatar on the left
2018-11-06 19:31:16 +00:00
Kim Gardner 1a7b3fe903 Fix button translation 2018-11-06 13:50:31 -05:00
Kiwi cadbbd0b5c Merge branch 'master' into display-avatar-left 2018-11-02 00:09:03 +01:00
Chi Vinh Le b6101b880d fix: show avatar on the left 2018-11-02 00:01:46 +01:00
immber afb9fdcdc1 Merge pull request #2060 from coralproject/losowsky-patch-1
Updated text
2018-11-01 12:22:26 -07:00
Andrew Losowsky 53abb65da1 Updated text
- updated User Drawer information
- updated Shortcuts information
- changed the order
2018-11-01 15:08:08 -04:00
immber 7b5192d40c Merge pull request #2045 from coralproject/moderation-docs
updated mod queues documentation
2018-11-01 09:23:40 -07:00
Wyatt Johnson 8fdea8734a Merge branch 'master' into moderation-docs 2018-11-01 16:03:14 +00:00
Kim Gardner 588fbb0eb9 Merge pull request #2036 from tanhengyeow/cli-tools
Document CLI tools as many people don't know about this #1941
2018-10-30 18:29:08 +00:00
Kim Gardner a28024dfed Revert CSS from #1990 2018-10-30 18:18:35 +00:00
Kim Gardner 343eb3e8b6 Merge branch 'master' into cli-tools 2018-10-30 18:17:27 +00:00
Kim Gardner 80319f9aca Merge pull request #2047 from coralproject/sp-trans-1
Spanish translation tweak #1
2018-10-30 18:16:59 +00:00
Kim Gardner 33e1e5e729 Merge branch 'master' into sp-trans-1 2018-10-30 18:08:26 +00:00
Kim Gardner ea2b2bc2e3 Merge pull request #2032 from vittoboa/italian-translation
Add italian translation
2018-10-30 18:08:15 +00:00
Kim Gardner 6ca2f21bc2 Merge branch 'master' into italian-translation 2018-10-30 18:01:25 +00:00
Kim Gardner 0d9b795740 Merge pull request #2051 from coralproject/edit-link-trans
i18n support for Edit link
2018-10-30 18:00:54 +00:00
Kim Gardner 73482d68ac Merge branch 'master' into italian-translation 2018-10-30 17:55:43 +00:00
Wyatt Johnson e837dfc3c1 Merge branch 'master' into edit-link-trans 2018-10-30 17:54:37 +00:00
Kim Gardner 2cd9a71d62 i18n support for Edit link 2018-10-30 17:40:45 +00:00
Wyatt Johnson ad73fcd94b fix: fixed typo (#2049) 2018-10-30 17:31:32 +00:00
Wyatt Johnson 66145d6fd5 Merge branch 'master' into sp-trans-1 2018-10-30 17:06:44 +00:00
Wyatt Johnson 7d246bba76 Metadata Scraper Debugger (#2048)
* feat: added asset scrape debugger

* fix: added docs for scraper

* fix: added asset scraping to sidebar
2018-10-30 17:02:33 +00:00
Kim Gardner 0ce0d57a96 Spanish translation tweak #1 2018-10-30 15:45:26 +00:00
Kim Gardner 792bc713f2 Merge branch 'master' into italian-translation 2018-10-30 15:35:53 +00:00
Kim Gardner 399f5ef7ba Merge pull request #2046 from kant/patch-1
Typo on #77
2018-10-30 15:34:17 +00:00
Darío Hereñú 14c0945687 Typo on #77
* plus some other typos found (and fixed)
2018-10-30 11:01:23 -03:00
immber 52f2f48385 updated mod queues documentation 2018-10-29 16:05:26 -07:00
Andrew Losowsky e52605e26b removed Reliable/Unreliable flaggers (#2043)
We don't display this any more
2018-10-29 16:29:13 +00:00
Andrew Losowsky ae4d6e2424 Updated Tag text (#2042) 2018-10-29 16:12:17 +00:00
Kiwi 968d20e744 Merge pull request #2018 from coralproject/admin-improvements
Consistency Improvements
2018-10-26 20:28:19 +02:00
Kiwi 49d2416172 Merge branch 'master' into admin-improvements 2018-10-26 20:08:24 +02:00
Parikshit Hooda aac7cae6d6 typo fix : whih to which (#2039)
typo fix : whih to which
2018-10-26 17:22:19 +00:00
Kim Gardner f4fd843efe Merge pull request #1963 from twosmalltrees/1920
Update text and description in moderation configure view
2018-10-26 10:58:36 +01:00
Heng Yeow c4de69218c Update _config.yml 2018-10-26 13:55:30 +08:00
Heng Yeow 94ae029a4a Create 02-03-cli-tools.md 2018-10-26 13:54:37 +08:00
Kim Gardner 1dc1f91b72 Merge branch 'master' into 1920 2018-10-25 21:00:47 +01:00
Kiwi c98216cf3c Merge branch 'master' into admin-improvements 2018-10-25 21:58:16 +02:00
Kim Gardner 2c9f8586d3 Merge pull request #2035 from coralproject/fix-pointer-events
Fix pointer events in configure card
2018-10-25 20:55:03 +01:00
Chi Vinh Le 4ce5d97e3b Always have pointer events in configure cards 2018-10-25 21:42:18 +02:00
Wyatt Johnson 3ea2632187 Merge branch 'master' into admin-improvements 2018-10-25 17:57:24 +00:00
vittoboa c9b709ad43 Add italian translation 2018-10-25 09:34:33 +02:00
Kim Gardner dcd7145510 Update Spanish translations (#2019)
* Update translations

* More sp trans

* Add translation for Contains Link
2018-10-24 11:58:42 -06:00
Kim Gardner d3896ed97d Merge pull request #2016 from hovoodd/stream-status
Fixed stream status updating
2018-10-24 17:39:22 +01:00
Kim Gardner 47a3cba5f5 Merge branch 'master' into stream-status 2018-10-24 13:57:53 +01:00
Kim Gardner 0f1cabe126 Merge pull request #2017 from iSasFTW/master
Visible validation errors in the username change box
2018-10-24 13:56:52 +01:00
Saska Kolehmainen 5f62083c2f Merge branch 'master' into master 2018-10-23 20:53:52 +03:00
Wyatt Johnson 3cabe50a7b fix: strip out 0xAD from the comment body before testing for links 2018-10-23 11:06:31 -06:00
Kim Gardner c0efc33044 Merge branch 'master' into stream-status 2018-10-23 17:47:48 +01:00
Kim Gardner 9344c1bc80 Merge pull request #2015 from hovoodd/change-username
Added additional check for `usernameCanBeUpdated` condition in profile
2018-10-23 17:47:37 +01:00
Kim Gardner 1bfe0fbac1 Merge branch 'master' into change-username 2018-10-23 17:41:10 +01:00
Kim Gardner b3d704be76 Merge branch 'master' into 1920 2018-10-23 17:23:11 +01:00
Kim Gardner 3c100160fb Merge pull request #2014 from hovoodd/collapsible-list
Made Banned/Suspended Word Lists collapsible in Admin > Configure
2018-10-23 16:19:23 +01:00
Wyatt Johnson 49c7d2eeda fix: move priority up for token fetching 2018-10-22 12:25:20 -06:00
Wyatt Johnson cff9b29a36 fix: adjust perspective defaults when failure occurs 2018-10-22 12:22:01 -06:00
Wyatt Johnson 5a1f93975c feat: added support for access_token hash passthrough 2018-10-22 12:13:15 -06:00
Wyatt Johnson cd6da751a6 fix: added patch to reset form 2018-10-22 12:12:35 -06:00
Saska Kolehmainen 41610ccf57 Added error message to profile tab in embedded comments for when disallowed characters are added while changing the username. 2018-10-21 17:45:54 +03:00
hovoodd 607a59ad63 Fix stream status updating 2018-10-20 22:59:13 +03:00
hovoodd c0fea4821b Add additional check for usernameCanBeUpdated condition in profile 2018-10-20 22:05:32 +03:00
hovoodd 8432df15a1 Add collapsible prop to banned and suspended lists in admin 2018-10-20 19:07:56 +03:00
hovoodd 61486caa9e Make ConfigureCard collapsible 2018-10-20 19:01:01 +03:00
Harrison Reid 7f45f7e2e2 Add Code of Conduct Link 2018-10-20 08:43:13 +11:00
Kim Gardner 9e511817a8 Merge pull request #1990 from snorremd/master
Display avatar left of comments by default
2018-10-19 19:51:21 +01:00
Kim Gardner 4015e19040 Merge branch 'master' into master 2018-10-19 19:47:36 +01:00
Kim Gardner c1fcc82b62 Merge pull request #2006 from twosmalltrees/1939
Keep Question Box visible after stream is closed #1939
2018-10-19 19:47:10 +01:00
Kim Gardner 893c8d32b2 Merge branch 'master' into 1920 2018-10-19 19:07:59 +01:00
Kim Gardner 2dfadebd42 Merge branch 'master' into 1939 2018-10-19 18:45:46 +01:00
Kim Gardner a2d5af1372 Merge pull request #2007 from coralproject/base64-secret
Base64 Secret Encoding
2018-10-19 18:45:12 +01:00
Kim Gardner 7a5416a807 Merge branch 'master' into base64-secret 2018-10-19 18:39:36 +01:00
Kim Gardner 8c2c632f52 Merge pull request #2011 from coralproject/email-prefix
Email Prefix Fix
2018-10-19 18:39:02 +01:00
Wyatt Johnson fabec2c89b review: fix invalid substring 2018-10-19 16:28:13 +00:00
Wyatt Johnson 7f18603fd5 fix: fixes #2009 2018-10-19 10:05:05 -06:00
Kim Gardner 3a69e0cf96 Merge branch 'master' into base64-secret 2018-10-18 21:53:43 +01:00
Wyatt Johnson 7ad3d247b5 feat: added base64 secret encoding 2018-10-18 14:33:45 -06:00
Harrison Reid 130dc578b3 Refactor Stream component, move QuestionBox render logic into seperate fn 2018-10-18 21:25:36 +11:00
Harrison Reid fd7114ab2a Keep question box visible when comment stream is closed 2018-10-18 21:06:00 +11:00
immber 5e4bdf1f0c Perspective (#2001)
* perspective documentation update

* fixed typo
2018-10-16 20:25:11 +00:00
immber 71e1b69afe perspective documentation update (#1999) 2018-10-16 18:35:10 +00:00
Kim Gardner 6fa18f6c7c Merge branch 'master' into 1920 2018-10-15 16:52:37 +01:00
Kim Gardner bda9b55562 Merge branch 'master' into master 2018-10-15 16:50:42 +01:00
Kim Gardner d843320c4a Merge pull request #1976 from brycekahle/fix-admin-menu-visibility
do not show admin drawer unless user has access
2018-10-15 16:50:30 +01:00
Kim Gardner 8a88228d9c Merge branch 'master' into 1920 2018-10-12 18:57:35 +01:00
Kim Gardner 0a9664d464 Merge branch 'master' into fix-admin-menu-visibility 2018-10-12 18:53:09 +01:00
Kim Gardner b3749b9332 Merge pull request #1961 from hovoodd/master
Added filters to Admin > Community > People
2018-10-12 18:48:55 +01:00
Kim Gardner aecb7de019 Add Spanish translations 2018-10-12 18:24:55 +01:00
Snorre Magnus Davøen ade3cf6252 Display avatar left of comments by default
Previously avatars would be displayed on top of comments. Most comment
and forum systems will display avatars to the left of comments/posts.
The https://github.com/snorremd/talk-plugin-gravatar plugin currently
renders avatars in the avatar slot which will render the avatar on top
of the comments. This change modified the comment container to be
displayed as a flex container with row direction. It also adds 10px top
margin to the avatar slot which corresponds with the comment header.

Signed-off-by: Snorre Magnus Davøen <snorremd@gmail.com>
2018-10-12 19:13:04 +02:00
Wyatt Johnson 1837ae4a0f Merge branch 'master' into fix-admin-menu-visibility 2018-10-12 16:44:22 +00:00
Kim Gardner 334074a7ca Merge branch 'master' into master 2018-10-12 16:55:59 +01:00
Fabian Marz f93c4adc97 Fixed typo in GDPR docs. (#1986) 2018-10-11 14:57:16 +00:00
Wyatt Johnson bb54009567 Websocket Regression (#1971)
* fix: addresses websocket connection issues

- reverted upgrade to subscriptions-transport-ws
- removed unnecessary websocket resets
- improved websocket reconnection logic

* Update package.json
2018-10-09 17:47:07 +00:00
vittoboa c126d217ad Fix spanish translation (#1977) 2018-10-09 15:35:22 +00:00
Bryce Kahle 8b2dc3a46d do not show admin drawer unless user has access
Fixes https://github.com/coralproject/talk/issues/1791
2018-10-08 13:02:37 -04:00
Wyatt Johnson d0eca26d5b Body Count (#1969)
* fix: adjusted beheviour of body count

* fix: updated translation @okbel
2018-10-05 18:03:02 +00:00
Nat Welch b742923897 Toxic Comments Plugin logging (#1970)
* Add debug as a dep to toxic-comments

* Add debug logging to toxic-comments plugin

* fix: cleaned up a bit
2018-10-05 17:40:32 +00:00
Wyatt Johnson 1781b926d9 fix: tab container css (#1959) 2018-10-04 20:27:38 +00:00
Harrison Reid 9222ee57a5 Update text and description in moderation configure view
Rename include_comment_stream to code_of_conduct_summary, update text.
Rename include_comment_stream_desc to code_of_conduct_summary_desc, update text.
2018-10-04 18:46:18 +10:00
hovoodd 67cca7d85d Add filters to list of people 2018-10-03 22:15:05 +03:00
Wyatt Johnson 7b97a8fca2 Passport Fix (#1955)
* fix: Fixed bug in passport access

* fix: resolved issues with postMessage and static urls
2018-10-02 16:21:45 +00:00
Kim Gardner 6bff2de371 Merge pull request #1954 from coralproject/static-uri
Static URI + Social Callback bug
2018-10-01 19:08:48 -04:00
Wyatt Johnson 05283b08f7 chore: version bump 2018-10-01 16:58:58 -06:00
Wyatt Johnson 838687a3ae fix: added support for static uri in CSP header for social callback 2018-10-01 16:58:14 -06:00
immber 7b0213299a Updated quickstart (#1898)
* udpated quickstart

* fixed typo and removed quote from quickstart

* fixed broken link in readme

* fixed broken anchor tags

* fix: fixed anchor links
2018-09-20 21:24:44 -06:00
Kim Gardner f4dbc7a24d Merge pull request #1893 from coralproject/fixes
Shorten Spanish phrases for UI purposes
2018-09-19 16:37:56 -04:00
Kim Gardner 161e8b4117 Shorten Spanish phrases for UI purposes 2018-09-19 16:30:17 -04:00
Kim Gardner 6f3535984c Add Spanish translations for toxic-comments (#1891) 2018-09-19 10:22:34 -06:00
Kim Gardner e3557c1f7a Fix en and es translations (#1890) 2018-09-19 10:07:33 -06:00
Kim Gardner 692b6af09d Fix bug with translations for Google auth (#1886)
* Fix bug with translations for Google auth

* Typo
2018-09-18 17:46:55 -06:00
Kim Gardner 25932e10d6 Update translations for ignore-user plugin (#1887) 2018-09-18 17:33:40 -06:00
Kim Gardner ec13a001a2 Notifications plugins es translations (#1888)
* Es translation

* More translations for es

* Category and digest translations

* Typo

* Typo

* Fixes
2018-09-18 17:22:39 -06:00
Kim Gardner 702a616e6c More profile-data translations (#1889) 2018-09-18 17:17:38 -06:00
Kiwi a3dd208fbd Add static className to featured tooltip (#1885) 2018-09-18 15:45:29 -06:00
Kim Gardner 55c3406990 Add more missing es translations (#1883)
* Add more missing es translations

* Typo
2018-09-17 17:09:04 -06:00
Kim Gardner 197fbc33e0 Bump version 4.6.3 (#1871)
* Bump version 4.6.3

* Update index.js
2018-09-17 15:12:30 -06:00
Kim Gardner 008a4fd7d5 Es typo (#1880) 2018-09-17 14:53:36 -06:00
Kim Gardner 8c5665095f Adds Spanish translations for profile data (#1872) 2018-09-17 19:33:27 +00:00
Kim Gardner 647b2ea0c8 Add missing Spanish translations for local-auth (#1879)
* Add missing Spanish translations for local-auth

* fix: yaml fix
2018-09-17 18:27:30 +00:00
Kim Gardner e61f88b98d Shorten es.yml translation to "Configurar" (#1878) 2018-09-17 17:26:53 +00:00
Kim Gardner b024421bbb Merge pull request #1875 from coralproject/http-error
404 Errors
2018-09-14 16:25:02 -04:00
Wyatt Johnson ce95467145 fix: don't log an error for http 404, let the logger do it 2018-09-14 11:48:48 -06:00
Kim Gardner 1564b380b1 Merge pull request #1870 from coralproject/tag-fix
Tag Fix
2018-09-13 23:38:40 -04:00
Kim Gardner 593b8959c5 Merge branch 'master' into tag-fix 2018-09-13 22:36:57 -04:00
Kim Gardner 3fda3b4b7c Merge pull request #1868 from coralproject/upgrade-ws
Upgraded websocket package
2018-09-13 22:36:36 -04:00
Wyatt Johnson 7e680038d6 fix: added tests 2018-09-13 11:21:40 -06:00
Wyatt Johnson 71b8bb5d60 fix: fixes #1867 2018-09-13 11:10:45 -06:00
Wyatt Johnson cfbafdeb5c feat: upgraded websocket package 2018-09-13 07:46:53 -06:00
Wyatt Johnson c19d4a433a Improved Comment URL Handling (#1860)
* feat: replaces PR 1819

- fixes #1851

* fix: set query using new syntax

* review: fixes for missed framework changes

* fix: linting
2018-09-11 22:44:23 +00:00
Kiwi 13cc80bd35 Merge pull request #1841 from hjanuschka/toggle_comment_date
moderation: toggle comment date from timeago to full date
2018-09-11 16:09:15 +02:00
Helmut Januschka 1eea2daeae adress feedback 2018-09-10 21:34:07 +02:00
Kim Gardner 5b29e7d351 Merge branch 'master' into toggle_comment_date 2018-09-10 10:53:34 -04:00
Kiwi 3af39d99e4 Merge pull request #1840 from hjanuschka/word_break
fix long urls breaking moderation box
2018-09-07 22:01:40 +02:00
Kiwi 1abf988366 Merge branch 'master' into word_break 2018-09-07 21:51:37 +02:00
Helmut Januschka 205f943ab5 Update Comment.css 2018-09-07 19:13:36 +02:00
Helmut Januschka 879683da4f Merge branch 'toggle_comment_date' of github.com:hjanuschka/talk into toggle_comment_date 2018-09-07 13:38:52 +02:00
Helmut Januschka 974e884432 adress feedback 2018-09-07 13:36:55 +02:00
Helmut Januschka 846319f1a9 Merge branch 'word_break' of github.com:hjanuschka/talk into word_break 2018-09-07 13:12:49 +02:00
Helmut Januschka e5237ae805 adopt feedback 2018-09-07 13:12:01 +02:00
Wyatt Johnson b9d88251e6 External User Fix (#1846)
* fix: return user if user was not initially found

* fix: added tests, added wasUpserted boolean
2018-09-06 15:22:58 +00:00
Wyatt Johnson 0d720626d4 Merge branch 'master' into toggle_comment_date 2018-09-04 17:59:55 +00:00
Wyatt Johnson 50b2c6aa88 Merge branch 'master' into word_break 2018-09-04 15:04:50 +00:00
Thomaz de Oliveira dos Reis 382019d907 Change proxy-agent to support http/https through http/https/socks/pac proxy on scraper (#1839) 2018-09-04 15:01:10 +00:00
Helmut Januschka 97103739c2 toggle comment date 2018-09-03 09:04:33 +02:00
Helmut Januschka 9cf13691ad fix long urls breaking moderation box 2018-09-03 08:20:56 +02:00
Kim Gardner e6107173fb Merge pull request #1831 from coralproject/small-fix
Add missing translation
2018-08-29 12:02:34 -04:00
Kim Gardner 1d9ec7a779 Formatting 2018-08-29 11:46:41 -04:00
Kim Gardner 0c345fe913 Add missing translation 2018-08-29 11:44:56 -04:00
Kim Gardner b6f06f1e89 Merge pull request #1805 from danilogila/translations_ptbr
Adding more translations in some missing pages
2018-08-29 11:39:47 -04:00
Kim Gardner aea3a7449e Merge branch 'master' into translations_ptbr 2018-08-29 10:23:08 -04:00
Kim Gardner 4db73ae73a Merge pull request #1804 from hjanuschka/patch-2
support translation in permalink share button
2018-08-29 10:21:34 -04:00
Kim Gardner 2af7acd3db Merge branch 'master' into patch-2 2018-08-28 16:30:25 -04:00
Kim Gardner da9847b88f Merge pull request #1822 from hjanuschka/patch-3
add german translation for sort-upvoted
2018-08-28 13:53:46 -04:00
Kim Gardner 5b9f9f1b0d Merge branch 'master' into translations_ptbr 2018-08-28 13:53:19 -04:00
Helmut Januschka 5427f295f6 add german translation for sort-upvoted 2018-08-28 15:48:50 +02:00
Wyatt Johnson 620273769f Update package.json (#1818) 2018-08-24 12:22:23 -06:00
Wyatt Johnson dff3d79569 Subscription Optimizations (#1817)
* fix: optimized user extraction during subscription operations

* fix: fixed query

* feat: added user refeshing batching
2018-08-24 16:14:18 +00:00
Suriyaa ✌️️ 0904453e41 Remove Node Security Platform Badge (#1813) 2018-08-22 16:04:58 +00:00
Helmut Januschka 90eafb557c fix language detection in IE11 and Edge (#1810) 2018-08-21 17:52:02 +00:00
Danilo.Santana bcb294c625 adding more translations in some missing pages 2018-08-16 11:27:31 -03:00
Helmut Januschka b070a7cc52 cs fixes 2018-08-16 14:25:48 +02:00
Helmut Januschka e48d89a607 Update en.yml 2018-08-16 14:03:57 +02:00
Helmut Januschka cb57e5c1e1 add DE translation 2018-08-16 14:03:23 +02:00
Helmut Januschka bf363621d3 support translation in button 2018-08-16 14:02:07 +02:00
Kim Gardner 4dbd1e0bb3 Add version tip to docs (#1790) 2018-08-08 17:03:23 +00:00
Kim Gardner cbda970437 Merge pull request #1789 from coralproject/release-4-6-1
Bump version 4.6.1
2018-08-08 17:42:19 +01:00
Wyatt Johnson eecd814e53 Merge branch 'master' into release-4-6-1 2018-08-08 16:31:42 +00:00
Kim Gardner fb4b6330da 4.6.1 Release 2018-08-08 17:30:01 +01:00
Kim Gardner eb24b5c027 Merge pull request #1785 from coralproject/comment-edit-moderation
Comment Editing Passthrough
2018-08-08 16:44:17 +01:00
Kim Gardner 3346f5de77 Merge branch 'master' into comment-edit-moderation 2018-08-08 14:39:45 +01:00
Kim Gardner 1a69cea9f4 Merge pull request #1786 from coralproject/lowercasedSearch
Case sensitive displayName Issue
2018-08-08 14:38:43 +01:00
Wyatt Johnson d763f0b8f6 fix: added lowercased/case searches for displayName 2018-08-07 16:31:51 -06:00
Wyatt Johnson 6bb98a00dc fix: added support for comment edit mod passthrough 2018-08-07 13:56:23 -06:00
Leandro 2edb8e8d0a use config variable scheduledDeletionDelayHours to schedule deletion time on hoc (#1775) 2018-08-01 21:48:11 +00:00
Kim Gardner c3e162dd56 Merge pull request #1770 from icco/patch-1
Fix small typo in integrating/configuring-admin.md
2018-08-01 16:14:37 +01:00
Wyatt Johnson 3cdd061afd Merge branch 'master' into patch-1 2018-07-31 18:25:05 +00:00
Kim Gardner aaaf37b8db Small typo fix (#1772) 2018-07-31 18:24:52 +00:00
Nat Welch 7af5f04e45 Fix small typo in integrating/configuring-admin.md 2018-07-30 11:42:01 -04:00
Kim Gardner 65a166b860 Merge pull request #1767 from coralproject/token-fix
Token Handling
2018-07-27 21:25:07 +01:00
Kim Gardner eb4bcb71c4 Merge branch 'master' into token-fix 2018-07-27 21:12:52 +01:00
Wyatt Johnson 6a04b66d84 fix: token handling
- Fixes #1728
2018-07-27 14:08:53 -06:00
Kim Gardner 30ae9a82c1 Merge pull request #1764 from coralproject/user-fix
Username Status Fix
2018-07-27 20:50:57 +01:00
Wyatt Johnson ec06f2a392 chore: update 4.6.0 2018-07-27 13:37:46 -06:00
Wyatt Johnson f461f0884b Merge branch 'master' into user-fix 2018-07-27 19:29:05 +00:00
Wyatt Johnson d55c329f76 chore: version bump 2018-07-27 13:27:17 -06:00
Wyatt Johnson 0f63e076a6 fix: username status fix 2018-07-27 13:25:58 -06:00
Fabian Marz 1012b6b28b Fixed UI component path reference. (#1761) 2018-07-26 22:09:03 +00:00
Fabian Marz 421352c75c Fixed code markup for action name. (#1746) 2018-07-13 16:19:00 +00:00
Kim Gardner a170c107e2 Add FAQ and Troubleshooting docs (#1742)
* Add FAQ and Troubleshooting docs

* Add to nav

* Fix links

* Fix css formatting and fix rel links
2018-07-12 19:05:08 +00:00
Kim Gardner 104617d644 Merge pull request #1739 from memz/ar-translations-update-1
updated translation files with new Arabic translations
2018-07-09 17:33:37 -04:00
Kim Gardner 5b1773ba26 Merge branch 'master' into ar-translations-update-1 2018-07-09 16:33:31 -04:00
Nat Welch cd0aeca87c Add suggested index to comments (#1740) 2018-07-09 16:20:05 +00:00
Melhem Fawaz 5c65702032 updated translation files with new Arabic translations 2018-07-09 17:07:02 +04:00
Kim Gardner 66445aae59 Merge pull request #1737 from coralproject/username-status
findOrCreateExternalUser Deprecation
2018-07-06 17:18:32 -04:00
Wyatt Johnson 23156f3d5e feat: added deprecations, docs 2018-07-06 14:28:25 -06:00
Kim Gardner 76bb6df084 Merge pull request #1735 from coralproject/update-doc-versions
Update versions to 4.5
2018-07-06 13:01:03 -04:00
Kim Gardner 54c99c7fcc Update versions to 4.5 2018-07-06 12:52:40 -04:00
Kim Gardner 80fc5e86ff Upgrade mongoose (#1734)
* Upgrade Mongoose

* Upgrade Mongoose 5.2.1

* Yarn
2018-07-05 12:27:20 -06:00
Davis Shaver eddd63ae1a [Request for feedback] Heroku fix (#1721)
* Remove package-lock.json file, as Talk uses Yarn
* Silence ENV rewrite errors in Heroku
2018-07-05 09:06:49 -06:00
Wyatt Johnson e55ed489f2 fix: added disable polyfill arg to onbuild (#1732) 2018-07-04 11:08:47 -06:00
Kim Gardner 95fb33e41b Update version to 4.5.1 (#1718) 2018-06-29 13:08:14 -06:00
Kim Gardner 404c900de7 Merge pull request #1716 from coralproject/readme-link
Fix Talk link in README
2018-06-29 14:47:37 -04:00
Kim Gardner dc773f486b Merge branch 'master' into readme-link 2018-06-29 14:31:49 -04:00
Kim Gardner db679fb6ca Merge pull request #1712 from coralproject/fix-broken-links
Fix some broken links
2018-06-29 14:31:37 -04:00
Kim Gardner a2458e0dd0 Merge branch 'master' into readme-link 2018-06-29 14:12:14 -04:00
Wyatt Johnson f22507e313 Merge branch 'master' into fix-broken-links 2018-06-29 12:06:55 -06:00
Kim Gardner 8cfc0caad3 Merge pull request #1715 from coralproject/custom-displayname
Search - Display Name
2018-06-29 14:01:40 -04:00
Kim Gardner 7d8b36e00c Fix Talk link in README 2018-06-29 13:43:29 -04:00
Wyatt Johnson 50b920b799 feat: added support for metadata.displayName for searches 2018-06-29 11:17:21 -06:00
Kim Gardner b4f5121382 Update links 2018-06-28 16:19:38 -04:00
Kim Gardner b9828bcf11 Merge pull request #1706 from coralproject/snyk-fix-svo35q
[Snyk] Fix for 1 vulnerable dependencies
2018-06-28 15:43:48 -04:00
Kim Gardner 0ad0577ba3 Update lockfile 2018-06-28 15:16:05 -04:00
Kim Gardner 46d6c3a8c6 Merge branch 'master' into snyk-fix-svo35q 2018-06-28 15:11:34 -04:00
Kim Gardner b40ed1d217 Merge pull request #1710 from coralproject/losowsky-patch-1
Added Rich Text to checklist
2018-06-28 14:54:04 -04:00
Andrew Losowsky ab3ceb151a Added Rich Text to checklist 2018-06-27 17:57:23 -05:00
Kim Gardner d393c6fc4d Set versions to 4.5.0 instead of latest (#1708) 2018-06-26 19:35:46 +00:00
snyk-bot e6c6391958 fix: package.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/npm:braces:20180219
2018-06-26 02:49:35 +00:00
Kim Gardner f2857a8085 Merge pull request #1705 from coralproject/redirect-uri
Email Confirm Redirect URI
2018-06-25 15:28:41 -04:00
Wyatt Johnson 30a5a08769 Merge branch 'master' into redirect-uri 2018-06-25 18:31:40 +00:00
Wyatt Johnson 16a884d778 fix: extract and add redirect uri 2018-06-25 12:28:25 -06:00
Andrew Losowsky f403281978 added strategy tutorial link (#1704) 2018-06-22 22:44:59 +00:00
Kim Gardner c1d547e1b1 Merge pull request #1702 from coralproject/plugins
Plugin Fixes
2018-06-21 12:49:30 -04:00
Kim Gardner d94003475c Merge branch 'master' into plugins 2018-06-21 12:30:36 -04:00
Kim Gardner dd8a11e241 Merge pull request #1701 from coralproject/code-of-conduct
Update COC
2018-06-21 12:30:21 -04:00
Wyatt Johnson 7699e440e4 fix: updated yarn.lock 2018-06-21 08:37:48 -06:00
Kim Gardner 0ad2da9baa Remove auth-checkbox 2018-06-20 23:57:26 -04:00
Wyatt Johnson c287b842f3 review: spelling 2018-06-20 21:08:32 -06:00
Wyatt Johnson b6d2092048 added more fallbacks 2018-06-20 21:06:55 -06:00
Wyatt Johnson ae9f5d4e8e fixes #1691 2018-06-20 21:03:23 -06:00
Kim Gardner eab0b40e2c Update COC 2018-06-20 18:37:34 -04:00
Wyatt Johnson 0aee78ac5f Delete package-lock.json (#1699) 2018-06-19 21:21:07 +00:00
Andrew Losowsky 56cb8962bd Fixed blog links for new site (#1697)
* Fixed blog links for new site

* Fix links
2018-06-19 21:15:02 +00:00
Kim Gardner 5747fd84ad Merge pull request #1687 from coralproject/update-readme
Add versioning info, cleanup README, add Product Guide link to admin dropdown
2018-06-19 21:06:32 +01:00
Wyatt Johnson d3666a9388 Merge branch 'master' into update-readme 2018-06-19 15:22:20 +00:00
Andrew Losowsky d836e8203f Fixes, more info (#1698)
• removed Heroku (since we don't support in production now)
• fixed Google typo
• Added Akismet info
• Added Slack channel info
2018-06-19 15:21:07 +00:00
Kim Gardner 458927a6e3 Remove Heroku one-click (#1696) 2018-06-18 08:59:37 -07:00
Kim Gardner 0267782386 Merge pull request #1694 from coralproject/feature/talk-installation-checklist
Pre Launch Checklist
2018-06-18 16:46:15 +01:00
Kim Gardner 32bdf1c1af Merge branch 'master' into feature/talk-installation-checklist 2018-06-18 13:43:35 +01:00
Kim Gardner a977ce4ac9 Merge branch 'master' into update-readme 2018-06-18 13:43:15 +01:00
Kim Gardner 18f6121797 Merge pull request #1695 from conversario/neutral-reactions-icon-whatshot
Use the flame/What's hot as the generic reactions icon.
2018-06-18 13:38:42 +01:00
Fabian Neumann 59531f32dc oops 2018-06-18 11:24:38 +02:00
Fabian Neumann 03ae85f5ac Use the flame/What's hot as the generic reactions icon. 2018-06-18 11:15:20 +02:00
Kim Gardner 8ff27d5e8c Merge branch 'master' into feature/talk-installation-checklist 2018-06-15 17:42:00 +01:00
Kim Gardner 7ecf51a159 Merge pull request #1692 from conversario/neutral-reactions-icon
Use neutral icon for aggregated reactions count
2018-06-15 17:41:32 +01:00
Kim Gardner f4513912d4 Layout and wording 2018-06-15 17:27:37 +01:00
Jeff Nelson a7f7e6fa9e fix links 2018-06-15 08:38:44 -07:00
Jeff Nelson 73464361e4 add pre launch checklist 2018-06-15 08:36:56 -07:00
Kim Gardner 56c6633ef6 Merge branch 'master' into neutral-reactions-icon 2018-06-14 14:03:52 +01:00
Fabian Neumann 143d23bf9d Use neutral icon for aggregated reactions count 2018-06-14 11:44:10 +02:00
Kim Gardner 111b1b744f Update dependencies 2018-06-13 17:58:59 +01:00
Kim Gardner 29f8762ed7 Add translation for product guide link 2018-06-13 17:56:28 +01:00
Kim Gardner 959e5beb3c Merge branch 'update-readme' of git+ssh://github.com/coralproject/talk into update-readme 2018-06-13 17:54:09 +01:00
Kim Gardner 7417a972b6 Merge branch 'master' into update-readme 2018-06-13 17:51:01 +01:00
Kim Gardner 3da62f3471 Merge pull request #1688 from coralproject/feature/GH-1685
GH-1685: Fix deploy to Heroku
2018-06-13 17:00:26 +01:00
Kim Gardner cc668ef439 Fix grammar 2018-06-13 16:34:44 +01:00
Jeff Nelson 18fa98d8ea add config for MAILGUN_SMTP_PASSWORD to app.json 2018-06-13 07:13:39 -07:00
Kim Gardner a245c2e7ea Merge branch 'master' into update-readme 2018-06-13 14:21:08 +01:00
Kim Gardner a1745b26f7 Merge pull request #1686 from cristiandean/fix_translation
Add translations in some missing pages and fix others
2018-06-13 14:20:55 +01:00
Kim Gardner 35ca970650 Put Product Guide link in gear dropdown 2018-06-12 20:06:42 +01:00
Kim Gardner 6e8ab4f141 Tweak 2018-06-11 20:52:04 +01:00
Kim Gardner e48c2b9fd5 Add versioning info and cleanup README 2018-06-11 20:15:48 +01:00
Cristian 8c20376c95 Add translations in some missing pages and fix others 2018-06-11 12:34:54 -03:00
Kim Gardner 93813adf97 Merge pull request #1678 from coralproject/user-detail
User Detail Drawer Fixes
2018-06-06 12:38:05 +01:00
Wyatt Johnson ee81a3d280 Merge branch 'master' into user-detail 2018-06-05 17:12:47 -06:00
Kiwi 41fab3e11c Introduce final form, i18n helper, validators and refactor AddEmailAddress (#1636)
* Introduce final form, validators and refactor AddEmailAddress

* First i18n script

* Sort locales

* Add delete and copy action

* Copy over available validator translations

* Add comments

* Export validations in plugin-api

* Linting

* yarn.lock

* Sort locales

* Drop unused translations

* Add translations for validators

* Add action drop-unused

* Add comments

* Add note about limitation

* Fix desc
2018-06-05 17:12:30 -06:00
Wyatt Johnson dae4eb123c Merge branch 'master' into user-detail 2018-06-05 17:11:45 -06:00
Kim Gardner 6b6e59791a Merge pull request #1680 from conversario/translation-reply
Translation fix for DE `common.reply`
2018-06-05 20:44:09 +01:00
Wyatt Johnson ef97ef7217 Merge branch 'master' into translation-reply 2018-06-05 13:22:22 -06:00
Fabian Neumann d407ac0c4a Small grammar fix (#1681) 2018-06-05 13:22:10 -06:00
Kim Gardner 82b580d3a3 Merge branch 'master' into translation-reply 2018-06-05 13:46:48 +01:00
Kim Gardner c2a9e0290c Merge pull request #1523 from coralproject/reject-username
Reject username
2018-06-05 13:44:01 +01:00
Fabian Neumann 01609a51f5 Translation fix for DE common.reply 2018-06-05 13:45:50 +02:00
Chi Vinh Le ccff6ed63b Resolve linter issues 2018-06-05 04:28:54 +02:00
Chi Vinh Le d9a1d739dc Set React version for linters 2018-06-05 04:28:31 +02:00
Chi Vinh Le 05088a7744 Set specific parser, as prettier now has no default 2018-06-05 04:18:55 +02:00
Chi Vinh Le 2387b46ba1 Resolve className and id conflicts 2018-06-05 03:32:15 +02:00
okbel 375c8789a4 updating yarn and nightwatch/selenium-standalone 2018-06-04 21:48:51 -03:00
Wyatt Johnson 7a13b64fbe feat: cleanup of user details drawer 2018-06-04 16:23:58 -06:00
Kiwi b8a12aef2f Merge branch 'master' into reject-username 2018-06-04 17:49:18 -03:00
Kim Gardner 8feb67f2ea Merge pull request #1676 from coralproject/nvmrc
Added .nvmrc file
2018-06-04 21:41:31 +01:00
Chi Vinh Le 773eb34c3e Merge branch 'reject-username' of ssh://github.com/coralproject/talk into reject-username 2018-06-04 22:38:21 +02:00
Chi Vinh Le 5835845092 Fix write fragment 2018-06-04 22:37:31 +02:00
Kiwi 7627d37e22 Merge branch 'master' into reject-username 2018-06-04 17:32:44 -03:00
Chi Vinh Le 6674b657ab Move helper out of class 2018-06-04 22:32:23 +02:00
Chi Vinh Le 9c3d9e5943 Merge branch 'reject-username' of ssh://github.com/coralproject/talk into reject-username 2018-06-04 22:30:49 +02:00
Chi Vinh Le 636bc9efa4 Manage cache 2018-06-04 22:30:12 +02:00
Kim Gardner 6f66ff6ccf Merge branch 'master' into nvmrc 2018-06-04 21:21:55 +01:00
Kim Gardner bdf5b0c6a1 Merge pull request #1677 from coralproject/version-bump
Version Bump
2018-06-04 21:21:25 +01:00
Wyatt Johnson ef86938a0e Update package.json 2018-06-04 13:45:49 -06:00
Wyatt Johnson 01f7aa52a0 Merge branch 'master' into nvmrc 2018-06-04 13:44:39 -06:00
Cristian Dean 6c73e5b818 Add scraper proxy support (#1674)
* Add scraper proxy support
* review: doc updates
2018-06-04 13:43:00 -06:00
Wyatt Johnson 3ac392e358 locked node version at 8 via nvmrc 2018-06-04 13:32:40 -06:00
Kim Gardner 18d58e4ea8 Remove pell from plugin directory (#1675)
* Remove pell from plugin directory

* review: removed pell refernce
2018-06-04 12:58:26 -06:00
okbel 2d343029a1 updated - getUserStatusArray 2018-06-04 15:25:30 -03:00
Kim Gardner 56d9fee486 Merge pull request #1673 from conversario/markdown-asset-closed-message-master
Use Markdown for the "asset is closed" message.
2018-06-04 17:31:51 +01:00
Kim Gardner cf98232109 Merge branch 'master' into markdown-asset-closed-message-master 2018-06-04 15:54:13 +01:00
Kim Gardner 01c19a9995 Merge pull request #1672 from coralproject/human-karma
Humanized Karma
2018-06-04 15:42:13 +01:00
Chi Vinh Le f142150b3e Fix unexpected error 2018-06-04 16:04:37 +02:00
Chi Vinh Le b783ee8c0b Ignore already exists error 2018-06-04 15:45:31 +02:00
Fabian Neumann 2f4dfa080b Use Markdown for the "asset is closed" message. 2018-06-04 15:25:20 +02:00
Wyatt Johnson 54b0ce27fb Merge branch 'master' into human-karma 2018-06-01 15:19:31 -06:00
Kim Gardner 0e8d410c98 Merge branch 'master' into reject-username 2018-06-01 22:19:18 +01:00
Wyatt Johnson d3158f5c7e GraphiQL Fixes (#1671)
* bug: fixed graphiql style, upgraded
2018-06-01 15:14:49 -06:00
Wyatt Johnson f580608a31 feat: humanize karma number 2018-06-01 15:13:58 -06:00
Kim Gardner fefd4d281a Merge branch 'master' into reject-username 2018-06-01 17:11:56 +01:00
okbel ed539d2ee1 Merge branch 'reject-username' of github.com:coralproject/talk into reject-username
* 'reject-username' of github.com:coralproject/talk:
  Small tweaks
  Small typo
  resolved custom css loading issue
  Update copy
  Update copy
  Translation Fixes
  Fix DropDown display bug
  Fixed double encoding
  fix to target handler
  Added missing translation pt_BR
  remove unused method
2018-06-01 12:34:50 -03:00
okbel 25852d68bd updated styles 2018-06-01 12:06:53 -03:00
Wyatt Johnson 795389c0c8 Merge pull request #1528 from cristiandean/master
Check if token is in localStorage before logout
2018-05-31 15:03:17 -06:00
Wyatt Johnson 66f2d41033 always call the rest logout command, don't vomit on the error 2018-05-31 14:56:18 -06:00
Wyatt Johnson 01a0d0d587 Merge branch 'master' into master 2018-05-31 14:12:00 -06:00
Belén Curcio 7262a9ab50 Merge branch 'master' into reject-username 2018-05-31 16:25:53 -03:00
Wyatt Johnson 189d27c13f Merge pull request #1668 from coralproject/translations
Translation Fixes
2018-05-31 13:00:33 -06:00
Kim Gardner eb7f2abd97 Small tweaks 2018-05-31 14:37:53 -04:00
Wyatt Johnson 250a8ec2f1 Merge branch 'master' into translations 2018-05-31 12:26:26 -06:00
Wyatt Johnson 375ef09d78 Merge pull request #1670 from coralproject/templates
Custom CSS Fix
2018-05-31 11:50:41 -06:00
Kim Gardner 135f0e300f Small typo 2018-05-31 13:33:34 -04:00
Wyatt Johnson 9d752685cd resolved custom css loading issue 2018-05-31 11:27:02 -06:00
Kim Gardner c5a6f8a0b3 Merge branch 'master' into reject-username 2018-05-31 11:23:21 -04:00
Kim Gardner b7768ccaf6 Update copy 2018-05-31 11:07:12 -04:00
Kim Gardner e68d5c8a14 Update copy 2018-05-31 11:03:17 -04:00
Kim Gardner a638dafd85 Merge pull request #1667 from coralproject/fix-dropdown-display
Fix DropDown display bug
2018-05-30 16:58:10 -04:00
Kim Gardner 93436a2eb5 Merge branch 'master' into fix-dropdown-display 2018-05-30 16:49:47 -04:00
Kim Gardner a16233484c Merge pull request #1666 from coralproject/auth
Fixed double encoding
2018-05-30 16:45:57 -04:00
Wyatt Johnson f7899bc670 Translation Fixes
- Removed duplicated translations
- Fixed redundant text
2018-05-30 14:41:55 -06:00
Chi Vinh Le c98830aa63 Fix DropDown display bug 2018-05-30 22:23:52 +02:00
Wyatt Johnson c24251e8f2 Fixed double encoding 2018-05-30 14:22:13 -06:00
Wyatt Johnson 5f74c827f5 Merge branch 'master' into reject-username 2018-05-30 10:15:35 -06:00
Wyatt Johnson 9ed991936e Merge pull request #1664 from conversario/ban-user-message
remove unused method
2018-05-30 10:08:20 -06:00
Wyatt Johnson ede273a3e0 fix to target handler 2018-05-30 10:00:04 -06:00
Wyatt Johnson c6deabf919 Merge branch 'master' into ban-user-message 2018-05-30 09:49:18 -06:00
Wyatt Johnson 2e40cd53cb Merge pull request #1665 from cristiandean/translation_br
Added missing translation pt_BR
2018-05-30 09:48:10 -06:00
okbel 09ddd82800 Merge branch 'reject-username' of github.com:coralproject/talk into reject-username
* 'reject-username' of github.com:coralproject/talk:
2018-05-30 11:11:30 -03:00
okbel 87aa1af654 Merge branch 'master' of github.com:coralproject/talk into reject-username
* 'master' of github.com:coralproject/talk:
  Typo
  Fix warnings
  Activate Websocket and add browser console logging
  çhanges
  changes and updates to the e2e
  updated yarn.lock
  Workaround RTE Button focus bug on IOS
  Use standard buttons to fix IOS bug
  add missing dependency
2018-05-30 11:10:20 -03:00
Cristian b9e3a01cdd Added missing translation pt_BR 2018-05-30 09:19:59 -03:00
Leandro 5c7345313e remove unused method 2018-05-30 09:25:10 +02:00
Kim Gardner c3ffb13a79 Merge branch 'master' into reject-username 2018-05-29 15:27:19 -04:00
Kim Gardner 8933b43e1a Merge pull request #1661 from coralproject/dropdown-ios
Use <button> for dropdown to fix IOS bug
2018-05-29 15:21:28 -04:00
Kim Gardner 6c1fb2b34d Merge branch 'master' into dropdown-ios 2018-05-29 15:14:35 -04:00
Kim Gardner 0db3b354ca Merge pull request #1662 from coralproject/rte-focus-ios
Workaround RTE Button focus bug on IOS
2018-05-29 15:14:26 -04:00
Kim Gardner a732793cb1 Merge branch 'master' into rte-focus-ios 2018-05-29 15:06:26 -04:00
Wyatt Johnson 03a7ecff0b Merge pull request #1663 from coralproject/e2e-update
E2E improvements
2018-05-29 11:38:22 -06:00
Belén Curcio ba8466bacf Merge branch 'master' into reject-username 2018-05-29 13:27:04 -03:00
okbel 595e19231e if username changed, reject username should be disabled 2018-05-29 13:24:53 -03:00
okbel 4f76163541 Adding translations 2018-05-29 13:00:24 -03:00
okbel 6f06ac760c Translations 2018-05-29 12:58:26 -03:00
okbel 25947cb278 Reject Username fully working 2018-05-29 12:41:54 -03:00
Chi Vinh Le 606f463331 Typo 2018-05-29 16:52:07 +02:00
Chi Vinh Le 576820f1f8 Fix warnings 2018-05-29 16:50:11 +02:00
Chi Vinh Le 3a84da9495 Activate Websocket and add browser console logging 2018-05-29 16:42:04 +02:00
okbel b15a306c43 çhanges 2018-05-28 16:20:20 -03:00
okbel 4299c373ba changes and updates to the e2e 2018-05-28 15:17:31 -03:00
okbel b0d76f2f6a progress 2018-05-28 14:52:03 -03:00
Wyatt Johnson 6f0694d341 Merge pull request #1660 from hjanuschka/patch-1
add missing dependency
2018-05-28 09:53:18 -06:00
Wyatt Johnson da820ad6db updated yarn.lock 2018-05-28 09:42:22 -06:00
Chi Vinh Le ed679096c8 Workaround RTE Button focus bug on IOS 2018-05-28 17:16:44 +02:00
okbel 6d35c648d6 updates 2018-05-28 12:13:02 -03:00
okbel b4e7dd54cf Merge branch 'master' of github.com:coralproject/talk into reject-username
* 'master' of github.com:coralproject/talk: (33 commits)
  apply @cvle suggestion for fix
  Take karma into account when doing e2e
  Bump version to 4.4.2
  move placeholder right behind contentEditable
  added pivotal tracker ref
  moved event handler to bundle
  Update stream.njk
  disable CSP until we can work on configuration + webpack issues
  added missing translation
  Remove redundant period. It's in the translation strings already.
  Remove redundancy
  One more missing German translation
  Add missing translations (en/de) for plugins ignore-user and local-auth.
  text-replace error
  support the __webpack_nonce__ parameter
  csp fixes
  added comment
  `karma` -> `karmaThresholds`
  name changes
  Fix Touch issues on IOS Safari (iPad)
  ...
2018-05-28 11:23:34 -03:00
Chi Vinh Le 6577365930 Use standard buttons to fix IOS bug 2018-05-28 16:19:56 +02:00
Helmut Januschka 1fb206daa4 add missing dependency 2018-05-28 10:56:46 +02:00
Wyatt Johnson 2bd4e1182b Merge pull request #1657 from erikreyna/talk-plugin-rich-text-patch_placeholder-fix
move placeholder right behind contentEditable
2018-05-25 16:28:49 -06:00
Kim Gardner 9fe2175da3 Merge branch 'master' into talk-plugin-rich-text-patch_placeholder-fix 2018-05-25 18:19:37 -04:00
Kim Gardner c1692dfb70 Merge pull request #1630 from coralproject/karma
Karma Score
2018-05-25 18:19:25 -04:00
Kim Gardner cb83514365 Merge branch 'master' into talk-plugin-rich-text-patch_placeholder-fix 2018-05-25 18:12:21 -04:00
Erik Reyna ba3af0aeb3 apply @cvle suggestion for fix 2018-05-25 18:07:41 -04:00
Kim Gardner 51cb917d6b Merge branch 'master' into karma 2018-05-25 17:04:30 -04:00
Chi Vinh Le b02fd67742 Merge branch 'karma' of ssh://github.com/coralproject/talk into karma 2018-05-25 22:50:18 +02:00
Chi Vinh Le 90e4682cf6 Take karma into account when doing e2e 2018-05-25 22:49:35 +02:00
Wyatt Johnson 3ff8b8519e Merge pull request #1658 from coralproject/bump-version-4-4-2
Bump version to 4.4.2
2018-05-25 13:58:46 -06:00
Wyatt Johnson 105cff6990 Merge branch 'master' into bump-version-4-4-2 2018-05-25 13:52:44 -06:00
Kim Gardner 99854d8644 Merge pull request #1648 from coralproject/fix-ipad-touch-issue
Fix Touch issues on iOS Safari (iPad)
2018-05-25 15:04:55 -04:00
Kim Gardner cedabf04e3 Bump version to 4.4.2 2018-05-25 15:04:00 -04:00
Erik Reyna 2c6843129a move placeholder right behind contentEditable 2018-05-25 15:02:34 -04:00
Kim Gardner 47761cf8a0 Merge branch 'master' into fix-ipad-touch-issue 2018-05-25 14:49:25 -04:00
Kim Gardner 4442ffc784 Merge pull request #1656 from coralproject/csp
Disable CSP
2018-05-25 14:49:07 -04:00
Wyatt Johnson 016b6d6007 Merge branch 'master' into karma 2018-05-25 12:44:48 -06:00
Wyatt Johnson e94d13e594 Merge branch 'master' into fix-ipad-touch-issue 2018-05-25 12:44:19 -06:00
Kim Gardner 68c7477f3a Merge branch 'master' into csp 2018-05-25 14:40:21 -04:00
Kim Gardner 700cee4e56 Merge pull request #1653 from conversario/missing-translations-local-auth
Add missing translations (en/de) for plugins ignore-user and local-auth.
2018-05-25 14:39:56 -04:00
Kiwi d0740cb323 Merge branch 'master' into csp 2018-05-25 15:36:44 -03:00
Kim Gardner c021c3adc8 Merge branch 'master' into missing-translations-local-auth 2018-05-25 14:22:38 -04:00
Kim Gardner 130fb0d4e9 Merge pull request #1655 from coralproject/translations
Added missing translation
2018-05-25 14:22:23 -04:00
Kim Gardner 6411c1cf0d Merge branch 'master' into reject-username 2018-05-25 14:16:02 -04:00
Kiwi 79a0f0321f Merge branch 'master' into karma 2018-05-25 15:12:57 -03:00
Kiwi 5090f9c6b2 Merge branch 'master' into csp 2018-05-25 15:12:20 -03:00
Kim Gardner 5e8c950dc5 Merge branch 'master' into translations 2018-05-25 14:04:03 -04:00
Kim Gardner c7b2641ea7 Merge pull request #1654 from coralproject/docs
Enhanced documentation on JWT's
2018-05-25 14:03:47 -04:00
Wyatt Johnson ba2abab358 added pivotal tracker ref 2018-05-25 11:55:17 -06:00
Wyatt Johnson 5535dde053 Merge branch 'master' into fix-ipad-touch-issue 2018-05-25 11:53:04 -06:00
Wyatt Johnson c1eab3f2c6 moved event handler to bundle 2018-05-25 11:51:43 -06:00
Wyatt Johnson 540df09b5b Update stream.njk 2018-05-25 11:48:55 -06:00
Kim Gardner ed2842717d Merge branch 'master' into docs 2018-05-25 13:45:12 -04:00
Kim Gardner d9621e6801 Merge pull request #1645 from mkonikov/delete-modal-iphone
[iOS CSS Fix] Improve legibility of the verify text
2018-05-25 13:44:59 -04:00
Wyatt Johnson 5f6b1235aa Merge branch 'master' into missing-translations-local-auth 2018-05-25 11:44:07 -06:00
Kim Gardner d923857eda Merge branch 'master' into delete-modal-iphone 2018-05-25 13:36:01 -04:00
Kim Gardner d96702eef5 Merge pull request #1646 from mkonikov/hr-fix
[CSS Fix] HR line on older devices - Flexbox
2018-05-25 13:35:18 -04:00
Wyatt Johnson 0e29a85d72 Merge branch 'master' into missing-translations-local-auth 2018-05-25 11:33:04 -06:00
Wyatt Johnson 7d861236b8 disable CSP until we can work on configuration + webpack issues 2018-05-25 11:21:53 -06:00
Wyatt Johnson 3a79cc684b added missing translation 2018-05-25 11:19:02 -06:00
Wyatt Johnson e1d77daf47 enhanced docs around jwt's 2018-05-25 11:16:24 -06:00
Kiwi 4ec5ccd1a3 Merge branch 'master' into hr-fix 2018-05-25 14:00:12 -03:00
Kiwi 5e6586d228 Merge branch 'master' into delete-modal-iphone 2018-05-25 13:17:57 -03:00
Kim Gardner d414867bb0 Merge branch 'master' into fix-ipad-touch-issue 2018-05-25 12:04:49 -04:00
Kim Gardner cfb162c490 Merge branch 'master' into karma 2018-05-25 12:04:15 -04:00
Fabian Neumann b7d2621cb8 Remove redundant period. It's in the translation strings already. 2018-05-25 17:19:43 +02:00
Wyatt Johnson 3141133e34 Merge pull request #1640 from mkonikov/word-break
Remove wordbreak
2018-05-25 09:12:36 -06:00
Fabian Neumann 325e763fd0 Remove redundancy 2018-05-25 16:34:29 +02:00
Fabian Neumann ab6a193dcb One more missing German translation 2018-05-25 16:31:07 +02:00
Fabian Neumann 56483f3888 Add missing translations (en/de) for plugins ignore-user and local-auth. 2018-05-25 16:09:38 +02:00
Mendel Konikov 4800e32758 Use overflow wrap for better compatibility 2018-05-24 19:07:00 -04:00
Wyatt Johnson 16573b127e text-replace error 2018-05-24 16:19:52 -06:00
Mendel Konikov abafa45be7 Replace break all with break-word 2018-05-24 17:20:54 -04:00
Mendel Konikov ce708bff42 Merge branch 'master' of github.com:mkonikov/talk into word-break 2018-05-24 17:18:29 -04:00
Wyatt Johnson 64c16a1805 support the __webpack_nonce__ parameter 2018-05-24 15:02:08 -06:00
Wyatt Johnson f8cc658c54 csp fixes 2018-05-24 14:34:13 -06:00
Wyatt Johnson e39bcb11ba added comment 2018-05-24 14:02:02 -06:00
Wyatt Johnson a046162f9c karma -> karmaThresholds 2018-05-24 13:57:26 -06:00
Wyatt Johnson 8f51b07388 Merge branch 'master' into karma 2018-05-24 13:28:03 -06:00
Wyatt Johnson 45113f14c7 Merge pull request #1650 from coralproject/whitelisted-langs
Added support for forcing languages
2018-05-24 13:24:00 -06:00
Wyatt Johnson 0c35badd95 name changes 2018-05-24 12:58:55 -06:00
Wyatt Johnson 1c0bfdb89e Merge branch 'master' into whitelisted-langs 2018-05-24 12:38:22 -06:00
Wyatt Johnson 8f4846404a fixed default doc 2018-05-24 12:35:45 -06:00
Wyatt Johnson c642cc811c fix 2018-05-24 12:34:58 -06:00
Wyatt Johnson 945ab9a1b6 Added support for forcing languages 2018-05-24 12:32:06 -06:00
Chi Vinh Le e1298e4fd9 Fix Touch issues on IOS Safari (iPad) 2018-05-24 19:00:07 +02:00
Belén Curcio 0f16d0a7a3 Merge branch 'master' into reject-username 2018-05-24 13:31:59 -03:00
Wyatt Johnson 0c1e4873f8 fixed first time user 2018-05-24 10:11:49 -06:00
okbel f3d89e63d2 Merge branch 'karma' of github.com:coralproject/talk into karma
* 'karma' of github.com:coralproject/talk: (32 commits)
  fixed translations
  "Trust" flag to "Karma" and updated translations
  adjusted karma tooltip
  field renamed
  patches to reliability computation based on settings
  add from to import statement
  Remuve dupe "apply"
  Fix broken link to tokenusernotfound
  Make it so low threshold is included in karma calc
  Fix incorrect statement regarding GDPR
  simplified language negotiation
  Docs typo
  relying on ip
  req not properly passed
  German translations for the email notification plugins.
  Small modification
  doc patch
  fix for custom css
  fixes to csp policy
  disable by default
  ...
2018-05-24 13:09:13 -03:00
Wyatt Johnson 0835f3f321 fixed translations 2018-05-23 17:16:51 -06:00
Wyatt Johnson 9a73c6db59 "Trust" flag to "Karma" and updated translations 2018-05-23 16:18:22 -06:00
Wyatt Johnson 97416d421b adjusted karma tooltip 2018-05-23 16:18:22 -06:00
Wyatt Johnson f36b6e2cb6 field renamed 2018-05-23 16:18:22 -06:00
Wyatt Johnson 975448ec69 patches to reliability computation based on settings 2018-05-23 16:18:22 -06:00
Mendel Konikov 92420ae827 Fix hr line on older devices 2018-05-23 17:42:40 -04:00
Mendel Konikov a6ec021bd1 Explicitly set opacity to 1 for iPhone 2018-05-23 17:25:09 -04:00
Kim Gardner 921b85fba3 Merge branch 'master' into karma 2018-05-23 16:47:52 -04:00
Kim Gardner 9c7ed62cba Merge pull request #1644 from erikreyna/patch-1
add from to import statement
2018-05-23 16:47:02 -04:00
Wyatt Johnson b7a053c011 Merge branch 'master' into patch-1 2018-05-23 13:28:20 -06:00
Kim Gardner 6548df971c Merge branch 'master' into karma 2018-05-23 15:19:32 -04:00
Kim Gardner 27818d966d Merge pull request #1642 from babolivier/patch-1
[Doc] Fix incorrect statement regarding GDPR
2018-05-23 14:43:46 -04:00
Erik Reyna f7f6ed635c add from to import statement
from expected from import statement, thanks eslint
2018-05-23 14:24:11 -04:00
Wyatt Johnson 61c09f5818 Merge branch 'master' into patch-1 2018-05-23 12:17:05 -06:00
Wyatt Johnson def20a3b37 Merge pull request #1643 from smic1909/patch-1
Fix broken link to tokenusernotfound
2018-05-23 12:16:48 -06:00
Wyatt Johnson 4ae3e90422 Merge branch 'master' into patch-1 2018-05-23 12:09:44 -06:00
Wyatt Johnson 9539073eb8 Merge pull request #1633 from coralproject/csp
Content Security Policy + Nunjacks
2018-05-23 12:08:45 -06:00
Wyatt Johnson 422260607e Merge branch 'master' into csp 2018-05-23 11:53:24 -06:00
Wyatt Johnson a16c584880 Merge branch 'master' into patch-1 2018-05-23 11:25:14 -06:00
Wyatt Johnson 3fcc85139d Merge pull request #1641 from coralproject/locales
Locale Negotiation
2018-05-23 10:12:27 -06:00
okbel 17f76e85b0 changes 2018-05-23 13:07:34 -03:00
Brendan Abolivier a95d55b6da Remuve dupe "apply" 2018-05-23 10:05:21 +02:00
Simon 879865a4c1 Fix broken link to tokenusernotfound
Fix broken link to tokenusernotfound
2018-05-23 09:14:32 +02:00
Kim Gardner 8405bdf9bc Merge branch 'karma' of git+ssh://github.com/coralproject/talk into karma 2018-05-22 20:12:40 -04:00
Kim Gardner 8e24d4f5c6 Make it so low threshold is included in karma calc 2018-05-22 20:12:17 -04:00
Kim Gardner 9265d29ac0 Merge branch 'master' into karma 2018-05-22 19:00:12 -04:00
Brendan Abolivier 849fe37b9b Fix incorrect statement regarding GDPR
GDPR's reach doesn't depend on the person or business's location, but on whether this person or this business include european citizen in its target (which can be easy to state for a business, but not that much for an individual).
2018-05-22 23:25:12 +02:00
Wyatt Johnson 1a52ad5d97 Merge branch 'master' into locales 2018-05-22 14:42:43 -06:00
Wyatt Johnson b984af3e2e Merge pull request #1638 from coralproject/akismet-bug
Akismet Bug - Req not properly passed
2018-05-22 14:42:24 -06:00
Wyatt Johnson 10a786f84d simplified language negotiation 2018-05-22 14:21:32 -06:00
Mendel Konikov 4f5f424c77 Remove wordbreak 2018-05-22 15:49:19 -04:00
Kiwi 9b4455f7bd Merge branch 'master' into csp 2018-05-22 16:39:20 -03:00
Kim Gardner 3a12e776c3 Merge branch 'master' into akismet-bug 2018-05-22 15:01:50 -04:00
Kim Gardner 6667bbe01f Docs typo 2018-05-22 13:18:28 -04:00
Kim Gardner 583cb6566b Merge branch 'master' into karma 2018-05-22 12:54:09 -04:00
Kim Gardner f90e17c3e0 Merge pull request #1625 from coralproject/party-fixes
Displaying multiple external provider IDs
2018-05-22 12:52:08 -04:00
Kim Gardner 71b1259db6 Merge branch 'master' into akismet-bug 2018-05-22 12:21:53 -04:00
Kiwi a39b967164 Merge branch 'master' into party-fixes 2018-05-22 13:19:08 -03:00
okbel b411f3e059 relying on ip 2018-05-22 13:08:59 -03:00
okbel 1aed51468f req not properly passed 2018-05-22 12:40:21 -03:00
Kim Gardner fd271d237c Merge branch 'master' into csp 2018-05-22 10:44:08 -04:00
Kim Gardner 04ae6fbb43 Merge pull request #1637 from conversario/notification-translations
German translations for the email notification plugins.
2018-05-22 10:43:50 -04:00
Fabian Neumann 4767354379 German translations for the email notification plugins. 2018-05-22 12:36:25 +02:00
Kim Gardner 55998a67da Merge branch 'master' into csp 2018-05-21 16:18:46 -04:00
Kim Gardner eee1e858bf Merge pull request #1634 from mkonikov/disabled-download-button
Show overflow text on download comments button when disabled
2018-05-21 16:18:30 -04:00
Kiwi 2c9d30bfd2 Small modification
Removed obsolete line and add todo
2018-05-21 17:09:36 -03:00
Kim Gardner 763833783d Merge branch 'master' into disabled-download-button 2018-05-21 15:22:51 -04:00
Kim Gardner 1f5e3d9f3f Merge pull request #1635 from conversario/translations-de-4.4.1
German translations for v4.4.1
2018-05-21 11:19:05 -04:00
Kim Gardner 30f03f5fb8 Merge branch 'master' into disabled-download-button 2018-05-21 11:07:59 -04:00
Kim Gardner 43c7b6f23f Merge branch 'master' into karma 2018-05-21 11:07:34 -04:00
Kim Gardner ced9d2ea4b Merge branch 'master' into translations-de-4.4.1 2018-05-21 11:06:17 -04:00
Wyatt Johnson 5aba578a98 doc patch 2018-05-18 16:47:58 -06:00
Wyatt Johnson dd0ad17038 fix for custom css 2018-05-18 16:44:43 -06:00
Wyatt Johnson 868343a29b fixes to csp policy 2018-05-18 16:42:23 -06:00
Wyatt Johnson 5403872bb7 disable by default 2018-05-18 16:21:53 -06:00
Wyatt Johnson f58e3df439 added config for report only mode 2018-05-18 16:21:53 -06:00
Wyatt Johnson 000d9ae56a Merge branch 'master' into csp 2018-05-18 15:28:26 -06:00
Kim Gardner e2ba08e708 Merge pull request #1632 from mkonikov/extra-p
Only display paragraph if delete requested
2018-05-18 17:18:00 -04:00
Kim Gardner 20860bb773 Merge branch 'master' into extra-p 2018-05-18 16:33:27 -04:00
Kim Gardner b15766bf80 Merge pull request #1629 from coralproject/rte-bugfixes
RTE Bugfixes
2018-05-18 16:33:15 -04:00
Kim Gardner 531cb0793f Merge branch 'master' into rte-bugfixes 2018-05-18 16:24:30 -04:00
Wyatt Johnson 8265c13149 Merge branch 'master' into extra-p 2018-05-18 11:26:37 -06:00
okbel b816053191 Updating the cache 2018-05-18 14:07:10 -03:00
Mendel Konikov ffa6b99d09 Wrap els in div 2018-05-18 12:32:24 -04:00
okbel 0e8065cdf9 Styling 2018-05-18 13:31:50 -03:00
Wyatt Johnson 9484d4c6f5 Merge branch 'master' into csp 2018-05-18 10:11:39 -06:00
Belén Curcio 5ebbc24264 Merge branch 'master' into karma 2018-05-18 13:09:07 -03:00
okbel 43e0f95aa6 Merge branch 'party-fixes' of github.com:coralproject/talk into party-fixes
* 'party-fixes' of github.com:coralproject/talk: (33 commits)
  patched migration bugs
  Don't close popup when there is an error
  Update .nsprc
  fix optimisticResponse typo
  Remove deprecated useMongoClient
  Update lint-staged to fix dependency issue
  copy updates
  Update package.json
  Ready
  Set is_test to false
  Removing
  Added support for new indexes
  Remove unused variable 2
  Remove unused variable
  Remove ModerationIndicator from container
  Show username already exists error
  No indicator on new queue
  Exclude deleted when loading more
  Remove modqueue counts on the frontend
  sepatate state
  ...
2018-05-18 13:07:03 -03:00
okbel 1f40d6b7bb replacing by a one liner :) 2018-05-18 13:05:46 -03:00
Fabian Neumann 8ee90387f6 German translations for v4.4.1 2018-05-18 16:03:30 +02:00
Wyatt Johnson 43170121f3 Merge branch 'master' into party-fixes 2018-05-17 21:03:12 -06:00
Wyatt Johnson 4f001bbdf2 Merge pull request #1628 from conversario/withremovetag-typo
fix optimisticResponse typo
2018-05-17 21:02:37 -06:00
Wyatt Johnson f5362f445a Merge branch 'master' into withremovetag-typo 2018-05-17 20:48:33 -06:00
Wyatt Johnson 1bcf1a23fc Merge branch 'master' into extra-p 2018-05-17 20:34:37 -06:00
Wyatt Johnson b2306066ce Merge pull request #1627 from coralproject/upgrade-mongoose
Upgrade Mongoose
2018-05-17 20:32:40 -06:00
Wyatt Johnson ebcff4d95e patched migration bugs 2018-05-17 18:58:01 -06:00
Wyatt Johnson 2484066922 Merge branch 'master' into upgrade-mongoose 2018-05-17 18:43:24 -06:00
Wyatt Johnson 2822a2dddd Merge branch 'master' into csp 2018-05-17 18:43:12 -06:00
Mendel Konikov 5f410276c6 Show overflow text on download comments button when disabled 2018-05-17 20:41:59 -04:00
Wyatt Johnson c84a9716a1 added support for csp 2018-05-17 18:37:50 -06:00
Mendel Konikov d83c2fd566 Only display paragraph if delete requested 2018-05-17 20:03:12 -04:00
Kim Gardner cd6aacbc76 Merge pull request #1607 from coralproject/admin-auth
External Signin for Admin
2018-05-17 19:08:21 -04:00
Wyatt Johnson 95072be97e switched ejs for nunjucks 2018-05-17 15:59:49 -06:00
Kiwi f0589fba26 Merge branch 'master' into admin-auth 2018-05-17 16:36:32 -03:00
Chi Vinh Le 417befd52a Don't close popup when there is an error 2018-05-17 21:34:37 +02:00
Wyatt Johnson 8d8cd57d79 Merge branch 'master' into upgrade-mongoose 2018-05-17 13:19:09 -06:00
Wyatt Johnson 086c43a003 Update .nsprc 2018-05-17 13:18:57 -06:00
Wyatt Johnson 887f7e17f4 server side 2018-05-17 11:38:00 -06:00
okbel 6444e8c2ab Karma 2018-05-17 13:48:30 -03:00
Leandro 0339e97b37 fix optimisticResponse typo 2018-05-17 16:39:04 +02:00
Kiwi ae88ae3f98 Merge pull request #1614 from conversario/comment-tombstone-slot
Add new slot 'commentTombstone'
2018-05-16 21:00:13 -03:00
Kim Gardner 5241206b03 Remove deprecated useMongoClient 2018-05-16 18:24:34 -04:00
Kim Gardner 663caa1001 Update lint-staged to fix dependency issue 2018-05-16 18:18:36 -04:00
Chi Vinh Le d07c54918d Indent, outdent fixes 2018-05-16 21:37:48 +02:00
Chi Vinh Le 2eac8f48d6 Workaround IOS focus bug when clicking on buttons 2018-05-16 21:37:35 +02:00
Wyatt Johnson 1a29f374a5 Merge branch 'master' into reject-username 2018-05-16 11:20:28 -06:00
Kim Gardner 3a383ff8ba Merge branch 'master' into admin-auth 2018-05-16 12:58:59 -04:00
Kim Gardner 34760653a2 Merge branch 'master' into comment-tombstone-slot 2018-05-16 12:58:51 -04:00
Kim Gardner d176578aed Merge branch 'master' into party-fixes 2018-05-16 12:41:34 -04:00
Kim Gardner e3323ce5ec Merge pull request #1544 from conversario/global-switchoff
New setting: Disable commenting site-wide
2018-05-16 12:14:09 -04:00
Belén Curcio 7fc5c5a6be Merge branch 'master' into comment-tombstone-slot 2018-05-16 12:55:24 -03:00
okbel 2524004e2a Styling 2018-05-16 11:55:05 -03:00
okbel 91060537bb displaying multiple provider ids 2018-05-16 11:51:28 -03:00
Kim Gardner f0b87501c0 Merge branch 'master' into admin-auth 2018-05-15 19:06:27 -04:00
Kim Gardner ea6757cce5 Merge branch 'master' into global-switchoff 2018-05-15 18:55:58 -04:00
Kim Gardner cb9945053f Merge pull request #1624 from coralproject/username-change-copy
Username change copy
2018-05-15 18:48:31 -04:00
Kim Gardner fca6603b38 Merge branch 'master' into admin-auth 2018-05-15 18:13:05 -04:00
Kim Gardner 56ee58efdf Merge branch 'master' into global-switchoff 2018-05-15 17:55:35 -04:00
Wyatt Johnson 0b407d516b copy updates 2018-05-15 15:51:14 -06:00
Fabian Neumann 8e392ef32d Remove superfluous className 2018-05-14 15:01:51 +02:00
Fabian Neumann 36063b459e Add new slot 'commentTombstone'.
With this slot plugins can override the default tombstone for deleted
comments.
2018-05-14 13:57:46 +02:00
Kim Gardner 400890237c Merge branch 'master' into admin-auth 2018-05-11 18:06:53 -04:00
Wyatt Johnson bde1dff33b changed to seperate slot 2018-05-11 14:45:03 -06:00
Kim Gardner e8cce02bef Merge branch 'master' into global-switchoff 2018-05-11 11:56:35 -04:00
Fabian Neumann 1236e7a504 Disable/hide the reply buttons when commenting is disabled. 2018-05-11 12:52:44 +02:00
Fabian Neumann bae20c38ec Rename globalSwitchoff to disableCommenting. 2018-05-11 12:21:13 +02:00
Fabian Neumann d731357001 Remove plugin docs for global-switchoff. Not a plugin anymore. 2018-05-11 12:20:26 +02:00
Fabian Neumann f28a3f2f4e Add test case: err if trying to comment while it's disabled 2018-05-11 11:28:58 +02:00
Fabian Neumann 48fc3ab5db Move "global switchoff" code from plugin to core 2018-05-11 11:28:58 +02:00
Fabian Neumann fab15daacd Fix: use the correct keys to get the settings 2018-05-11 11:19:09 +02:00
Fabian Neumann 499030028c Add hooks to RootMutation to save our setting in the database. 2018-05-11 11:19:09 +02:00
Fabian Neumann bbd3050b95 Small refactoring 2018-05-11 11:19:09 +02:00
Fabian Neumann b73620bcb0 WIP 2018-05-11 11:19:09 +02:00
Mendel Konikov 63400a455f Merge https://github.com/coralproject/talk 2018-05-10 20:53:41 -04:00
Wyatt Johnson 33be00a540 Added support for external signins on Admin 2018-05-10 16:44:19 -06:00
Kim Gardner 5911f3e28e Merge branch 'master' into master 2018-05-07 20:35:28 -04:00
Kim Gardner 040447833c Merge branch 'master' into master 2018-05-02 12:00:19 -04:00
Mendel Konikov b7d8fb950b Merge master 2018-05-01 20:25:05 -04:00
Kim Gardner c60ed59a75 Merge branch 'master' into reject-username 2018-04-24 17:12:41 -04:00
Kim Gardner 976f92cb11 Merge branch 'master' into master 2018-04-24 14:12:46 -04:00
Cristian Dean ded8367b07 Merge branch 'master' into master 2018-04-18 10:04:49 -03:00
Wyatt Johnson 1071e86f96 Check if token is in localStorage before logout 2018-04-18 10:02:48 -03:00
Wyatt Johnson da68b222b7 Merge branch 'master' into reject-username 2018-04-17 13:10:45 -06:00
okbel 42ca5743aa flow checks 2018-04-16 16:07:00 -03:00
Wyatt Johnson c2b14fca10 fixed mutation 2018-04-13 14:34:39 -06:00
Wyatt Johnson 9e2b1c5af3 Merge branch 'master' into reject-username 2018-04-12 11:04:30 -06:00
okbel 8f0d05da2e Merge branch 'reject-username' of github.com:coralproject/talk into reject-username
* 'reject-username' of github.com:coralproject/talk: (36 commits)
  Authors cannot see their own status history
  Permission Updates
  Added User Roles to the menu
  Bullets replaced with asterisks per markdown
  Update 03-04-user-roles.md
  Rename 03-03-user-roles.md to 03-04-user-roles.md
  Create 03-03-user-roles.md
  Rename 03-06-product-guide-trust.md to 03-07-product-guide-trust.md
  Rename 03-05-product-guide-trust.md to 03-06-product-guide-trust.md
  Rename 03-04-product-guide-trust.md to 03-05-product-guide-trust.md
  Refactored Errors
  removed unused coral-docs
  updated version
  FrenchCorrections
  New version of the translation
  added missing translations
  add missing strings in fr locale
  improved support
  Logging Improvements
  Add Finnish translation
  ...
2018-04-12 00:14:21 -03:00
okbel 3d3a46070c Adding translations 2018-04-12 00:09:33 -03:00
Belén Curcio fbc551a76e Merge branch 'master' into reject-username 2018-04-11 23:58:10 -03:00
okbel 8563ddffd3 Adding functionality and design functionality 2018-04-11 23:55:50 -03:00
Mendel Konikov 3915ffc4e0 Merge master 2018-04-10 20:10:21 -04:00
okbel 7955b28a75 Adding rejectUsername 2018-04-04 07:59:13 -03:00
Mendel Konikov ac9899406a Merge 2018-03-07 12:02:01 -05:00
Mendel Konikov 13e1b288b3 Add more translations 2018-03-07 12:00:38 -05:00
Mendel Konikov 8c8f5d8fee Fix apostrophes 2018-03-07 12:00:38 -05:00
Mendel Konikov 35cf694b60 Add More hebrew translations 2018-03-07 12:00:38 -05:00
Mendel Konikov fa4dbfe9d0 Trigger build 2018-03-07 12:00:38 -05:00
Mendel Konikov 0ea08ccc9c Remove extra space 2018-03-07 12:00:38 -05:00
Mendel Konikov fd5bbe0234 Viewing options Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov b43f657c8d Toxic comments Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 9456c79bad Most respected Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 0cd18a458d More Hebrew translations 2018-03-07 12:00:38 -05:00
Mendel Konikov fdcd1404ef Most loved Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 741d5000dd Most liked Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 8f413852d9 Settings Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 420fc6daa7 Off-top Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov ad69086888 Moderation actions Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov f18c51dc68 Member since Hebrew Translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 8e1822af21 Google Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 5d3e8f3fb6 Flag Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 71288f543e Featured comments Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov a1890a0bfe Facebook Auth translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 1f17d71a76 Ignore user hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov fc8b9c3547 Like hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov 8ebb90c160 Subscriber hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov b0c230a1df Akismet Hebrew translations 2018-03-07 12:00:38 -05:00
Mendel Konikov be15734c77 Respect hebrew translations 2018-03-07 12:00:38 -05:00
Mendel Konikov 4478ced205 Auth Hebrew translations 2018-03-07 12:00:38 -05:00
Mendel Konikov 769437c8fb Add more translations 2018-03-07 12:00:38 -05:00
Mendel Konikov 5fde3235ad Add Hebrew template to all translation files 2018-03-07 12:00:38 -05:00
Mendel Konikov 2a8975711a Begin adding Hebrew translation 2018-03-07 12:00:38 -05:00
Mendel Konikov da56cd5b18 Add more translations 2018-03-06 13:02:03 -05:00
Mendel Konikov 90424b4766 Fix apostrophes 2018-02-26 16:39:28 -05:00
Mendel Konikov cf23bdba12 Add More hebrew translations 2018-02-26 16:37:40 -05:00
Mendel Konikov 0f983109e1 Trigger build 2018-02-26 16:14:16 -05:00
Mendel Konikov 8f7edde93f Remove extra space 2018-02-24 21:38:07 -05:00
Mendel Konikov 1946d023cd Viewing options Hebrew translation 2018-02-24 21:27:31 -05:00
Mendel Konikov 1e5f5848b2 Toxic comments Hebrew translation 2018-02-24 21:25:58 -05:00
Mendel Konikov 3cbf5fef07 Most respected Hebrew translation 2018-02-24 21:21:02 -05:00
Mendel Konikov 4f276ed944 More Hebrew translations 2018-02-24 21:19:43 -05:00
Mendel Konikov e69afc4e76 Most loved Hebrew translation 2018-02-24 21:17:02 -05:00
Mendel Konikov c4b46c28fe Most liked Hebrew translation 2018-02-24 21:15:51 -05:00
Mendel Konikov dac823f9c4 Settings Hebrew translation 2018-02-24 21:14:00 -05:00
Mendel Konikov 65deb1cfbe Off-top Hebrew translation 2018-02-24 21:12:04 -05:00
Mendel Konikov 828f200eb6 Moderation actions Hebrew translation 2018-02-24 21:10:23 -05:00
Mendel Konikov fe5c95c27a Member since Hebrew Translation 2018-02-24 21:06:24 -05:00
Mendel Konikov c7fad00b66 Google Hebrew translation 2018-02-24 21:05:14 -05:00
Mendel Konikov 5165d06d64 Flag Hebrew translation 2018-02-24 21:03:10 -05:00
Mendel Konikov e15275666e Featured comments Hebrew translation 2018-02-24 21:01:25 -05:00
Mendel Konikov 1dc8df4189 Facebook Auth translation 2018-02-24 20:43:18 -05:00
Mendel Konikov ffe83452cd Ignore user hebrew translation 2018-02-24 20:41:22 -05:00
Mendel Konikov 3c3603ee08 Like hebrew translation 2018-02-24 20:34:22 -05:00
Mendel Konikov f6e94b0cc2 Subscriber hebrew translation 2018-02-24 20:30:34 -05:00
Mendel Konikov c3f92e8c8d Akismet Hebrew translations 2018-02-24 20:27:52 -05:00
Mendel Konikov 84a121a1d9 Respect hebrew translations 2018-02-24 20:22:12 -05:00
Mendel Konikov f55f1341e1 Auth Hebrew translations 2018-02-24 20:19:20 -05:00
Mendel Konikov cccac6a8bc Add more translations 2018-02-23 12:17:13 -05:00
Mendel Konikov e775a9f092 Add Hebrew template to all translation files 2018-02-23 12:00:01 -05:00
Mendel Konikov 76237f42da Begin adding Hebrew translation 2018-02-23 11:29:28 -05:00
Mendel Konikov 6e942a1121 Fix typos in comments 2018-02-23 11:11:41 -05:00
508 changed files with 21876 additions and 10094 deletions
+3 -3
View File
@@ -41,9 +41,9 @@ integration_job: &integration_job
- attach_workspace:
at: ~/coralproject/talk
- <<: *create_indexes
- run:
name: Setup the database with defaults
command: ./bin/cli setup --defaults
# - run:
# name: Setup the database with defaults
# command: ./bin/cli setup --defaults
- run:
name: Run the integration tests
command: bash .circleci/e2e.sh
+5
View File
@@ -2,5 +2,10 @@
"env": {
"jest": true
},
"settings": {
"react": {
"version": "15.0"
}
},
"extends": "@coralproject/eslint-config-talk"
}
+1
View File
@@ -45,6 +45,7 @@ plugins/*
!plugins/talk-plugin-moderation-actions
!plugins/talk-plugin-notifications
!plugins/talk-plugin-notifications-category-featured
!plugins/talk-plugin-notifications-category-moderation-actions
!plugins/talk-plugin-notifications-category-reply
!plugins/talk-plugin-notifications-category-staff
!plugins/talk-plugin-notifications-digest-daily
+2 -1
View File
@@ -7,6 +7,7 @@
"https://nodesecurity.io/advisories/594",
"https://nodesecurity.io/advisories/603",
"https://nodesecurity.io/advisories/611",
"https://nodesecurity.io/advisories/612"
"https://nodesecurity.io/advisories/612",
"https://nodesecurity.io/advisories/654"
]
}
+2
View File
@@ -0,0 +1,2 @@
8
+4
View File
@@ -0,0 +1,4 @@
overrides:
- files: "bin/cli*"
options:
parser: babylon
+4 -76
View File
@@ -1,78 +1,6 @@
# Contributor Covenant Code of Conduct
# Mozilla Community Participation Guidelines
## Our Pledge
## Version 2.3 - Updated May 16, 2017
We expect everyone contributing to The Coral Project to follow this code of conduct. That means the team, contractors we employ, contributors, as well as anyone posting to our public or internal-facing channels.
We created it not because we anticipate any unacceptable behavior, but because we believe that articulating our values and obligations to one another reinforces the already exceptional level of respect among the team, and because having a code provides us with clear avenues to correct our culture should it ever stray from that course.
We commit to enforce and evolve this code over the duration of the project.
## Expected behavior
* Be supportive of each other.
* Be collaborative. Involve others in brainstorms, sketching sessions, code reviews, planning documents, and the like. Its not only okay to ask for help or feedback often, its unacceptable not to do so.
* Be generous and kind in both giving and accepting critique. Critique is a natural and important part of our culture. Good critiques are kind, respectful, clear, and constructive, focused on goals and requirements rather than personal preferences. You are expected to give and receive criticism with grace.
* Be humane. Be polite and friendly in all forms of communication, especially remote communication, where opportunities for misunderstanding are greater. Use sarcasm carefully. Tone is hard to decipher online; make judicious use of emoji to aid in communication.
* Be considerate.
* Be tolerant.
* Respect peoples boundaries.
* Do not make it personal.
* Use welcoming and inclusive language.
* Offer to help if you see someone struggling or otherwise in need of assistance (taking care not to be patronizing or disrespectful).
* If someone approaches you looking for help, be generous with your time; if youre under a deadline, direct them to someone else who may be of assistance.
* Go out of your way to include people in jokes or memes, recognizing that we want to build an environment free of cliques.
* Show empathy towards other community members
## Unacceptable behavior
We are committed to providing a welcoming and safe environment for people of all races, gender identities, gender expressions, sexual orientations, physical abilities, physical appearances, socioeconomic backgrounds, nationalities, ages, religions, and beliefs.
We expect that you will refrain from demeaning, discriminatory, or harassing behavior and speech.
Harassment includes, but is not limited to: deliberate intimidation; stalking; unwanted photography or recording; sustained or willful disruption of talks or other events; inappropriate physical contact; use of sexual or discriminatory imagery, comments, or jokes; and unwelcome sexual attention.
Furthermore, any behavior or language which is unwelcoming—whether or not it rises to the level of harassment—is also strongly discouraged. Much exclusionary behavior takes the form of microaggressions—subtle put-downs which may be unconsciously delivered. Regardless of intent, microaggressions can have a significant negative impact on victims and have no place on our team.
Other inappropriate behavior:
* Threats
* Slurs
* Pornography
* Spam
* Bullying
* Copyright infringement
* Impersonation of someone else
* Violating someones privacy
If you feel that someone has harassed you or otherwise treated you or someone else inappropriately, please alert the project lead at [andrewl@mozillafoundation.org](mailto:andrewl@mozillafoundation.org).
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
These guidelines are ambitious, and were not always going to succeed in meeting them. When something goes wrong—whether its a microaggression or an instance of harassment — there are a number of things you can do to address the situation. Depending on your comfort level and the severity of the situation, here are some suggestions:
* Address it directly. If youre comfortable bringing up the incident with the person who instigated it, pull them aside to discuss how it affected you. Be sure to approach these conversations in a forgiving spirit: an angry or tense conversation will not do either of you any good. If youre unsure how to go about that, try discussing with your manager or with the people and culture team first—they might have some advice about how to make this conversation happen.
If youre too frustrated to have a direct conversation, there are a number of alternate routes you can take.
* Talk to a peer or mentor. Your colleagues are likely to have personal and professional experience on which to draw that could be of use to you. If you have someone youre comfortable approaching, reach out and discuss the situation with them. They may be able to advise on how they would handle it, or direct you to someone who can. The flip side of this, of course, is that you should also be available when your colleagues reach out to you.
* Contact the project lead, Andrew Losowsky, [andrewl@mozillafoundation.org](mailto:andrewl@mozillafoundation.org), or the technical lead. We will work with you to help you figure out how to ensure that any conflict doesnt interfere with your work, in confidence if you would prefer.
* Talk to Chris Lawrence. Chris oversees the project. He can be contacted at [clawrence@mozillafoundation.org](mailto:clawrence@mozillafoundation.org).
If you feel you have been unfairly accused of violating this code of conduct, you should contact Chris with a concise description of your grievance.
## Conclusion
We welcome your feedback on this and every other aspect of what we do as The Coral Project, and we thank you for working with us to make it a safe, enjoyable, and friendly experience for everyone involved in the project and what we do.
Above text is licensed CC BY-SA 4.0, adapted from the SRCCON code of conduct, FreeBSDs code of conduct, Vox Medias product team code of conduct, Mediums code of conduct, as well as adapted from the Contributor Covenant.
The heart of Mozilla is people. We put people first and do our best to recognize, appreciate and respect the diversity of our global contributors. The Mozilla Project welcomes contributions from everyone who shares our goals and wants to contribute in a healthy and constructive manner within our community. As such, we have adopted this code of conduct and require all those who participate to agree and adhere to these Community Participation Guidelines in order to help us create a safe and positive community experience for all.
https://www.mozilla.org/en-US/about/governance/policies/participation/
+5 -1
View File
@@ -4,11 +4,15 @@ FROM coralproject/talk:latest
ONBUILD ARG TALK_ADDTL_COMMENTS_ON_LOAD_MORE=10
ONBUILD ARG TALK_ASSET_COMMENTS_LOAD_DEPTH=10
ONBUILD ARG TALK_REPLY_COMMENTS_LOAD_DEPTH=3
ONBUILD ARG TALK_ADDTL_REPLIES_ON_LOAD_MORE=999999
ONBUILD ARG TALK_THREADING_LEVEL=3
ONBUILD ARG TALK_DEFAULT_STREAM_TAB=all
ONBUILD ARG TALK_DISABLE_EMBED_POLYFILL=FALSE
ONBUILD ARG TALK_DEFAULT_LANG=en
ONBUILD ARG TALK_WHITELISTED_LANGUAGES
ONBUILD ARG TALK_PLUGINS_JSON
ONBUILD ARG TALK_WEBPACK_SOURCE_MAP
ONBUILD ARG TALK_DEFAULT_LAZY_RENDER
# Bundle app source
ONBUILD COPY . /usr/src/app
@@ -20,4 +24,4 @@ ONBUILD COPY . /usr/src/app
ONBUILD RUN cli plugins reconcile && \
yarn && \
yarn build && \
yarn cache clean
yarn cache clean
+15 -15
View File
@@ -1,18 +1,12 @@
# Talk &middot; [![CircleCI](https://circleci.com/gh/coralproject/talk.svg?style=svg)](https://circleci.com/gh/coralproject/talk) &middot; [![NSP Status](https://nodesecurity.io/orgs/coralproject/projects/7bd7d26c-47ed-4a5f-8c4a-b919bf1c2946/badge)](https://nodesecurity.io/orgs/coralproject/projects/7bd7d26c-47ed-4a5f-8c4a-b919bf1c2946) &middot; [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)
# Talk &middot; [![CircleCI](https://circleci.com/gh/coralproject/talk.svg?style=svg)](https://circleci.com/gh/coralproject/talk) &middot; [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)
Online comments are broken. Our open-source commenting platform, Talk, rethinks how moderation, comment display, and conversation function, creating the opportunity for safer, smarter discussions around your work. [Read more about Talk here](https://coralproject.net/products/talk.html).
Online comments are broken. Our open-source commenting platform, Talk, rethinks how moderation, comment display, and conversation function, creating the opportunity for safer, smarter discussions around your work. [Read more about Talk here](https://coralproject.net/talk).
Built with <3 by The Coral Project & Mozilla.
Built with <3 by The Coral Project, a part of [Vox Media](https://www.voxmedia.com/a/go-deeper/about).
## Try Talk!
## Getting Started
You're just one click away from trying Talk - all you need is a Heroku account and a few minutes of your time.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Fcoralproject%2Ftalk&env[TALK_FACEBOOK_APP_ID]=ignore&env[TALK_FACEBOOK_APP_SECRET]=ignore)
## Technical Documentation
From getting up and running, to advanced configuration, to how to scale Talk, our [Talk Technical Docs](https://docs.coralproject.net/talk/) have everything you need to know.
Check out our Quickstart and Install guides to get started with Talk in our [Technical Docs](https://docs.coralproject.net/talk/).
## Product Guide
@@ -20,13 +14,19 @@ Learn more about Talk, including a deep dive into features for commenters and mo
## Pre-Launch Guide
Youve installed Talk on your server, and youre preparing to launch it on your site. The real community work starts now, before you go live. You have a unique opportunity pre-launch to set your community up for success. Read our [Talk Community Guide](https://blog.coralproject.net/youve-installed-talk-now-what/).
Youve installed Talk on your server, and youre preparing to launch it on your site. The real community work starts now, before you go live. You have a unique opportunity pre-launch to set your community up for success. Read our [Talk Community Guide](https://coralproject.net/blog/youve-installed-talk-now-what/).
## Advanced Usage
For advanced configuration and usage of Talk, check out our [Configuration](https://docs.coralproject.net/talk/advanced-configuration/) and [Integration](https://docs.coralproject.net/talk/integrating/authentication/) how-tos. This covers topics in which you will need dev support to fully customize and integrate Talk, such as SSO/authentication, creating and managing assets and articles, styling Talk with custom CSS, and setting up Notifications and SMTP support.
## Versions & Upgrading
Check our Releases page for the latest recommended release version. [Releases](https://github.com/coralproject/talk/releases) All future even-numbered versions are considered stable LTS versions. We recommend the latest verified release for use in production environments.
## More Resources
- [Talk Product Roadmap](https://www.pivotaltracker.com/n/projects/1863625)
- [Our Blog](https://blog.coralproject.net/)
- [Community Forums](https://community.coralproject.net/)
- [Our Blog](https://coralproject.net/blog)
- [Community Guides for Journalism](https://guides.coralproject.net/)
- [More About Us](https://coralproject.net/)
+22 -1
View File
@@ -1,4 +1,6 @@
const express = require('express');
const nunjucks = require('nunjucks');
const cons = require('consolidate');
const trace = require('./middleware/trace');
const logging = require('./middleware/logging');
const path = require('path');
@@ -72,7 +74,26 @@ app.use(
// VIEW CONFIGURATION
//==============================================================================
app.set('views', path.join(__dirname, 'views'));
// configure the default views directory.
const views = path.join(__dirname, 'views');
app.set('views', views);
// reconfigure nunjucks.
cons.requires.nunjucks = nunjucks.configure(views, {
autoescape: true,
trimBlocks: true,
lstripBlocks: true,
watch: process.env.NODE_ENV === 'development',
});
// assign the nunjucks engine to .njk files.
app.engine('njk', cons.nunjucks);
// assign the ejs engine to .ejs and .html files.
app.engine('ejs', cons.ejs);
app.engine('html', cons.ejs);
// set .ejs as the default extension.
app.set('view engine', 'ejs');
//==============================================================================
+4
View File
@@ -18,6 +18,10 @@
"value": "",
"required": true
},
"MAILGUN_SMTP_PASSWORD": {
"value": "",
"required": true
},
"NODE_ENV": "production",
"REWRITE_ENV": "TALK_MONGO_URL:MONGO_URI,TALK_REDIS_URL:REDIS_URL,TALK_SMTP_HOST:MAILGUN_SMTP_SERVER,TALK_SMTP_PORT:MAILGUN_SMTP_PORT,TALK_SMTP_USERNAME:MAILGUN_SMTP_LOGIN,TALK_SMTP_PASSWORD:MAILGUN_SMTP_PASSWORD",
"NPM_CONFIG_PRODUCTION": "false"
+30 -1
View File
@@ -7,7 +7,7 @@
const util = require('./util');
const program = require('commander');
const parseDuration = require('ms');
const Table = require('cli-table');
const Table = require('cli-table2');
const AssetModel = require('../models/asset');
const CommentModel = require('../models/comment');
const AssetsService = require('../services/assets');
@@ -219,6 +219,28 @@ async function rewrite(search, replace, options) {
}
}
/**
* debugAssetURL will scrape the given URL and print it's scraped values.
*/
async function debugAssetURL(url) {
try {
const meta = await scraper.scrape(url);
const table = new Table({ head: ['Property', 'Value'] });
for (const [property, value] of Object.entries(meta)) {
table.push([property, value]);
}
console.log(table.toString());
util.shutdown(0);
} catch (err) {
console.error(err);
util.shutdown(1);
}
}
//==============================================================================
// Setting up the program command line arguments.
//==============================================================================
@@ -234,6 +256,13 @@ program
.description('list all the assets in the database')
.action(listAssets);
program
.command('debug [url]')
.description(
'prints the scraped metadata that would be added to the given asset'
)
.action(debugAssetURL);
program
.command('refresh [age]')
.description('queues the assets that exceed the age requested')
+37 -24
View File
@@ -143,9 +143,9 @@ async function reconcileRemotePlugins({ dryRun, upgradeRemote }) {
if (fetchable.length > 0) {
console.log(
`$ yarn add --ignore-scripts --ignore-workspace-root-check ${fetchable.map(
({ name, version }) => `${name}@${version}`.cyan
)}`
`$ yarn add --ignore-scripts --ignore-workspace-root-check ${fetchable
.map(({ name, version }) => `${name}@${version}`.cyan)
.join(' ')}`
);
if (!dryRun) {
@@ -162,7 +162,7 @@ async function reconcileRemotePlugins({ dryRun, upgradeRemote }) {
if (output.status) {
throw new Error(
'Could not install external plugins, errors occured during install'
'Could not install external plugins, errors occurred during install'
);
}
@@ -189,7 +189,7 @@ async function reconcileRemotePlugins({ dryRun, upgradeRemote }) {
if (output.status) {
throw new Error(
'Could not install external plugins, errors occured during install'
'Could not install external plugins, errors occurred during install'
);
}
@@ -329,28 +329,41 @@ async function createSeedPlugin() {
if (answers.addPluginsJson) {
const pluginsJson = path.resolve(__dirname, '..', 'plugins.json');
fs
.readJson(pluginsJson)
.then(j => {
// This is a client-side plugin, let's push this.
if (answers.client) {
j.client.push(answers.pluginName);
let j;
try {
j = await fs.readJson(pluginsJson);
} catch (err) {
// Fallback to plugins.default.json if the plugins.json file does not
// exist.
const defaultPluginsJson = path.resolve(
__dirname,
'..',
'plugins.default.json'
);
const output = JSON.stringify(j, null, 2);
fs.writeFileSync(pluginsJson, output);
}
try {
j = await fs.readJson(defaultPluginsJson);
} catch (err) {
// Fallback to an empty one if that also, doesn't exist.
j = { client: [], server: [] };
}
}
// This is a server-side plugin, let's push this.
if (answers.server) {
j.server.push(answers.pluginName);
// This is a client-side plugin, let's push this.
if (answers.client) {
j.client.push(answers.pluginName);
const output = JSON.stringify(j, null, 2);
fs.writeFileSync(pluginsJson, output);
}
})
.catch(err => {
console.error(err);
});
const output = JSON.stringify(j, null, 2);
fs.writeFileSync(pluginsJson, output);
}
// This is a server-side plugin, let's push this.
if (answers.server) {
j.server.push(answers.pluginName);
const output = JSON.stringify(j, null, 2);
fs.writeFileSync(pluginsJson, output);
}
}
console.log(
+17 -5
View File
@@ -1,8 +1,10 @@
#!/usr/bin/env node
const throng = require('throng');
const { CONCURRENCY } = require('../config');
const { logger } = require('../services/logging');
const util = require('./util');
const program = require('commander');
const serve = require('../serve');
//==============================================================================
// Setting up the program command line arguments.
@@ -22,8 +24,18 @@ program
)
.parse(process.argv);
// Start serving.
serve(program).catch(err => {
console.error(err);
util.shutdown(1);
throng({
workers: CONCURRENCY,
start: i => {
logger.info({ workerID: i }, 'started worker');
// Load in the serve.
const serve = require('../serve');
// Start serving.
serve(program).catch(err => {
console.error(err);
util.shutdown(1);
});
},
});
+37 -31
View File
@@ -45,11 +45,10 @@ const performSetup = async () => {
} catch (err) {
// If the error is `not init`, then we're good, otherwise, it's something
// else.
if (err instanceof ErrSettingsNotInit) {
if (!err instanceof ErrSettingsNotInit) {
throw err;
return;
}
throw err;
}
if (program.defaults) {
@@ -138,7 +137,7 @@ const performSetup = async () => {
console.log("\nWe'll ask you some questions about your first admin user.\n");
let user = await inquirer.prompt([
let { username, email } = await inquirer.prompt([
{
type: 'input',
name: 'username',
@@ -161,39 +160,46 @@ const performSetup = async () => {
return 'Email is required';
},
},
{
name: 'password',
message: 'Password',
type: 'password',
filter: password => {
return UsersService.isValidPassword(password).catch(err => {
throw err.message;
});
},
},
{
name: 'confirmPassword',
message: 'Confirm Password',
type: 'password',
filter: (confirmPassword, { password }) => {
if (password !== confirmPassword) {
return Promise.reject(new Error('Passwords do not match'));
}
return UsersService.isValidPassword(confirmPassword).catch(err => {
throw err.message;
});
},
},
]);
let password = '';
while (!password) {
answers = await inquirer.prompt([
{
name: 'password',
message: 'Password',
type: 'password',
filter: password => {
try {
UsersService.isValidPassword(password);
} catch (err) {
throw err.message;
}
return password;
},
},
{
name: 'confirmPassword',
message: 'Confirm Password',
type: 'password',
},
]);
if (answers.password !== answers.confirmPassword) {
console.error('Passwords do not match');
} else {
password = answers.password;
}
}
const ctx = Context.forSystem();
let { user: newUser } = await SetupService.setup(ctx, {
settings: settings.toObject(),
user: {
email: user.email,
username: user.username,
password: user.password,
email,
username,
password,
},
});
+5 -2
View File
@@ -8,7 +8,7 @@ const util = require('./util');
const program = require('commander');
const mongoose = require('../services/mongoose');
const TokensService = require('../services/tokens');
const Table = require('cli-table');
const Table = require('cli-table2');
// Register the shutdown criteria.
util.onshutdown([() => mongoose.disconnect()]);
@@ -49,7 +49,10 @@ async function revokeToken(tokenID) {
async function createToken(userID, tokenName) {
try {
let { pat: { id }, jwt } = await TokensService.create(userID, tokenName);
let {
pat: { id },
jwt,
} = await TokensService.create(userID, tokenName);
console.log(`Created Token[${id}] for User[${userID}] = ${jwt}`);
+3 -2
View File
@@ -8,7 +8,7 @@ const util = require('./util');
const program = require('commander');
const inquirer = require('inquirer');
const { stripIndent } = require('common-tags');
const Table = require('cli-table');
const Table = require('cli-table2');
// Make things colorful!
require('colors');
@@ -105,7 +105,8 @@ function printUserAsTable(user) {
Suspension: user.suspended
? `Until ${user.status.suspension.until}`
: false,
}
},
{ 'Always premod comments': user.alwaysPremod }
);
console.log(table.toString());
@@ -0,0 +1,14 @@
import {
SHOW_ALWAYS_PREMOD_USER_DIALOG,
HIDE_ALWAYS_PREMOD_USER_DIALOG,
} from '../constants/alwaysPremodUserDialog.js';
export const showAlwaysPremodUserDialog = ({ userId, username }) => ({
type: SHOW_ALWAYS_PREMOD_USER_DIALOG,
userId,
username,
});
export const hideAlwaysPremodUserDialog = () => ({
type: HIDE_ALWAYS_PREMOD_USER_DIALOG,
});
+12 -1
View File
@@ -1,4 +1,4 @@
import queryString from 'query-string';
import queryString from 'querystringify';
import {
FETCH_USERS_REQUEST,
@@ -9,6 +9,8 @@ import {
SET_SEARCH_VALUE,
SHOW_BANUSER_DIALOG,
HIDE_BANUSER_DIALOG,
SHOW_ALWAYS_PREMOD_USER_DIALOG,
HIDE_ALWAYS_PREMOD_USER_DIALOG,
SHOW_REJECT_USERNAME_DIALOG,
HIDE_REJECT_USERNAME_DIALOG,
SET_INDICATOR_TRACK,
@@ -61,6 +63,15 @@ export const setSearchValue = value => ({
export const showBanUserDialog = user => ({ type: SHOW_BANUSER_DIALOG, user });
export const hideBanUserDialog = () => ({ type: HIDE_BANUSER_DIALOG });
// Always premod User Dialog
export const showAlwaysPremodUserDialog = user => ({
type: SHOW_ALWAYS_PREMOD_USER_DIALOG,
user,
});
export const hideAlwaysPremodUserDialog = () => ({
type: HIDE_ALWAYS_PREMOD_USER_DIALOG,
});
// Reject Username Dialog
export const showRejectUsernameDialog = user => ({
type: SHOW_REJECT_USERNAME_DIALOG,
@@ -0,0 +1,14 @@
import {
SHOW_REJECT_USERNAME_DIALOG,
HIDE_REJECT_USERNAME_DIALOG,
} from '../constants/rejectUsernameDialog';
export const showRejectUsernameDialog = ({ userId, username }) => ({
type: SHOW_REJECT_USERNAME_DIALOG,
userId,
username,
});
export const hideRejectUsernameDialog = () => ({
type: HIDE_REJECT_USERNAME_DIALOG,
});
+1 -1
View File
@@ -1,4 +1,4 @@
import queryString from 'query-string';
import queryString from 'querystringify';
import {
FETCH_ASSETS_REQUEST,
@@ -76,7 +76,7 @@ ActionsMenu.propTypes = {
icon: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
label: PropTypes.string,
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
buttonClassNames: PropTypes.string,
};
@@ -15,7 +15,7 @@ const ActionsMenuItem = props => (
ActionsMenuItem.propTypes = {
className: PropTypes.string,
children: PropTypes.string,
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
};
export default ActionsMenuItem;
+11 -12
View File
@@ -5,6 +5,7 @@ import styles from './NotFound.css';
import { Button, TextField, Alert, Success } from 'coral-ui';
import Recaptcha from 'react-recaptcha';
import cn from 'classnames';
import t from 'coral-framework/services/i18n';
class AdminLogin extends React.Component {
constructor(props) {
@@ -41,13 +42,13 @@ class AdminLogin extends React.Component {
{errorMessage && <Alert>{errorMessage}</Alert>}
<TextField
id="email"
label="Email Address"
label={t('login.email_address')}
value={this.state.email}
onChange={e => this.setState({ email: e.target.value })}
/>
<TextField
id="password"
label="Password"
label={t('login.password')}
value={this.state.password}
onChange={e => this.setState({ password: e.target.value })}
type="password"
@@ -60,10 +61,10 @@ class AdminLogin extends React.Component {
full
onClick={this.handleSignIn}
>
Sign In
{t('login.sign_in_button')}
</Button>
<p className={styles.forgotPasswordCTA}>
Forgot your password?{' '}
{t('login.forgot_password')}{' '}
<a
href="#"
className={styles.forgotPasswordLink}
@@ -72,7 +73,7 @@ class AdminLogin extends React.Component {
this.setState({ requestPassword: true });
}}
>
Request a new one.
{t('login.request_passowrd')}
</a>
</p>
{loginMaxExceeded && (
@@ -95,14 +96,14 @@ class AdminLogin extends React.Component {
>
{this.props.passwordRequestSuccess}{' '}
<a className={styles.signInLink} href="#">
Sign in
{t('login.sign_in')}
</a>
<Success />
</p>
) : (
<form onSubmit={this.handleRequestPassword}>
<TextField
label="Email Address"
label={t('login.email_address')}
value={this.state.email}
onChange={e => this.setState({ email: e.target.value })}
/>
@@ -112,17 +113,15 @@ class AdminLogin extends React.Component {
full
onClick={this.handleRequestPassword}
>
Reset Password
{t('login.reset_password')}
</Button>
</form>
);
return (
<Layout fixedDrawer restricted={true}>
<div className={cn(styles.loginLayout, 'talk-admin-login')}>
<h1 className={styles.loginHeader}>Team sign in</h1>
<p className={styles.loginCTA}>
Sign in to interact with your community.
</p>
<h1 className={styles.loginHeader}>{t('login.team_sign_in')}</h1>
<p className={styles.loginCTA}>{t('login.sign_in_message')}</p>
{this.state.requestPassword ? requestPasswordForm : signInForm}
</div>
</Layout>
@@ -0,0 +1,29 @@
.dialog {
border: none;
box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2);
width: 400px;
top: 50%;
transform: translateY(-50%);
padding: 20px;
border-radius: 4px;
}
.header {
color: black;
font-size: 1.5em;
font-weight: 500;
margin: 0 0 8px 0;
}
.subheader {
color: black;
font-size: 1.3em;
font-weight: 500;
margin: 0 0 8px 0;
}
.buttons {
margin-top: 8px;
margin-bottom: 6px;
text-align: right;
}
@@ -0,0 +1,68 @@
import React from 'react';
import cn from 'classnames';
import PropTypes from 'prop-types';
import { Dialog } from 'coral-ui';
import styles from './AlwaysPremodUserDialog.css';
import Button from 'coral-ui/components/Button';
import t from 'coral-framework/services/i18n';
class AlwaysPremodUserDialog extends React.Component {
handlePerform = () => {
this.props.onPerform();
};
render() {
const { open, onCancel, username, info } = this.props;
return (
<Dialog
className={cn(styles.dialog, 'talk-always-premod-user-dialog')}
id="alwaysPremodUserDialog"
open={open}
onCancel={onCancel}
title={t('alwayspremoddialog.always_premod_user')}
>
<span className={styles.close} onClick={onCancel}>
×
</span>
<section>
<h2 className={styles.header}>
{t('alwayspremoddialog.always_premod_user')}
</h2>
<h3 className={styles.subheader}>
{t('alwayspremoddialog.are_you_sure', username)}
</h3>
<p className={styles.description}>{info}</p>
<div className={styles.buttons}>
<Button
className={cn('talk-always-premod-user-dialog-button-cancel')}
cStyle="white"
onClick={onCancel}
raised
>
{t('alwayspremoddialog.cancel')}
</Button>
<Button
className={cn('talk-always-premod-user-dialog-button-confirm')}
cStyle="black"
onClick={this.handlePerform}
raised
>
{t('alwayspremoddialog.yes_always_premod_user')}
</Button>
</div>
</section>
</Dialog>
);
}
}
AlwaysPremodUserDialog.propTypes = {
open: PropTypes.bool,
onPerform: PropTypes.func.isRequired,
onCancel: PropTypes.func.isRequired,
username: PropTypes.string,
info: PropTypes.string,
};
export default AlwaysPremodUserDialog;
@@ -14,7 +14,8 @@ const ApproveButton = ({ active, minimal, onClick, className, disabled }) => {
className={cn(
styles.root,
{ [styles.minimal]: minimal, [styles.active]: active },
className
className,
'talk-admin-approve-button'
)}
onClick={onClick}
disabled={disabled || active}
@@ -19,7 +19,9 @@ class BanUserDialog extends React.Component {
}
handleMessageChange = e => {
const { value: message } = e;
const {
target: { value: message },
} = e;
this.setState({ message });
};
@@ -30,6 +32,12 @@ class BanUserDialog extends React.Component {
});
};
handlePerform = () => {
this.props.onPerform({
message: this.state.message,
});
};
renderStep0() {
const { onCancel, username, info } = this.props;
@@ -63,7 +71,7 @@ class BanUserDialog extends React.Component {
}
renderStep1() {
const { onCancel, onPerform } = this.props;
const { onCancel } = this.props;
const { message } = this.state;
return (
@@ -95,7 +103,7 @@ class BanUserDialog extends React.Component {
<Button
className={cn('talk-ban-user-dialog-button-confirm')}
cStyle="black"
onClick={onPerform}
onClick={this.handlePerform}
raised
>
{t('bandialog.send')}
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import Label from 'coral-ui/components/Label';
import Slot from 'coral-framework/components/Slot';
import { t } from 'coral-framework/services/i18n';
import FlagLabel from 'coral-ui/components/FlagLabel';
import cn from 'classnames';
import styles from './CommentLabels.css';
@@ -63,10 +64,14 @@ const CommentLabels = ({
<FlagLabel iconName="person">{getUserFlaggedType(actions)}</FlagLabel>
)}
{hasSuspectedWords(actions) && (
<FlagLabel iconName="sms_failed">Suspect</FlagLabel>
<FlagLabel iconName="sms_failed">
{t('flags.reasons.comment.suspect_word')}
</FlagLabel>
)}
{hasHistoryFlag(actions) && (
<FlagLabel iconName="sentiment_very_dissatisfied">History</FlagLabel>
<FlagLabel iconName="sentiment_very_dissatisfied">
{t('flags.reasons.comment.trust')}
</FlagLabel>
)}
</div>
<Slot
@@ -1,20 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './CountBadge.css';
import t from 'coral-framework/services/i18n';
import { humanizeNumber } from 'coral-framework/helpers/numbers';
const CountBadge = ({ count }) => {
let number = count;
// shorten large counts to abbreviations
if (number / 1e9 > 1) {
number = `${(number / 1e9).toFixed(1)}${t('modqueue.billion')}`;
} else if (number / 1e6 > 1) {
number = `${(number / 1e6).toFixed(1)}${t('modqueue.million')}`;
} else if (number / 1e3 > 1) {
number = `${(number / 1e3).toFixed(1)}${t('modqueue.thousand')}`;
}
number = humanizeNumber(number);
return <span className={styles.count}>{number}</span>;
};
+5 -6
View File
@@ -7,9 +7,9 @@ import t from 'coral-framework/services/i18n';
import { can } from 'coral-framework/services/perms';
import cn from 'classnames';
const CoralDrawer = ({ handleLogout, currentUser }) => (
<Drawer className={cn('talk-admin-drawer-nav', styles.drawer)}>
{currentUser && can(currentUser, 'ACCESS_ADMIN') ? (
const CoralDrawer = ({ handleLogout, currentUser }) =>
currentUser && can(currentUser, 'ACCESS_ADMIN') ? (
<Drawer className={cn('talk-admin-drawer-nav', styles.drawer)}>
<div>
<Navigation className={styles.nav}>
{can(currentUser, 'MODERATE_COMMENTS') && (
@@ -48,9 +48,8 @@ const CoralDrawer = ({ handleLogout, currentUser }) => (
<span>{`v${process.env.VERSION}`}</span>
</Navigation>
</div>
) : null}
</Drawer>
);
</Drawer>
) : null;
CoralDrawer.propTypes = {
handleLogout: PropTypes.func.isRequired,
@@ -0,0 +1,16 @@
.external {
margin-bottom: 20px;
}
.separator h5 {
text-align: center;
font-size: 1.2em;
}
.slot > * {
margin-bottom: 8px;
&:last-child {
margin-bottom: 0px;
}
}
@@ -0,0 +1,24 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './External.css';
import Slot from 'coral-framework/components/Slot';
import IfSlotIsNotEmpty from 'coral-framework/components/IfSlotIsNotEmpty';
const External = ({ slot }) => (
<IfSlotIsNotEmpty slot={slot}>
<div>
<div className={styles.external}>
<Slot fill={slot} className={styles.slot} />
</div>
<div className={styles.separator}>
<h5>Or</h5>
</div>
</div>
</IfSlotIsNotEmpty>
);
External.propTypes = {
slot: PropTypes.string.isRequired,
};
export default External;
@@ -1,12 +1,10 @@
import React from 'react';
import styles from './Forbidden.css';
import t from 'coral-framework/services/i18n';
const Forbidden = () => (
<div className={styles.container}>
<p className={styles.copy}>
This page is for team use only. Please contact an administrator if you
want to join this team.
</p>
<p className={styles.copy}>{t('error.PAGE_NOT_AVAILABLE_ROLE')}</p>
</div>
);
@@ -30,7 +30,7 @@ class ForgotPassword extends React.Component {
href="#"
onClick={this.handleSignInLink}
>
Sign in
{t('login.sign_in')}
</a>
<Success />
</div>
@@ -43,21 +43,21 @@ class ForgotPassword extends React.Component {
<form onSubmit={this.handleSubmit}>
{errorMessage && <Alert>{errorMessage}</Alert>}
<TextField
label="Email Address"
label={t('login.email_address')}
value={email}
onChange={this.handleEmailChange}
/>
<Button type="submit" cStyle="black" full>
Reset Password
{t('login.reset_password_send_button')}
</Button>
<p className={styles.cta}>
Go back to{' '}
{t('login.go_back')}{' '}
<a
href="#"
className={styles.signInLink}
onClick={this.handleSignInLink}
>
Sign In
{t('login.sign_in')}
</a>
.
</p>
+11 -2
View File
@@ -77,13 +77,22 @@ const CoralHeader = ({
<MenuItem onClick={() => showShortcuts(true)}>
{t('configure.shortcuts')}
</MenuItem>
<MenuItem>
<a
href="https://docs.coralproject.net/talk/how-talk-works/"
target="_blank"
rel="noopener noreferrer"
>
{t('configure.product_guide_link')}
</a>
</MenuItem>
<MenuItem>
<a
href="https://github.com/coralproject/talk/releases"
target="_blank"
rel="noopener noreferrer"
>
View latest version
{t('configure.view_last_version')}
</a>
</MenuItem>
<MenuItem>
@@ -92,7 +101,7 @@ const CoralHeader = ({
target="_blank"
rel="noopener noreferrer"
>
Report a bug or give feedback
{t('configure.report_bug_or_feedback')}
</a>
</MenuItem>
{currentUser && (
@@ -0,0 +1,103 @@
.karmaTooltip {
position: relative;
display: inline-block;
margin: 2px 4px 0;
}
.icon {
font-size: 16px;
color: #0D5B8F;
user-select: none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
> i {
vertical-align: baseline;
}
}
.icon:hover {
cursor: pointer;
}
.menu {
background-color: white;
border: solid 1px #999;
border-radius: 3px;
padding: 10px;
position: absolute;
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
z-index: 10;
top: 32px;
left: -100px;
width: 150px;
text-align: left;
color: #616161;
}
.menu::before{
content: '';
border: 10px solid transparent;
border-top-color: #999;
position: absolute;
left: 96px;
top: -20px;
transform: rotate(180deg);
}
.menu::after{
content: '';
border: 10px solid transparent;
border-top-color: white;
position: absolute;
left: 96px;
top: -19px;
transform: rotate(180deg);
}
.menu ul {
list-style: none;
padding: 0;
li {
display: flex;
justify-content: space-between;
margin: 5px 0;
}
}
.label {
padding: 4px 5px;
border-radius: 3px;
color: #fff;
font-weight: 400;
text-align: center;
font-size: .9em;
line-height: normal;
letter-spacing: .4px;
min-width: 25px;
display: block;
/* &.reliable { background-color: #03AB61; } */
/* &.neutral { background-color: #616161; } */
&.unreliable { background-color: #F44336; }
}
.descriptionList {
padding: 0;
margin: 0;
list-style: none;
}
.strongItem {
margin-right: 3px;
}
.descriptionItem {
font-size: 0.9em;
}
.link {
color: #2B7EB5;
text-decoration: underline;
display: block;
}
@@ -0,0 +1,85 @@
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import { Icon } from 'coral-ui';
import styles from './KarmaTooltip.css';
import ClickOutside from 'coral-framework/components/ClickOutside';
import t from 'coral-framework/services/i18n';
const initialState = { menuVisible: false };
class KarmaTooltip extends React.Component {
static propTypes = {
thresholds: PropTypes.shape({
reliable: PropTypes.number.isRequired,
unreliable: PropTypes.number.isRequired,
}).isRequired,
};
state = initialState;
toogleMenu = () => {
this.setState({ menuVisible: !this.state.menuVisible });
};
hideMenu = () => {
this.setState({ menuVisible: false });
};
render() {
const {
thresholds: { unreliable },
} = this.props;
const { menuVisible } = this.state;
return (
<ClickOutside onClickOutside={this.hideMenu}>
<div className={cn(styles.karmaTooltip, 'talk-admin-karma-tooltip')}>
<span
onClick={this.toogleMenu}
className={cn(styles.icon, 'talk-admin-karma-tooltip-icon')}
>
<Icon name="info" />
</span>
{menuVisible && (
<div className={cn(styles.menu, 'talk-admin-karma-tooltip-menu')}>
<strong>{t('user_detail.user_karma_score')}</strong>
<ul>
{/* NOTE: we may display this data in the future, keeping around for that eventuality */}
{/* <li>
<span>Reliable</span>{' '}
<span className={cn(styles.label, styles.reliable)}>
&ge; {reliable}
</span>
</li>
<li>
<span>Neutral</span>{' '}
<span className={cn(styles.label, styles.neutral)}>
&lt; {reliable}, &gt; {unreliable}
</span>
</li> */}
<li>
<span>{t('user_detail.unreliable')}</span>{' '}
<span className={cn(styles.label, styles.unreliable)}>
&le; {unreliable}
</span>
</li>
</ul>
<a
className={styles.link}
href={t('user_detail.karma_docs_link')}
target="_blank"
rel="noopener noreferrer"
>
{t('user_detail.learn_more')}
</a>
</div>
)}
</div>
</ClickOutside>
);
}
}
export default KarmaTooltip;
+3 -2
View File
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import styles from './Login.css';
import Layout from 'coral-admin/src/components/Layout';
import cn from 'classnames';
import t from 'coral-framework/services/i18n';
class LoginContainer extends Component {
renderForm() {
@@ -19,8 +20,8 @@ class LoginContainer extends Component {
return (
<Layout fixedDrawer restricted={true}>
<div className={cn(styles.layout, 'talk-admin-login')}>
<h1 className={styles.header}>Team sign in</h1>
<p className={styles.cta}>Sign in to interact with your community.</p>
<h1 className={styles.header}>{t('login.team_sign_in')}</h1>
<p className={styles.cta}>{t('login.sign_in_message')}</p>
{this.renderForm()}
</div>
</Layout>
@@ -14,7 +14,8 @@ const RejectButton = ({ active, minimal, onClick, className, disabled }) => {
className={cn(
styles.root,
{ [styles.minimal]: minimal, [styles.active]: active },
className
className,
'talk-admin-reject-button'
)}
onClick={onClick}
disabled={disabled || active}
@@ -0,0 +1,80 @@
.dialog {
border: none;
box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2);
width: 400px;
top: 50%;
transform: translateY(-50%);
padding: 20px;
border-radius: 4px;
}
.header {
color: black;
font-size: 1.5em;
font-weight: 500;
margin: 0 0 8px 0;
}
.close {
display: block;
position: absolute;
top: 24px;
right: 20px;
}
.closeButton {
font-size: 24px;
line-height: 14px;
color: #363636;
&:hover {
color: #6b6b6b;
}
}
.legend {
padding: 0;
font-weight: bold;
}
div.radioGroup {
margin-top: 6px;
}
label.radioGroup {
&:global(.is-checked) > :global(.mdl-radio__outer-circle),
> :global(.mdl-radio__outer-circle) {
border-color: #212121;
}
> :global(.mdl-radio__inner-circle) {
background: #212121;
}
> :global(.mdl-radio__label) {
font-size: 14px;
line-height: 20px;
}
}
.messageInput {
border-radius: 3px;
width: 100%;
padding: 10px;
font-size: 14px;
box-sizing: border-box;
}
.cancel {
margin-right: 5px;
}
.perform {
min-width: 90px;
}
.buttons {
margin-top: 8px;
margin-bottom: 6px;
text-align: right;
}
@@ -0,0 +1,138 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Dialog, BareButton } from 'coral-ui';
import styles from './RejectUsernameDialog.css';
import cn from 'classnames';
import { RadioGroup, Radio } from 'react-mdl';
import Button from 'coral-ui/components/Button';
import { username as flagReason } from 'coral-framework/graphql/flagReasons';
import t from 'coral-framework/services/i18n';
const initialState = { reason: flagReason.offensive, message: '' };
class RejectUsernameDialog extends React.Component {
state = initialState;
componentWillReceiveProps(next) {
if (this.props.open && !next.open) {
this.setState(initialState);
}
}
handleReasonChange = event => {
this.setState({ reason: event.target.value });
};
handleMessageChange = event => {
this.setState({ message: event.target.value });
};
handlePerform = () => {
this.props.onPerform({
reason: this.state.reason,
message: this.state.message,
});
};
render() {
const { open, onCancel } = this.props;
const { reason, message } = this.state;
return (
<Dialog
className={cn(styles.dialog, 'talk-admin-reject-username-dialog')}
id="rejectUsernameDialog"
onCancel={onCancel}
open={open}
>
<div className={styles.close}>
<BareButton
aria-label="Close"
onClick={onCancel}
className={styles.closeButton}
>
×
</BareButton>
</div>
<section className="talk-admin-reject-username-dialog-section">
<h1 className={styles.header}>
{t('reject_username_dialog.title')}: {this.props.username}
</h1>
<p className={styles.description}>
{t('reject_username_dialog.description')}
</p>
<fieldset>
<legend className={styles.legend}>
{t('reject_username_dialog.reason')}
</legend>
<RadioGroup
name="reason"
value={reason}
childContainer="div"
onChange={this.handleReasonChange}
className={styles.radioGroup}
>
<Radio value={flagReason.offensive}>
{t('flag_reasons.username.offensive')}
</Radio>
<Radio value={flagReason.nolike}>
{t('flag_reasons.username.nolike')}
</Radio>
<Radio value={flagReason.impersonating}>
{t('flag_reasons.username.impersonating')}
</Radio>
<Radio value={flagReason.spam}>
{t('flag_reasons.username.spam')}
</Radio>
<Radio value={flagReason.other}>
{t('flag_reasons.username.other')}
</Radio>
</RadioGroup>
{reason === flagReason.other && (
<fieldset>
<legend className={styles.legend}>
{t('reject_username_dialog.message')}
</legend>
<textarea
rows={5}
className={styles.messageInput}
value={message}
onChange={this.handleMessageChange}
/>
</fieldset>
)}
</fieldset>
<div className={styles.buttons}>
<Button
cStyle="white"
className={styles.cancel}
onClick={onCancel}
raised
>
{t('reject_username_dialog.cancel')}
</Button>
<Button
cStyle="black"
className={cn(
styles.perform,
'talk-admin-reject-username-dialog-continue'
)}
onClick={this.handlePerform}
raised
>
{t('reject_username_dialog.reject_username')}
</Button>
</div>
</section>
</Dialog>
);
}
}
RejectUsernameDialog.propTypes = {
open: PropTypes.bool.isRequired,
onPerform: PropTypes.func.isRequired,
onCancel: PropTypes.func.isRequired,
username: PropTypes.string,
};
export default RejectUsernameDialog;
+50 -41
View File
@@ -4,6 +4,8 @@ import styles from './SignIn.css';
import { Button, TextField, Alert } from 'coral-ui';
import cn from 'classnames';
import Recaptcha from 'coral-framework/components/Recaptcha';
import External from './External';
import t from 'coral-framework/services/i18n';
class SignIn extends React.Component {
recaptcha = null;
@@ -33,48 +35,55 @@ class SignIn extends React.Component {
render() {
const { email, password, errorMessage, requireRecaptcha } = this.props;
return (
<form className="talk-admin-login-sign-in" onSubmit={this.handleSubmit}>
{errorMessage && <Alert>{errorMessage}</Alert>}
<TextField
id="email"
label="Email Address"
value={email}
onChange={this.handleEmailChange}
/>
<TextField
id="password"
label="Password"
value={password}
onChange={this.handlePasswordChange}
type="password"
/>
{requireRecaptcha && (
<div className={styles.recaptcha}>
<Recaptcha
ref={this.handleRecaptchaRef}
onVerify={this.props.onRecaptchaVerify}
/>
</div>
)}
<Button
className={cn(styles.signInButton, 'talk-admin-login-sign-in-button')}
type="submit"
cStyle="black"
full
>
Sign In
</Button>
<p className={styles.forgotPasswordCTA}>
Forgot your password?{' '}
<a
href="#"
className={styles.forgotPasswordLink}
onClick={this.handleForgotPasswordLink}
<div className="talk-admin-login-sign-in">
<External slot="authExternalAdminSignIn" />
<form onSubmit={this.handleSubmit}>
{errorMessage && <Alert>{errorMessage}</Alert>}
<TextField
id="email"
label={t('login.email_address')}
value={email}
onChange={this.handleEmailChange}
/>
<TextField
id="password"
label={t('login.password')}
value={password}
onChange={this.handlePasswordChange}
type="password"
/>
{requireRecaptcha && (
<div className={styles.recaptcha}>
<Recaptcha
ref={this.handleRecaptchaRef}
onVerify={this.props.onRecaptchaVerify}
/>
</div>
)}
<Button
className={cn(
styles.signInButton,
'talk-admin-login-sign-in-button'
)}
type="submit"
cStyle="black"
full
>
Request a new one.
</a>
</p>
</form>
{t('login.sign_in')}
</Button>
<p className={styles.forgotPasswordCTA}>
{/* TODO: translate */}
{t('login.forgot_password')}{' '}
<a
href="#"
className={styles.forgotPasswordLink}
onClick={this.handleForgotPasswordLink}
>
{t('login.request_passowrd')}
</a>
</p>
</form>
</div>
);
}
}
@@ -35,44 +35,49 @@
margin-right: 20px;
}
.karmaStat {
display: flex;
}
.stat:last-child {
margin-right: 0px;
}
.statItem,
.statReportResult {
.statItem, .statReportResult, .statKarmaResult {
padding: 3px 5px;
background-color: #D8D8D8;
border-radius: 3px;
font-weight: 500;
display: block;
font-size: 0.9em;
line-height: normal;
letter-spacing: 0.4px;
min-width: 60px;
min-width: 25px;
display: block;
}
.statResult {
font-size: 1.5em;
padding: 5px 0;
display: inline-block;
text-align: center;
}
.statReportResult {
.statReportResult, .statKarmaResult {
color: white;
margin: 5px 0;
font-weight: 400;
text-align: center;
}
.statReportResult.reliable {
background-color: #749C48;
.statReportResult.reliable, .statKarmaResult.good {
background-color: #03AB61;
}
.statReportResult.neutral {
.statReportResult.neutral, .statKarmaResult.neutral {
background-color: #616161;
}
.statReportResult.unreliable {
.statReportResult.unreliable, .statKarmaResult.bad {
background-color: #F44336;
}
@@ -132,6 +137,12 @@
display: inline-block;
}
.actionsMenuAlwaysPremod {
background-color: #F0B50B;
border-color: #F0B50B;
color: white;
}
.actionsMenuSuspended {
background-color: #F29336;
border-color: #F29336;
@@ -143,3 +154,7 @@
border-color: #E45241;
color: white;
}
.userDetailItem {
padding: 2px 0;
}
+189 -39
View File
@@ -6,11 +6,16 @@ import styles from './UserDetail.css';
import UserHistory from './UserHistory';
import { Slot } from 'coral-framework/components';
import UserDetailCommentList from '../components/UserDetailCommentList';
import {
getReliability,
isSuspended,
isUsernameRejected,
isUsernameChanged,
isBanned,
isAlwaysPremod,
getKarma,
} from 'coral-framework/utils/user';
import ButtonCopyToClipboard from './ButtonCopyToClipboard';
import ClickOutside from 'coral-framework/components/ClickOutside';
import {
@@ -25,7 +30,28 @@ import {
import ActionsMenu from 'coral-admin/src/components/ActionsMenu';
import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem';
import UserInfoTooltip from './UserInfoTooltip';
import KarmaTooltip from './KarmaTooltip';
import t from 'coral-framework/services/i18n';
import { humanizeNumber } from 'coral-framework/helpers/numbers';
const filterOutLocalProfiles = ({ provider }) => provider !== 'local';
/**
* getUserStatusArray
* returns an array of active status(es)
* i.e if suspension is active, it returns suspension
*/
function getUserStatusArray(user) {
const statusMap = {
suspended: isSuspended,
banned: isBanned,
alwaysPremod: isAlwaysPremod,
usernameRejected: isUsernameRejected,
usernameChanged: isUsernameChanged,
};
return Object.keys(statusMap).filter(k => statusMap[k](user));
}
class UserDetail extends React.Component {
changeTab = tab => {
@@ -44,6 +70,18 @@ class UserDetail extends React.Component {
username: this.props.root.user.username,
});
showAlwaysPremodUserDialog = () =>
this.props.showAlwaysPremodUserDialog({
userId: this.props.root.user.id,
username: this.props.root.user.username,
});
showRejectUsernameDialog = () =>
this.props.showRejectUsernameDialog({
userId: this.props.root.user.id,
username: this.props.root.user.username,
});
renderLoading() {
return (
<ClickOutside onClickOutside={this.props.hideUserDetail}>
@@ -64,22 +102,58 @@ class UserDetail extends React.Component {
);
}
getActionMenuLabel() {
const { root: { user } } = this.props;
getActionMenuLabel(user) {
const userStatusArr = getUserStatusArray(user);
const count = userStatusArr.length;
if (isBanned(user)) {
return 'Banned';
} else if (isSuspended(user)) {
return 'Suspended';
if (count > 1) {
return `Status (${count})`;
} else {
const activeStatus = userStatusArr[0];
switch (activeStatus) {
case 'suspended':
return t('user_detail.suspended');
case 'banned':
return t('user_detail.banned');
case 'alwaysPremod':
return t('user_detail.always_premoded');
case 'usernameRejected':
return (
<span>
{t('user_detail.username')}
{` `}
<Icon name="cancel" />
</span>
);
case 'usernameChanged':
return (
<span>
{t('user_detail.username')}
{` `}
<Icon name="access_time" />
</span>
);
default:
return activeStatus;
}
}
return '';
}
goToReportedUsernames = () => {
const { router } = this.props;
router.push('/admin/community/flagged');
};
renderLoaded() {
const {
root,
root: { me, user, totalComments, rejectedComments },
root: {
me,
user,
totalComments,
rejectedComments,
settings: { karmaThresholds },
},
activeTab,
selectedCommentIds,
toggleSelect,
@@ -89,6 +163,7 @@ class UserDetail extends React.Component {
toggleSelectAll,
unbanUser,
unsuspendUser,
removeAlwaysPremodUser,
modal,
acceptComment,
rejectComment,
@@ -97,7 +172,7 @@ class UserDetail extends React.Component {
} = this.props;
// if totalComments is 0, you're dividing by zero
let rejectedPercent = rejectedComments / totalComments * 100;
let rejectedPercent = (rejectedComments / totalComments) * 100;
if (rejectedPercent === Infinity || isNaN(rejectedPercent)) {
rejectedPercent = 0;
@@ -105,6 +180,9 @@ class UserDetail extends React.Component {
const banned = isBanned(user);
const suspended = isSuspended(user);
const alwaysPremod = isAlwaysPremod(user);
const usernameRejected = isUsernameRejected(user);
const usernameChanged = isUsernameChanged(user);
const slotPassthrough = {
root,
@@ -134,10 +212,11 @@ class UserDetail extends React.Component {
{
[styles.actionsMenuSuspended]: suspended,
[styles.actionsMenuBanned]: banned,
[styles.actionsMenuAlwaysPremod]: alwaysPremod,
},
'talk-admin-user-detail-actions-button'
)}
label={this.getActionMenuLabel()}
label={this.getActionMenuLabel(user)}
>
{suspended ? (
<ActionsMenuItem onClick={() => unsuspendUser({ id: user.id })}>
@@ -164,6 +243,42 @@ class UserDetail extends React.Component {
{t('user_detail.ban')}
</ActionsMenuItem>
)}
{alwaysPremod ? (
<ActionsMenuItem
onClick={() => removeAlwaysPremodUser({ id: user.id })}
>
{t('user_detail.remove_always_premod')}
</ActionsMenuItem>
) : (
<ActionsMenuItem
disabled={me.id === user.id}
onClick={this.showAlwaysPremodUserDialog}
>
{t('user_detail.always_premod')}
</ActionsMenuItem>
)}
{usernameChanged && (
<ActionsMenuItem onClick={this.goToReportedUsernames}>
{t('user_detail.username_needs_approval')}
{` `}
<Icon name="launch" />
</ActionsMenuItem>
)}
{usernameRejected && !usernameChanged ? (
<ActionsMenuItem disabled>
{t('user_detail.username_rejected')}
</ActionsMenuItem>
) : (
<ActionsMenuItem
onClick={this.showRejectUsernameDialog}
disabled={me.id === user.id || usernameChanged}
>
{t('user_detail.reject_username')}
</ActionsMenuItem>
)}
</ActionsMenu>
)}
@@ -177,7 +292,19 @@ class UserDetail extends React.Component {
<div>
<ul className={styles.userDetailList}>
<li>
<li className={styles.userDetailItem}>
<Icon name="perm_identity" />
<span className={styles.userDetailItem}>
{t('user_detail.id')}:
</span>
{user.id}{' '}
<ButtonCopyToClipboard
className={styles.copyButton}
icon="content_copy"
copyText={user.id}
/>
</li>
<li className={styles.userDetailItem}>
<Icon name="assignment_ind" />
<span className={styles.userDetailItem}>
{t('user_detail.member_since')}:
@@ -185,20 +312,35 @@ class UserDetail extends React.Component {
{new Date(user.created_at).toLocaleString()}
</li>
{user.profiles.map(({ id }) => (
<li key={id}>
<Icon name="email" />
<span className={styles.userDetailItem}>
{t('user_detail.email')}:
</span>
{id}{' '}
<ButtonCopyToClipboard
className={styles.copyButton}
icon="content_copy"
copyText={id}
/>
</li>
))}
<li className={styles.userDetailItem}>
<Icon name="email" />
<span className={styles.userDetailItem}>
{t('user_detail.email')}:
</span>
{user.email}{' '}
<ButtonCopyToClipboard
className={styles.copyButton}
icon="content_copy"
copyText={user.email}
/>
</li>
{user.profiles
.filter(filterOutLocalProfiles)
.map(({ provider, id }) => (
<li key={id} className={styles.userDetailItem}>
<Icon name="device_hub" />
<span className={styles.userDetailItem}>
{capitalize(provider)} {t('user_detail.id')}:
</span>
{id}{' '}
<ButtonCopyToClipboard
className={styles.copyButton}
icon="content_copy"
copyText={id}
/>
</li>
))}
</ul>
<ul className={styles.stats}>
@@ -216,18 +358,21 @@ class UserDetail extends React.Component {
{rejectedPercent.toFixed(1)}%
</span>
</li>
<li className={styles.stat}>
<span className={styles.statItem}>
{t('user_detail.reports')}
</span>
<span
className={cn(
styles.statReportResult,
styles[getReliability(user.reliable.flagger)]
)}
>
{capitalize(getReliability(user.reliable.flagger))}
</span>
<li className={cn(styles.stat, styles.karmaStat)}>
<div>
<span className={styles.statItem}>
{t('user_detail.karma')}
</span>
<span
className={cn(
styles.statKarmaResult,
styles[getKarma(user.reliable.commenter)]
)}
>
{humanizeNumber(user.reliable.commenterKarma)}
</span>
</div>
<KarmaTooltip thresholds={karmaThresholds.comment} />
</li>
</ul>
</div>
@@ -339,6 +484,7 @@ class UserDetail extends React.Component {
}
UserDetail.propTypes = {
router: PropTypes.object.isRequired,
userId: PropTypes.string.isRequired,
hideUserDetail: PropTypes.func.isRequired,
root: PropTypes.object.isRequired,
@@ -355,11 +501,15 @@ UserDetail.propTypes = {
selectedCommentIds: PropTypes.array.isRequired,
viewUserDetail: PropTypes.any.isRequired,
loadMore: PropTypes.any.isRequired,
showRejectUsernameDialog: PropTypes.func,
showSuspendUserDialog: PropTypes.func,
showBanUserDialog: PropTypes.func,
showAlwaysPremodUserDialog: PropTypes.func,
unbanUser: PropTypes.func.isRequired,
unsuspendUser: PropTypes.func.isRequired,
removeAlwaysPremodUser: PropTypes.func.isRequired,
modal: PropTypes.bool,
rejectUsername: PropTypes.func.isRequired,
};
export default UserDetail;
@@ -14,7 +14,9 @@ import ApproveButton from './ApproveButton';
import RejectButton from 'coral-admin/src/components/RejectButton';
import CommentDeletedTombstone from './CommentDeletedTombstone';
import t, { timeago } from 'coral-framework/services/i18n';
import { buildCommentURL } from 'coral-framework/utils/url';
import TimeAgo from 'coral-framework/components/TimeAgo';
import t from 'coral-framework/services/i18n';
class UserDetailComment extends React.Component {
approve = () =>
@@ -73,9 +75,7 @@ class UserDetailComment extends React.Component {
checked={selected}
onChange={e => toggleSelect(e.target.value, e.target.checked)}
/>
<span className={styles.created}>
{timeago(comment.created_at)}
</span>
<TimeAgo className={styles.created} datetime={comment.created_at} />
{comment.editing && comment.editing.edited ? (
<span>
&nbsp;<span className={styles.editedMarker}>
@@ -112,8 +112,9 @@ class UserDetailComment extends React.Component {
/>
<a
className={styles.external}
href={`${comment.asset.url}?commentId=${comment.id}`}
href={buildCommentURL(comment.asset.url, comment.id)}
target="_blank"
rel="noopener noreferrer"
>
<Icon name="open_in_new" /> {t('comment.view_context')}
</a>
@@ -122,7 +123,7 @@ class UserDetailComment extends React.Component {
<IfHasLink text={comment.body}>
<span className={styles.hasLinks}>
{/* TODO: translate string */}
<Icon name="error_outline" /> Contains Link
<Icon name="error_outline" /> {t('common.contains_link')}
</span>
</IfHasLink>
<div className={styles.actions}>
@@ -10,7 +10,10 @@ import ApproveButton from './ApproveButton';
const UserDetailCommentList = props => {
const {
root,
root: { user, comments: { nodes, hasNextPage } },
root: {
user,
comments: { nodes, hasNextPage },
},
acceptComment,
rejectComment,
selectedCommentIds,
@@ -48,6 +48,10 @@ const buildActionResponse = (typename, created_at, until, status) => {
return status
? t('user_history.user_banned')
: t('user_history.ban_removed');
case 'AlwaysPremodStatusHistory':
return status
? t('user_history.user_always_premoded')
: t('user_history.always_premod_removed');
case 'SuspensionStatusHistory':
return until
? t('user_history.suspended', readableDuration(created_at, until))
@@ -0,0 +1,2 @@
export const SHOW_ALWAYS_PREMOD_USER_DIALOG = 'SHOW_ALWAYS_PREMOD_USER_DIALOG';
export const HIDE_ALWAYS_PREMOD_USER_DIALOG = 'HIDE_ALWAYS_PREMOD_USER_DIALOG';
@@ -14,6 +14,9 @@ export const FETCH_FLAGGED_COMMENTERS_FAILURE = `${prefix}_FETCH_FLAGGED_COMMENT
export const SHOW_BANUSER_DIALOG = `${prefix}_SHOW_BANUSER_DIALOG`;
export const HIDE_BANUSER_DIALOG = `${prefix}_HIDE_BANUSER_DIALOG`;
export const SHOW_ALWAYS_PREMOD_USER_DIALOG = `${prefix}_SHOW_ALWAYS_PREMOD_USER_DIALOG`;
export const HIDE_ALWAYS_PREMOD_USER_DIALOG = `${prefix}_HIDE_ALWAYS_PREMOD_USER_DIALOG`;
export const SHOW_REJECT_USERNAME_DIALOG = `${prefix}_SHOW_REJECT_USERNAME_DIALOG`;
export const HIDE_REJECT_USERNAME_DIALOG = `${prefix}_HIDE_REJECT_USERNAME_DIALOG`;
@@ -0,0 +1,2 @@
export const SHOW_REJECT_USERNAME_DIALOG = 'SHOW_REJECT_USERNAME_DIALOG';
export const HIDE_REJECT_USERNAME_DIALOG = 'HIDE_REJECT_USERNAME_DIALOG';
@@ -0,0 +1,66 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import AlwaysPremodUserDialog from '../components/AlwaysPremodUserDialog';
import { hideAlwaysPremodUserDialog } from '../actions/alwaysPremodUserDialog';
import { withAlwaysPremodUser } from 'coral-framework/graphql/mutations';
import { compose } from 'react-apollo';
import t from 'coral-framework/services/i18n';
class AlwaysPremodUserDialogContainer extends Component {
alwaysPremodUser = async () => {
const { userId, alwaysPremodUser, hideAlwaysPremodUserDialog } = this.props;
await alwaysPremodUser({ id: userId });
hideAlwaysPremodUserDialog();
};
getInfo() {
let note = t('alwayspremoddialog.note_always_premod_user');
return t('alwayspremoddialog.note', note);
}
render() {
return (
<AlwaysPremodUserDialog
open={this.props.open}
onPerform={this.alwaysPremodUser}
onCancel={this.props.hideAlwaysPremodUserDialog}
username={this.props.username}
info={this.getInfo()}
/>
);
}
}
AlwaysPremodUserDialogContainer.propTypes = {
alwaysPremodUser: PropTypes.func.isRequired,
hideAlwaysPremodUserDialog: PropTypes.func,
open: PropTypes.bool,
username: PropTypes.string,
};
const mapStateToProps = ({
alwaysPremodUserDialog: { open, userId, username },
}) => ({
open,
userId,
username,
});
const mapDispatchToProps = dispatch => ({
...bindActionCreators(
{
hideAlwaysPremodUserDialog,
},
dispatch
),
});
export default compose(
connect(
mapStateToProps,
mapDispatchToProps
),
withAlwaysPremodUser
)(AlwaysPremodUserDialogContainer);
@@ -12,7 +12,7 @@ import { compose } from 'react-apollo';
import t from 'coral-framework/services/i18n';
class BanUserDialogContainer extends Component {
banUser = async () => {
banUser = async ({ message }) => {
const {
userId,
commentId,
@@ -21,7 +21,7 @@ class BanUserDialogContainer extends Component {
setCommentStatus,
hideBanUserDialog,
} = this.props;
await banUser({ id: userId, message: '' });
await banUser({ id: userId, message });
hideBanUserDialog();
if (commentId && commentStatus && commentStatus !== 'REJECTED') {
await setCommentStatus({ commentId, status: 'REJECTED' });
@@ -77,7 +77,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withBanUser,
withSetCommentStatus
)(BanUserDialogContainer);
+8 -1
View File
@@ -5,7 +5,9 @@ import Layout from '../components/Layout';
import Login from '../containers/Login';
import { FullLoading } from '../components/FullLoading';
import BanUserDialog from './BanUserDialog';
import AlwaysPremodUserDialog from './AlwaysPremodUserDialog';
import SuspendUserDialog from './SuspendUserDialog';
import RejectUsernameDialog from './RejectUsernameDialog';
import { toggleModal as toggleShortcutModal } from '../actions/moderation';
import { logout } from 'coral-framework/actions/auth';
import { can } from 'coral-framework/services/perms';
@@ -39,8 +41,10 @@ class LayoutContainer extends React.Component {
toggleShortcutModal={toggleShortcutModal}
currentUser={this.props.currentUser}
>
<AlwaysPremodUserDialog />
<BanUserDialog />
<SuspendUserDialog />
<RejectUsernameDialog />
<UserDetail />
{children}
</Layout>
@@ -79,4 +83,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
export default connect(mapStateToProps, mapDispatchToProps)(LayoutContainer);
export default connect(
mapStateToProps,
mapDispatchToProps
)(LayoutContainer);
@@ -0,0 +1,92 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import RejectUsernameDialog from '../components/RejectUsernameDialog';
import { hideRejectUsernameDialog } from '../actions/rejectUsernameDialog';
import {
withRejectUsername,
withPostFlag,
} from 'coral-framework/graphql/mutations';
import { notify } from 'coral-framework/actions/notification';
import { compose } from 'react-apollo';
import { getErrorMessages } from 'coral-framework/utils';
class RejectUsernameDialogContainer extends Component {
rejectUsername = async ({ reason, message }) => {
const {
postFlag,
rejectUsername,
hideRejectUsernameDialog,
userId,
} = this.props;
// First flag the user.
try {
await postFlag({
item_id: userId,
item_type: 'USERS',
reason,
message,
});
} catch (error) {
// Ignore already exists error, otherwise show error.
if (
error.errors &&
(error.errors.length !== 1 ||
error.errors[0].translation_key !== 'ALREADY_EXISTS')
) {
notify('error', getErrorMessages(error));
}
}
await rejectUsername(userId);
hideRejectUsernameDialog();
};
render() {
return (
<RejectUsernameDialog
open={this.props.open}
onPerform={this.rejectUsername}
onCancel={this.props.hideRejectUsernameDialog}
username={this.props.username}
/>
);
}
}
RejectUsernameDialogContainer.propTypes = {
rejectUsername: PropTypes.func.isRequired,
hideRejectUsernameDialog: PropTypes.func,
open: PropTypes.bool,
userId: PropTypes.string,
username: PropTypes.string,
};
const mapStateToProps = ({
rejectUsernameDialog: { open, userId, username },
}) => ({
open,
userId,
username,
});
const mapDispatchToProps = dispatch => ({
...bindActionCreators(
{
hideRejectUsernameDialog,
notify,
},
dispatch
),
});
export default compose(
connect(
mapStateToProps,
mapDispatchToProps
),
withRejectUsername,
withPostFlag({ notifyOnError: false })
)(RejectUsernameDialogContainer);
+5 -2
View File
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withSignIn } from 'coral-framework/hocs';
import { withSignIn, withPopupAuthHandler } from 'coral-framework/hocs';
import { compose } from 'recompose';
import SignIn from '../components/SignIn';
@@ -55,4 +55,7 @@ SignInContainer.propTypes = {
requireRecaptcha: PropTypes.bool.isRequired,
};
export default compose(withSignIn)(SignInContainer);
export default compose(
withSignIn,
withPopupAuthHandler
)(SignInContainer);
@@ -86,7 +86,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withSuspendUser,
withSetCommentStatus,
withOrganizationName
@@ -5,6 +5,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import UserDetail from '../components/UserDetail';
import withQuery from 'coral-framework/hocs/withQuery';
import { withRouter } from 'react-router';
import {
getDefinitionName,
getSlotFragmentSpreads,
@@ -21,11 +22,16 @@ import {
withSetCommentStatus,
withUnbanUser,
withUnsuspendUser,
withRemoveAlwaysPremodUser,
withRejectUsername,
withPostFlag,
} from 'coral-framework/graphql/mutations';
import UserDetailComment from './UserDetailComment';
import update from 'immutability-helper';
import { showBanUserDialog } from 'actions/banUserDialog';
import { showAlwaysPremodUserDialog } from 'actions/alwaysPremodUserDialog';
import { showSuspendUserDialog } from 'actions/suspendUserDialog';
import { showRejectUsernameDialog } from 'actions/rejectUsernameDialog';
const commentConnectionFragment = gql`
fragment CoralAdmin_UserDetail_CommentConnection on CommentConnection {
@@ -131,6 +137,7 @@ class UserDetailContainer extends React.Component {
loading={loading}
error={this.props.data && this.props.data.error}
loadMore={this.loadMore}
rejectUsername={this.props.rejectUsername}
{...this.props}
/>
);
@@ -148,6 +155,8 @@ UserDetailContainer.propTypes = {
selectedCommentIds: PropTypes.array,
unbanUser: PropTypes.func.isRequired,
unsuspendUser: PropTypes.func.isRequired,
removeAlwaysPremodUser: PropTypes.func.isRequired,
rejectUsername: PropTypes.func.isRequired,
userId: PropTypes.string,
};
@@ -179,12 +188,14 @@ export const withUserDetailQuery = withQuery(
id
username
created_at
email
profiles {
id
provider
}
reliable {
flagger
commenter
commenterKarma
}
state {
status {
@@ -210,6 +221,17 @@ export const withUserDetailQuery = withQuery(
created_at
}
}
alwaysPremod {
status
history {
status
assigned_by {
id
username
}
created_at
}
},
username {
status
history {
@@ -225,6 +247,14 @@ export const withUserDetailQuery = withQuery(
}
${getSlotFragmentSpreads(slots, 'user')}
}
settings {
karmaThresholds {
comment {
reliable
unreliable
}
}
}
me {
id
}
@@ -264,7 +294,9 @@ const mapDispatchToProps = dispatch => ({
...bindActionCreators(
{
showBanUserDialog,
showAlwaysPremodUserDialog,
showSuspendUserDialog,
showRejectUsernameDialog,
changeTab,
clearUserDetailSelections,
toggleSelectCommentInUserDetail,
@@ -277,9 +309,16 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withUserDetailQuery,
withSetCommentStatus,
withUnbanUser,
withUnsuspendUser
withUnsuspendUser,
withRemoveAlwaysPremodUser,
withRejectUsername,
withPostFlag,
withRouter
)(UserDetailContainer);
+161 -64
View File
@@ -10,6 +10,9 @@ const userStatusFragment = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -24,6 +27,25 @@ const userRoleFragment = gql`
}
`;
/**
* calculateReliability will determine the reliability of a karma score based on
* the settings for the karma type.
*
* @param {Number} karma - the current karma value/score for the given user
* @param {Object} thresholds - the karma thresholds to base the karma computation on
*/
const calculateReliability = (karma, { reliable, unreliable }) => {
if (karma >= reliable) {
return true;
}
if (karma <= unreliable) {
return false;
}
return null;
};
export default {
mutations: {
SetUserRole: ({ variables: { id, role } }) => ({
@@ -47,7 +69,11 @@ export default {
});
},
}),
SuspendUser: ({ variables: { input: { id, until } } }) => ({
SuspendUser: ({
variables: {
input: { id, until },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
@@ -73,7 +99,11 @@ export default {
});
},
}),
UnsuspendUser: ({ variables: { input: { id } } }) => ({
UnsuspendUser: ({
variables: {
input: { id },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
@@ -98,7 +128,69 @@ export default {
});
},
}),
BanUser: ({ variables: { input: { id } } }) => ({
AlwaysPremodUser: ({
variables: {
input: { id },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
fragment: userStatusFragment,
id: fragmentId,
});
const updated = update(data, {
state: {
status: {
alwaysPremod: {
status: { $set: true },
},
},
},
});
proxy.writeFragment({
fragment: userStatusFragment,
id: fragmentId,
data: updated,
});
},
}),
RemoveAlwaysPremodUser: ({
variables: {
input: { id },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
fragment: userStatusFragment,
id: fragmentId,
});
const updated = update(data, {
state: {
status: {
alwaysPremod: {
status: { $set: false },
},
},
},
});
proxy.writeFragment({
fragment: userStatusFragment,
id: fragmentId,
data: updated,
});
},
}),
BanUser: ({
variables: {
input: { id },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
@@ -123,7 +215,28 @@ export default {
});
},
}),
UnbanUser: ({ variables: { input: { id } } }) => ({
SetUserAlwaysPremodStatus: ({ variables: { status, id } }) => ({
updateQueries: {
TalkAdmin_Community: prev => {
if (!status) {
return prev;
}
const updated = update(prev, {
users: {
nodes: {
$apply: nodes => nodes.filter(node => node.id !== id),
},
},
});
return updated;
},
},
}),
UnbanUser: ({
variables: {
input: { id },
},
}) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
@@ -156,7 +269,9 @@ export default {
}
const updated = update(prev, {
users: {
nodes: { $apply: nodes => nodes.filter(node => node.id !== id) },
nodes: {
$apply: nodes => nodes.filter(node => node.id !== id),
},
},
});
return updated;
@@ -173,6 +288,12 @@ export default {
},
updateQueries: {
TalkAdmin_Community_FlaggedAccounts: (prev, { mutationResult }) => {
// No need to update, when user was not in the flagged users queue.
// TODO: this should be more generic, e.g. looking at the history.
if (!prev.flaggedUsers.nodes.find(node => node.id === id)) {
return prev;
}
const decrement = {
flaggedUsernamesCount: { $apply: count => count - 1 },
};
@@ -185,41 +306,14 @@ export default {
const updated = update(prev, {
...decrement,
flaggedUsers: {
nodes: { $apply: nodes => nodes.filter(node => node.id !== id) },
nodes: {
$apply: nodes => nodes.filter(node => node.id !== id),
},
},
});
return updated;
},
},
update: proxy => {
proxy.writeFragment({
fragment: gql`
fragment Talk_ApproveUsername on User {
state {
status {
username {
status
}
}
}
}
`,
id: `User_${id}`,
data: {
__typename: 'User',
state: {
__typename: 'UserState',
status: {
__typename: 'UserStatus',
username: {
__typename: 'UsernameStatus',
status: 'APPROVED',
},
},
},
},
});
},
}),
RejectUsername: ({ variables: { id } }) => ({
optimisticResponse: {
@@ -231,6 +325,12 @@ export default {
},
updateQueries: {
TalkAdmin_Community_FlaggedAccounts: (prev, { mutationResult }) => {
// No need to update, when user was not in the flagged users queue.
// TODO: this should be more generic, e.g. looking at the history.
if (!prev.flaggedUsers.nodes.find(node => node.id === id)) {
return prev;
}
const decrement = {
flaggedUsernamesCount: { $apply: count => count - 1 },
};
@@ -251,35 +351,6 @@ export default {
return updated;
},
},
update: proxy => {
proxy.writeFragment({
fragment: gql`
fragment Talk_RejectUsername on User {
state {
status {
username {
status
}
}
}
}
`,
id: `User_${id}`,
data: {
__typename: 'User',
state: {
__typename: 'UserState',
status: {
__typename: 'UserStatus',
username: {
__typename: 'UsernameStatus',
status: 'REJECTED',
},
},
},
},
});
},
}),
UpdateSettings: ({ variables: { input } }) => ({
updateQueries: {
@@ -295,12 +366,38 @@ export default {
updateQueries: {
CoralAdmin_UserDetail: prev => {
const increment = {
user: {
reliable: {
commenter: {
$set: calculateReliability(
prev.user.reliable.commenterKarma - 1,
prev.settings.karmaThresholds.comment
),
},
commenterKarma: {
$apply: count => count - 1,
},
},
},
rejectedComments: {
$apply: count => (count < prev.totalComments ? count + 1 : count),
},
};
const decrement = {
user: {
reliable: {
commenter: {
$set: calculateReliability(
prev.user.reliable.commenterKarma + 1,
prev.settings.karmaThresholds.comment
),
},
commenterKarma: {
$apply: count => count + 1,
},
},
},
rejectedComments: {
$apply: count => (count > 0 ? count - 1 : 0),
},
+5
View File
@@ -14,6 +14,11 @@ import { hideShortcutsNote } from './actions/moderation';
smoothscroll.polyfill();
if (!NodeList.prototype.forEach) {
// Polyfill IE11 missing forEach in NodeList.
NodeList.prototype.forEach = Array.prototype.forEach;
}
function init({ store, localStorage }) {
const shouldHide = localStorage.getItem('coral:shortcutsNote') === 'hide';
if (shouldHide) {
@@ -0,0 +1,29 @@
import {
SHOW_ALWAYS_PREMOD_USER_DIALOG,
HIDE_ALWAYS_PREMOD_USER_DIALOG,
} from '../constants/alwaysPremodUserDialog';
const initialState = {
open: false,
userId: null,
username: '',
};
export default function alwaysPremodUserDialog(state = initialState, action) {
switch (action.type) {
case SHOW_ALWAYS_PREMOD_USER_DIALOG:
return {
...state,
open: true,
userId: action.userId,
username: action.username,
};
case HIDE_ALWAYS_PREMOD_USER_DIALOG:
return {
...state,
open: false,
};
default:
return state;
}
}
+4
View File
@@ -5,13 +5,17 @@ import moderation from './moderation';
import install from './install';
import banUserDialog from './banUserDialog';
import suspendUserDialog from './suspendUserDialog';
import alwaysPremodUserDialog from './alwaysPremodUserDialog';
import rejectUsernameDialog from './rejectUsernameDialog';
import userDetail from './userDetail';
import ui from './ui';
export default {
rejectUsernameDialog,
banUserDialog,
configure,
suspendUserDialog,
alwaysPremodUserDialog,
userDetail,
stories,
community,
@@ -0,0 +1,29 @@
import {
SHOW_REJECT_USERNAME_DIALOG,
HIDE_REJECT_USERNAME_DIALOG,
} from '../constants/rejectUsernameDialog';
const initialState = {
open: false,
userId: null,
username: '',
};
export default function rejectUsernameDialog(state = initialState, action) {
switch (action.type) {
case SHOW_REJECT_USERNAME_DIALOG:
return {
...state,
open: true,
userId: action.userId,
username: action.username,
};
case HIDE_REJECT_USERNAME_DIALOG:
return {
...state,
open: false,
};
default:
return state;
}
}
@@ -11,6 +11,7 @@ const initialState = {
criteria: {
asc: 'false',
filter: 'all',
limit: 20,
},
};
+14
View File
@@ -6,6 +6,10 @@ import {
SHOW_SUSPEND_USER_DIALOG,
HIDE_SUSPEND_USER_DIALOG,
} from '../constants/suspendUserDialog';
import {
SHOW_ALWAYS_PREMOD_USER_DIALOG,
HIDE_ALWAYS_PREMOD_USER_DIALOG,
} from '../constants/alwaysPremodUserDialog';
const initialState = {
modal: false,
@@ -23,6 +27,11 @@ export default function config(state = initialState, action) {
...state,
modal: true,
};
case SHOW_ALWAYS_PREMOD_USER_DIALOG:
return {
...state,
modal: true,
};
case HIDE_BAN_USER_DIALOG:
return {
...state,
@@ -33,6 +42,11 @@ export default function config(state = initialState, action) {
...state,
modal: false,
};
case HIDE_ALWAYS_PREMOD_USER_DIALOG:
return {
...state,
modal: false,
};
default:
return state;
}
@@ -78,9 +78,10 @@
}
.flaggedByReason {
font-size: 1tpx;
font-size: 14px;
margin: 0px;
line-height: 1.4;
word-break: break-word;
}
@@ -34,6 +34,21 @@
}
}
.filterHeader {
margin-top: 30px;
font-size: 16px;
font-weight: 900;
}
.filterDetail {
margin-top: 15px;
font-size: 16px;
}
.radioGroup {
margin: 5px 0;
}
.mainContent {
width: calc(100% - 300px);
padding: 34px 14px;
@@ -115,6 +130,12 @@ th.header:nth-child(2), th.header:nth-child(3) {
font-size: 0.98em;
}
.actionsMenuAlwaysPremod {
background-color: #F0B50B;
border-color: #F0B50B;
color: white;
}
.actionsMenuSuspended {
background-color: #F29336;
border-color: #F29336;
@@ -133,6 +154,7 @@ th.header:nth-child(2), th.header:nth-child(3) {
.roleDropdown {
width: 150px;
text-align: left;
}
.roleOption {
@@ -8,7 +8,12 @@ import LoadMore from '../../../components/LoadMore';
import PropTypes from 'prop-types';
import ActionsMenu from 'coral-admin/src/components/ActionsMenu';
import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem';
import { isSuspended, isBanned } from 'coral-framework/utils/user';
import {
isSuspended,
isBanned,
isAlwaysPremod,
} from 'coral-framework/utils/user';
import { RadioGroup, Radio } from 'react-mdl';
import moment from 'moment';
import {
ADMIN,
@@ -42,6 +47,8 @@ class People extends React.Component {
return 'Banned';
} else if (isSuspended(user)) {
return 'Suspended';
} else if (isAlwaysPremod(user)) {
return 'Always premoderated';
}
return '';
};
@@ -54,6 +61,10 @@ class People extends React.Component {
this.props.unbanUser(input);
};
removeAlwaysPremodUser = input => {
this.props.removeAlwaysPremodUser(input);
};
showBanUserDialog = input => {
this.props.showBanUserDialog(input);
};
@@ -62,13 +73,18 @@ class People extends React.Component {
this.props.showSuspendUserDialog(input);
};
showAlwaysPremodUserDialog = input => {
this.props.showAlwaysPremodUserDialog(input);
};
render() {
const {
onSearchChange,
onFilterChange,
users = [],
setUserRole,
viewUserDetail,
loadMore,
filters,
} = this.props;
const hasResults = !!users.nodes.length;
@@ -87,11 +103,44 @@ class People extends React.Component {
id="commenters-search"
type="text"
className={styles.searchBoxInput}
defaultValue=""
onChange={onSearchChange}
value={filters.search}
onChange={onFilterChange('search')}
placeholder={t('streams.search')}
/>
</div>
<div className={styles.filterHeader}>
{t('community.filter_users')}
</div>
<div className={styles.filterDetail}>{t('community.status')}</div>
<RadioGroup
name="statusFilter"
value={filters.status}
childContainer="div"
onChange={onFilterChange('status')}
className={styles.radioGroup}
>
<Radio value="">{t('community.all')}</Radio>
<Radio value="active">{t('community.active')}</Radio>
<Radio value="suspended">{t('community.suspended')}</Radio>
<Radio value="banned">{t('community.banned')}</Radio>
<Radio value="alwaysPremod">{t('community.always_premod')}</Radio>
</RadioGroup>
<div className={styles.filterDetail}>
{t('community.filter_role')}
</div>
<RadioGroup
name="roleFilter"
value={filters.role}
childContainer="div"
onChange={onFilterChange('role')}
className={styles.radioGroup}
>
<Radio value="">{t('community.all')}</Radio>
<Radio value={ADMIN}>{t('community.admin')}</Radio>
<Radio value={STAFF}>{t('community.staff')}</Radio>
<Radio value={MODERATOR}>{t('community.moderator')}</Radio>
<Radio value={COMMENTER}>{t('community.commenter')}</Radio>
</RadioGroup>
</div>
<div className={styles.mainContent}>
{hasResults ? (
@@ -130,7 +179,9 @@ class People extends React.Component {
{user.username}
</button>
<span className={styles.email}>
{user.profiles.map(({ id }) => id)}
{user.email
? user.email
: user.profiles.map(p => p.id).join(', ')}
</span>
</td>
<td className="mdl-data-table__cell--non-numeric">
@@ -152,6 +203,9 @@ class People extends React.Component {
user
),
[styles.actionsMenuBanned]: isBanned(user),
[styles.actionsMenuAlwaysPremod]: isAlwaysPremod(
user
),
},
'talk-admin-user-detail-actions-button'
)}
@@ -174,7 +228,7 @@ class People extends React.Component {
})
}
>
Suspend User
{t('modqueue.suspend')}
</ActionsMenuItem>
)}
@@ -193,14 +247,35 @@ class People extends React.Component {
})
}
>
Ban User
{t('modqueue.ban_user_actions')}
</ActionsMenuItem>
)}
{isAlwaysPremod(user) ? (
<ActionsMenuItem
onClick={() =>
this.removeAlwaysPremodUser({ id: user.id })
}
>
Remove Always Premoderate
</ActionsMenuItem>
) : (
<ActionsMenuItem
onClick={() =>
this.showAlwaysPremodUserDialog({
userId: user.id,
username: user.username,
})
}
>
{t('modqueue.always_premod_user_actions')}
</ActionsMenuItem>
)}
</ActionsMenu>
</td>
<td className="mdl-data-table__cell--non-numeric">
<Dropdown
className={cn(
toggleClassName={cn(
'talk-admin-community-people-dd-role',
styles.roleDropdown
)}
@@ -252,13 +327,16 @@ class People extends React.Component {
People.propTypes = {
users: PropTypes.object.isRequired,
onSearchChange: PropTypes.func.isRequired,
filters: PropTypes.object.isRequired,
onFilterChange: PropTypes.func.isRequired,
setUserRole: PropTypes.func.isRequired,
viewUserDetail: PropTypes.func.isRequired,
unbanUser: PropTypes.func.isRequired,
unsuspendUser: PropTypes.func.isRequired,
removeAlwaysPremodUser: PropTypes.func.isRequired,
showSuspendUserDialog: PropTypes.func,
showBanUserDialog: PropTypes.func,
showAlwaysPremodUserDialog: PropTypes.func,
loadMore: PropTypes.func.isRequired,
};
@@ -71,7 +71,7 @@ class RejectUsernameDialog extends Component {
<Dialog
className={cn(
styles.suspendDialog,
'talk-admin-reject-username-dialog'
'talk-admin-reject-reported-username-dialog'
)}
id="rejectUsernameDialog"
open={open}
@@ -85,7 +85,7 @@ class RejectUsernameDialog extends Component {
<div
className={cn(
styles.container,
`talk-admin-reject-username-dialog-step-${stage}`
`talk-admin-reject-reported-username-dialog-step-${stage}`
)}
>
<div className={styles.description}>
@@ -101,7 +101,7 @@ class RejectUsernameDialog extends Component {
<div className={styles.emailContainer}>
<textarea
rows={5}
className={cn(styles.emailInput, 'talk-admin-reject-username-dialog-suspension-message')}
className={cn(styles.emailInput, 'talk-admin-reject-reported-username-dialog-suspension-message')}
value={this.state.email}
onChange={this.onEmailChange}/>
</div>
@@ -110,7 +110,7 @@ class RejectUsernameDialog extends Component {
<div
className={cn(
styles.modalButtons,
'talk-admin-reject-username-dialog-buttons'
'talk-admin-reject-reported-username-dialog-buttons'
)}
>
{Object.keys(stages[stage].options).map((key, i) => (
@@ -118,7 +118,7 @@ class RejectUsernameDialog extends Component {
key={i}
className={cn(
'talk-admin-username-dialog-button',
`talk-admin-reject-username-dialog-button-${key}`
`talk-admin-reject-reported-username-dialog-button-${key}`
)}
onClick={this.onActionClick(stage, i)}
>
@@ -46,7 +46,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameFlagged: user } } }
{
subscriptionData: {
data: { usernameFlagged: user },
},
}
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -62,7 +66,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_APPROVED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameApproved: user } } }
{
subscriptionData: {
data: { usernameApproved: user },
},
}
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -78,7 +86,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameRejected: user } } }
{
subscriptionData: {
data: { usernameRejected: user },
},
}
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -96,7 +108,9 @@ class FlaggedAccountsContainer extends Component {
prev,
{
subscriptionData: {
data: { usernameChanged: { previousUsername, user } },
data: {
usernameChanged: { previousUsername, user },
},
},
}
) => {
@@ -297,7 +311,10 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withApproveUsername,
withQuery(
gql`
@@ -15,7 +15,11 @@ class IndicatorContainer extends Component {
document: USERNAME_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameFlagged: user } } }
{
subscriptionData: {
data: { usernameFlagged: user },
},
}
) => {
return handleIndicatorChange(prev, user);
},
@@ -24,7 +28,11 @@ class IndicatorContainer extends Component {
document: USERNAME_APPROVED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameApproved: user } } }
{
subscriptionData: {
data: { usernameApproved: user },
},
}
) => {
return handleIndicatorChange(prev, user);
},
@@ -33,7 +41,11 @@ class IndicatorContainer extends Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameRejected: user } } }
{
subscriptionData: {
data: { usernameRejected: user },
},
}
) => {
return handleIndicatorChange(prev, user);
},
@@ -42,7 +54,13 @@ class IndicatorContainer extends Component {
document: USERNAME_CHANGED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { usernameChanged: { user } } } }
{
subscriptionData: {
data: {
usernameChanged: { user },
},
},
}
) => {
return handleIndicatorChange(prev, user);
},
@@ -98,9 +116,15 @@ const fields = `
status {
username {
status
history {
status
}
}
}
}
action_summaries {
count
}
`;
const USERNAME_FLAGGED_SUBSCRIPTION = gql`
@@ -8,68 +8,76 @@ import {
withUnbanUser,
withUnsuspendUser,
withSetUserRole,
withRemoveAlwaysPremodUser,
} from 'coral-framework/graphql/mutations';
import { showBanUserDialog } from 'actions/banUserDialog';
import { showSuspendUserDialog } from 'actions/suspendUserDialog';
import { showAlwaysPremodUserDialog } from 'actions/alwaysPremodUserDialog';
import { viewUserDetail } from '../../../actions/userDetail';
import { appendNewNodes } from 'plugin-api/beta/client/utils';
import update from 'immutability-helper';
import { Spinner } from 'coral-ui';
import withQuery from 'coral-framework/hocs/withQuery';
class PeopleContainer extends React.Component {
class PeopleContainer extends React.PureComponent {
timer = null;
state = {
searchValue: '',
search: '',
role: '',
status: '',
};
onSearchChange = e => {
const { value } = e.target;
this.setState({ searchValue: value }, () => {
statusToQuery = {
active: { suspended: false, banned: false },
suspended: { suspended: true },
banned: { banned: true },
alwaysPremod: { alwaysPremod: true },
};
onFilterChange = filter => e =>
this.setState({ [filter]: e.target.value }, () => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.search(value);
}, 350);
this.timer = setTimeout(this.filter, 350);
});
getFilterState = () => {
const { role, status } = this.state;
return {
status: this.statusToQuery[status] || null,
role: role || null,
};
};
search = async value => {
return this.props.data.fetchMore({
query: SEARCH_QUERY,
filter = () =>
this.props.data.fetchMore({
query: FILTER_QUERY,
variables: {
value,
state: this.getFilterState(),
value: this.state.search,
limit: 10,
},
updateQuery: (previous, { fetchMoreResult: { users } }) => {
const updated = update(previous, {
updateQuery: (previous, { fetchMoreResult: { users } }) =>
update(previous, {
users: {
nodes: {
$set: users.nodes,
},
nodes: { $set: users.nodes },
hasNextPage: { $set: users.hasNextPage },
endCursor: { $set: users.endCursor },
},
});
return updated;
},
}),
});
};
setUserRole = async (id, role) => {
await this.props.setUserRole(id, role);
};
loadMore = () => {
return this.props.data.fetchMore({
loadMore = () =>
this.props.data.fetchMore({
query: LOAD_MORE_QUERY,
variables: {
value: this.state.searchValue,
limit: 5,
cursor: this.props.root.users.endCursor,
state: this.getFilterState(),
value: this.state.search,
limit: 5,
},
updateQuery: (previous, { fetchMoreResult: { users } }) => {
const updated = update(previous, {
updateQuery: (previous, { fetchMoreResult: { users } }) =>
update(previous, {
users: {
nodes: {
$apply: nodes => appendNewNodes(nodes, users.nodes),
@@ -77,11 +85,8 @@ class PeopleContainer extends React.Component {
hasNextPage: { $set: users.hasNextPage },
endCursor: { $set: users.endCursor },
},
});
return updated;
},
}),
});
};
render() {
if (this.props.data.error) {
@@ -98,17 +103,20 @@ class PeopleContainer extends React.Component {
return (
<People
onSearchChange={this.onSearchChange}
onFilterChange={this.onFilterChange}
viewUserDetail={this.props.viewUserDetail}
setUserRole={this.setUserRole}
setUserRole={this.props.setUserRole}
showSuspendUserDialog={this.props.showSuspendUserDialog}
showBanUserDialog={this.props.showBanUserDialog}
showAlwaysPremodUserDialog={this.props.showAlwaysPremodUserDialog}
unbanUser={this.props.unbanUser}
unsuspendUser={this.props.unsuspendUser}
removeAlwaysPremodUser={this.props.removeAlwaysPremodUser}
data={this.props.data}
root={this.props.root}
users={this.props.root.users}
loadMore={this.loadMore}
filters={this.state}
/>
);
}
@@ -118,23 +126,15 @@ PeopleContainer.propTypes = {
setUserRole: PropTypes.func.isRequired,
unbanUser: PropTypes.func.isRequired,
unsuspendUser: PropTypes.func.isRequired,
removeAlwaysPremodUser: PropTypes.func.isRequired,
viewUserDetail: PropTypes.func.isRequired,
showSuspendUserDialog: PropTypes.func,
showBanUserDialog: PropTypes.func,
showAlwaysPremodUserDialog: PropTypes.func,
data: PropTypes.object,
root: PropTypes.object,
};
const mapDispatchToProps = dispatch =>
bindActionCreators(
{
viewUserDetail,
showSuspendUserDialog,
showBanUserDialog,
},
dispatch
);
const LOAD_MORE_QUERY = gql`
query TalkAdmin_Community_People_LoadMoreUsers(
$limit: Int
@@ -159,6 +159,9 @@ const LOAD_MORE_QUERY = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -169,9 +172,13 @@ const LOAD_MORE_QUERY = gql`
}
`;
const SEARCH_QUERY = gql`
query TalkAdmin_Community_People_SearchUsers($value: String, $limit: Int) {
users(query: { value: $value, limit: $limit }) {
const FILTER_QUERY = gql`
query TalkAdmin_Community_People_FilterUsers(
$state: UserStateInput
$value: String
$limit: Int
) {
users(query: { state: $state, value: $value, limit: $limit }) {
hasNextPage
endCursor
nodes {
@@ -189,6 +196,9 @@ const SEARCH_QUERY = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -199,11 +209,26 @@ const SEARCH_QUERY = gql`
}
`;
const mapDispatchToProps = dispatch =>
bindActionCreators(
{
viewUserDetail,
showSuspendUserDialog,
showBanUserDialog,
showAlwaysPremodUserDialog,
},
dispatch
);
export default compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withSetUserRole,
withUnsuspendUser,
withUnbanUser,
withRemoveAlwaysPremodUser,
withQuery(
gql`
query TalkAdmin_Community_People {
@@ -225,6 +250,9 @@ export default compose(
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -19,6 +19,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withRejectUsername
)(RejectUsernameDialog);
@@ -106,6 +106,23 @@ export function handleFlaggedAccountsChange(root, user, notify) {
}
}
export const wasUsernameReported = user => {
const previousStatus =
user.state.status.username.history[
user.state.status.username.history.length - 2
];
// Check for correct previous status
if (!['SET', 'CHANGES'].includes(previousStatus)) {
return false;
}
// Check for flags
if (user.action_summaries.every(as => as.count === 0)) {
return false;
}
return true;
};
/**
* Track indicator status
* @param {Object} root current state of the store
@@ -119,7 +136,9 @@ export function handleIndicatorChange(root, user) {
return incrementFlaggedUserCount(root);
case 'APPROVED':
case 'REJECTED':
return decrementFlaggedUserCount(root);
if (wasUsernameReported(user)) {
return decrementFlaggedUserCount(root);
}
default:
}
}
@@ -34,7 +34,7 @@ class EmbedLink extends Component {
`;
return (
<ConfigureCard title={'Embed Comment Stream'}>
<ConfigureCard title={t('configure.embed_comment_stream')}>
<p>{t('configure.copy_and_paste')}</p>
<textarea
rows={5}
@@ -53,7 +53,7 @@ class EmbedLink extends Component {
{t('embedlink.copy')}
</Button>
<div className={styles.copiedText}>
{this.state.copied && 'Copied!'}
{this.state.copied && t('embedlink.copied')}
</div>
</div>
</ConfigureCard>
@@ -3,7 +3,7 @@ import { SelectField, Option } from 'react-mdl-selectfield';
import t from 'coral-framework/services/i18n';
import styles from './StreamSettings.css';
import { Textfield } from 'react-mdl';
import { Icon, TextArea } from 'coral-ui';
import { Icon } from 'coral-ui';
import PropTypes from 'prop-types';
import Slot from 'coral-framework/components/Slot';
import MarkdownEditor from 'coral-framework/components/MarkdownEditor';
@@ -66,8 +66,8 @@ class StreamSettings extends React.Component {
this.props.updatePending({ updater });
};
updateClosedMessage = event => {
const updater = { closedMessage: { $set: event.target.value } };
updateClosedMessage = value => {
const updater = { closedMessage: { $set: value } };
this.props.updatePending({ updater });
};
@@ -82,6 +82,20 @@ class StreamSettings extends React.Component {
this.props.updatePending({ updater });
};
updateDisableCommenting = () => {
const updater = {
disableCommenting: {
$set: !this.props.settings.disableCommenting,
},
};
this.props.updatePending({ updater });
};
updateDisableCommentingMessage = value => {
const updater = { disableCommentingMessage: { $set: value } };
this.props.updatePending({ updater });
};
updateAutoClose = () => {
const updater = {
autoCloseStream: { $set: !this.props.settings.autoCloseStream },
@@ -141,9 +155,19 @@ class StreamSettings extends React.Component {
<ConfigureCard
checked={settings.infoBoxEnable}
onCheckbox={this.updateInfoBoxEnable}
title={t('configure.include_comment_stream')}
title={t('configure.code_of_conduct_summary')}
>
<p>{t('configure.include_comment_stream_desc')}</p>
<p>
{t('configure.code_of_conduct_summary_desc')}
&nbsp;
<a
target="_blank"
rel="noopener noreferrer"
href="https://guides.coralproject.net/create-a-code-of-conduct/"
>
Code of Conduct Guide.
</a>
</p>
<div
className={cn(
styles.configSettingInfoBox,
@@ -164,7 +188,7 @@ class StreamSettings extends React.Component {
>
<p>{t('configure.closed_comments_desc')}</p>
<div>
<TextArea
<MarkdownEditor
className={styles.descriptionBox}
onChange={this.updateClosedMessage}
value={settings.closedMessage}
@@ -192,6 +216,25 @@ class StreamSettings extends React.Component {
&nbsp;
{t('configure.edit_comment_timeframe_text_post')}
</ConfigureCard>
<ConfigureCard
checked={settings.disableCommenting}
onCheckbox={this.updateDisableCommenting}
title={t('configure.disable_commenting_title')}
>
<p>{t('configure.disable_commenting_desc')}</p>
<div
className={cn(
styles.configSettingDisableCommenting,
settings.disableCommenting ? null : styles.hidden
)}
>
<MarkdownEditor
className={styles.descriptionBox}
onChange={this.updateDisableCommentingMessage}
value={settings.disableCommentingMessage}
/>
</div>
</ConfigureCard>
<ConfigureCard
checked={settings.autoCloseStream}
onCheckbox={this.updateAutoClose}
@@ -205,12 +248,14 @@ class StreamSettings extends React.Component {
onChange={this.updateClosedTimeout}
value={getTimeoutAmount(settings.closedTimeout)}
label={t('configure.closed_comments_label')}
disabled={!settings.autoCloseStream}
/>
<div className={styles.configTimeoutSelect}>
<SelectField
label="comments closed time window"
value={getTimeoutMeasure(settings.closedTimeout)}
onChange={this.updateClosedTimeoutMeasure}
readOnly={!settings.autoCloseStream}
>
<Option value={'hours'}>{t('configure.hours')}</Option>
<Option value={'days'}>{t('configure.days')}</Option>
@@ -6,19 +6,23 @@ import ConfigureCard from 'coral-framework/components/ConfigureCard';
const Wordlist = ({ suspectWords, bannedWords, onChangeWordlist }) => (
<div>
<ConfigureCard title={t('configure.banned_words_title')}>
<ConfigureCard collapsible title={t('configure.banned_words_title')}>
<p>{t('configure.banned_word_text')}</p>
<TagsInput
value={bannedWords}
inputProps={{ placeholder: 'word or phrase' }}
inputProps={{
placeholder: t('configure.suspect_or_forbidden_words_placeholder'),
}}
onChange={tags => onChangeWordlist('banned', tags)}
/>
</ConfigureCard>
<ConfigureCard title={t('configure.suspect_word_title')}>
<ConfigureCard collapsible title={t('configure.suspect_word_title')}>
<p>{t('configure.suspect_word_text')}</p>
<TagsInput
value={suspectWords}
inputProps={{ placeholder: 'word or phrase' }}
inputProps={{
placeholder: t('configure.suspect_or_forbidden_words_placeholder'),
}}
onChange={tags => onChangeWordlist('suspect', tags)}
/>
</ConfigureCard>
@@ -174,7 +174,10 @@ const mapDispatchToProps = dispatch =>
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withUpdateSettings,
withConfigureQuery,
withMergedSettings('root.settings', 'pending', 'mergedSettings')
@@ -42,7 +42,10 @@ export default compose(
}
`,
}),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
@@ -37,7 +37,10 @@ export default compose(
}
`,
}),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
@@ -39,11 +39,16 @@ export default compose(
autoCloseStream
closedTimeout
closedMessage
disableCommenting
disableCommentingMessage
${getSlotFragmentSpreads(slots, 'settings')}
}
`,
}),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
@@ -39,7 +39,10 @@ export default compose(
}
`,
}),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
@@ -83,4 +83,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
export default connect(mapStateToProps, mapDispatchToProps)(InstallContainer);
export default connect(
mapStateToProps,
mapDispatchToProps
)(InstallContainer);
@@ -1,5 +1,4 @@
@custom-media --big-viewport (min-width: 780px);
.root {
border-bottom: 1px solid #e0e0e0;
font-size: 18px;
@@ -13,7 +12,6 @@
margin-top: 13px;
min-height: 0;
outline: 0;
/*
Fix rendering issues in Safari by promoting this
into its own layer.
@@ -21,7 +19,6 @@
https://www.pivotaltracker.com/story/show/151142211
*/
transform: translateZ(0);
&:last-child {
border-bottom: none;
}
@@ -39,7 +36,6 @@
display: flex;
align-items: center;
justify-content: space-between;
}
.author {
@@ -65,16 +61,23 @@
line-height: 1.5;
font-weight: 300;
margin-bottom: 8px;
overflow-wrap: break-word;
word-break:break-word;
}
.body {
margin-top: 0px;
flex: 1;
color: black;
max-width: 500px;
/*
IE11 fix Next line was supposed to be:
max-width: 500px;
*/
padding-right: 20px;
/** IE11 fix end **/
font-weight: 300;
font-size: 16px;
word-break: break-all;
overflow-wrap: break-word;
}
.created {
@@ -95,7 +98,6 @@
font-weight: 500;
line-height: 1.2;
max-width: 500px;
a {
display: inline-block;
color: #063b9a;
@@ -103,17 +105,15 @@
font-weight: 500;
letter-spacing: .5px;
margin-left: 10px;
font-size: 13px;
margin-left: 5px;
padding-bottom: 0px;
border-bottom: solid 1px;
line-height: 16px;
&:hover {
opacity: .9;
cursor: pointer;
}
}
}
}
@@ -138,12 +138,10 @@
cursor: pointer;
font-weight: normal;
white-space: nowrap;
&:hover {
text-decoration: underline;
opacity: .9;
}
i {
font-size: 12px;
position: relative;
@@ -172,7 +170,6 @@
align-items: center;
justify-content: flex-end;
margin-right: 14px;
i {
margin-right: 5px;
}
@@ -181,7 +178,6 @@
@media (--big-viewport) {
.root {
margin-bottom: 30px;
&:last-child {
border-bottom: 1px solid #e0e0e0;
}
@@ -190,7 +186,6 @@
.commentContent {
display: flex;
blockquote {
font-size: inherit;
line-height: inherit;
@@ -200,4 +195,4 @@
.commentContentFooter {
flex: 1;
}
}
@@ -14,8 +14,10 @@ import cn from 'classnames';
import ApproveButton from 'coral-admin/src/components/ApproveButton';
import RejectButton from 'coral-admin/src/components/RejectButton';
import CommentDeletedTombstone from '../../../components/CommentDeletedTombstone';
import TimeAgo from 'coral-framework/components/TimeAgo';
import t, { timeago } from 'coral-framework/services/i18n';
import { buildCommentURL } from 'coral-framework/utils/url';
import t from 'coral-framework/services/i18n';
class Comment extends React.Component {
ref = null;
@@ -126,9 +128,10 @@ class Comment extends React.Component {
{comment.user.username}
</span>
<span className={styles.created}>
{timeago(comment.created_at)}
</span>
<TimeAgo
className={styles.created}
datetime={comment.created_at}
/>
{comment.editing && comment.editing.edited ? (
<span>
&nbsp;<span className={styles.editedMarker}>
@@ -168,8 +171,9 @@ class Comment extends React.Component {
<div className={styles.commentContentFooter}>
<a
className={styles.external}
href={`${comment.asset.url}?commentId=${comment.id}`}
href={buildCommentURL(comment.asset.url, comment.id)}
target="_blank"
rel="noopener noreferrer"
>
<Icon name="open_in_new" /> {t('comment.view_context')}
</a>
@@ -179,8 +183,7 @@ class Comment extends React.Component {
<div className={styles.sideActions}>
<IfHasLink text={comment.body}>
<span className={styles.hasLinks}>
{/* TODO: translate string */}
<Icon name="error_outline" /> Contains Link
<Icon name="error_outline" /> {t('common.contains_link')}
</span>
</IfHasLink>
<div className={`actions ${styles.actions}`}>
@@ -24,6 +24,7 @@ const ModerationMenu = ({ asset = {}, items, getModPath, activeTab }) => {
>
{items.map(queue => (
<Link
id={`talk-admin-moderate-tab-${queue.key}`}
key={queue.key}
to={getModPath(queue.key, asset.id)}
className={cn('mdl-tabs__tab', styles.tab, {
@@ -15,6 +15,7 @@ import {
} from 'react-virtualized';
import throttle from 'lodash/throttle';
import key from 'keymaster';
import cn from 'classnames';
const hasComment = (nodes, id) => nodes.some(node => node.id === id);
@@ -380,6 +381,11 @@ class ModerationQueue extends React.Component {
...props
} = this.props;
const rootClassName = cn(
styles.root,
`talk-admin-moderate-queue-${this.props.activeTab}`
);
if (comments.length === 0) {
return (
<div className={styles.root}>
@@ -401,7 +407,7 @@ class ModerationQueue extends React.Component {
const comment = comments[index];
return (
<div className={styles.root}>
<div className={rootClassName}>
<Comment
root={this.props.root}
key={comment.id}
@@ -423,7 +429,7 @@ class ModerationQueue extends React.Component {
const view = this.state.view;
return (
<div className={styles.root}>
<div className={rootClassName}>
<ViewMore
viewMore={() => this.viewNewComments()}
count={comments.length - view.length}
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './Story.css';
import t from 'coral-framework/services/i18n';
const formatDate = date => {
const d = new Date(date);
@@ -14,7 +15,9 @@ const Story = ({ author, title, createdAt, open, id, goToStory }) => {
<div className={styles.meta}>
<span className={styles.author}>By {author}</span>
<span className={styles.createdAt}>{formatDate(createdAt)}</span>
<span className={styles.status}>{open ? 'Open' : 'Closed'}</span>
<span className={styles.status}>
{open ? t('streams.open') : t('streams.closed')}
</span>
</div>
</li>
);
@@ -3,9 +3,13 @@ import PropTypes from 'prop-types';
import styles from './StorySearch.css';
import { Button, Spinner, Icon } from 'coral-ui';
import Story from './Story';
import t from 'coral-framework/services/i18n';
const StorySearch = props => {
const { root: { assets }, data: { loading } } = props;
const {
root: { assets },
data: { loading },
} = props;
if (!props.moderation.storySearchVisible) {
return null;
@@ -33,14 +37,14 @@ const StorySearch = props => {
onClick={props.search}
raised
>
Search
{t('streams.search')}
</Button>
</div>
<div className={styles.results}>
{props.assetId && (
<div className={styles.cta}>
<a onClick={props.goToModerateAll}>
Moderate comments on All Stories
{t('moderate_all_streams')}
</a>
</div>
)}
@@ -48,13 +52,15 @@ const StorySearch = props => {
{props.moderation.storySearchString ? (
<div className={styles.searchResults}>
<Icon name="search" />
<span className={styles.headlineRecent}>Search Results</span>
<span className={styles.headlineRecent}>
{t('streams.search_results')}
</span>
</div>
) : (
<div className={styles.searchResults}>
<Icon name="access_time" />
<span className={styles.headlineRecent}>
Most Recent Stories
{t('streams.most_recent_stories')}
</span>
</div>
)}
@@ -82,7 +88,9 @@ const StorySearch = props => {
)}
{assets.nodes.length === 0 && (
<div className={styles.noResults}>No results</div>
<div className={styles.noResults}>
{t('streams.search_results')}
</div>
)}
</div>
</div>
@@ -22,7 +22,11 @@ class IndicatorContainer extends Component {
document: COMMENT_ADDED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentAdded: comment } } }
{
subscriptionData: {
data: { commentAdded: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -31,7 +35,11 @@ class IndicatorContainer extends Component {
document: COMMENT_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentFlagged: comment } } }
{
subscriptionData: {
data: { commentFlagged: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -40,7 +48,11 @@ class IndicatorContainer extends Component {
document: COMMENT_EDITED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentEdited: comment } } }
{
subscriptionData: {
data: { commentEdited: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -49,7 +61,11 @@ class IndicatorContainer extends Component {
document: COMMENT_ACCEPTED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentAccepted: comment } } }
{
subscriptionData: {
data: { commentAccepted: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -58,7 +74,11 @@ class IndicatorContainer extends Component {
document: COMMENT_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentRejected: comment } } }
{
subscriptionData: {
data: { commentRejected: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -67,7 +87,11 @@ class IndicatorContainer extends Component {
document: COMMENT_RESET_SUBSCRIPTION,
updateQuery: (
prev,
{ subscriptionData: { data: { commentReset: comment } } }
{
subscriptionData: {
data: { commentReset: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -71,7 +71,9 @@ class ModerationContainer extends Component {
};
get activeTab() {
const { root: { asset, settings } } = this.props;
const {
root: { asset, settings },
} = this.props;
const id = getAssetId(this.props);
const tab = getTab(this.props);
@@ -94,7 +96,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentAdded: comment } } }
{
subscriptionData: {
data: { commentAdded: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -104,7 +110,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentAccepted: comment } } }
{
subscriptionData: {
data: { commentAccepted: comment },
},
}
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -125,7 +135,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentRejected: comment } } }
{
subscriptionData: {
data: { commentRejected: comment },
},
}
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -146,7 +160,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentReset: comment } } }
{
subscriptionData: {
data: { commentReset: comment },
},
}
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -167,7 +185,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentEdited: comment } } }
{
subscriptionData: {
data: { commentEdited: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -177,7 +199,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
{ subscriptionData: { data: { commentFlagged: comment } } }
{
subscriptionData: {
data: { commentFlagged: comment },
},
}
) => {
return this.handleCommentChange(prev, comment);
},
@@ -289,7 +315,11 @@ class ModerationContainer extends Component {
};
render() {
const { root, root: { asset, settings }, data } = this.props;
const {
root,
root: { asset, settings },
data,
} = this.props;
const assetId = getAssetId(this.props);
if (assetId) {
@@ -546,7 +576,10 @@ const mapDispatchToProps = dispatch => ({
export default compose(
withQueueConfig(baseQueueConfig),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withSetCommentStatus,
withModQueueQuery
)(ModerationContainer);
@@ -112,4 +112,7 @@ export const withAssetSearchQuery = withQuery(
}
);
export default compose(withRouter, withAssetSearchQuery)(StorySearchContainer);
export default compose(
withRouter,
withAssetSearchQuery
)(StorySearchContainer);
@@ -92,9 +92,6 @@
.statusDropdown {
width: 150px;
}
.statusDropdownOption {
min-width: 100px;
text-align: left;
}
@@ -22,20 +22,12 @@ class Stories extends Component {
const closed = !!(closedAt && new Date(closedAt).getTime() < Date.now());
return (
<Dropdown
className={styles.statusDropdown}
toggleClassName={styles.statusDropdown}
value={closed}
onChange={value => this.props.onStatusChange(value, id)}
>
<Option
value={false}
label={t('streams.open')}
className={styles.statusDropdownOption}
/>
<Option
value={true}
label={t('streams.closed')}
className={styles.statusDropdownOption}
/>
<Option value={false} label={t('streams.open')} />
<Option value={true} label={t('streams.closed')} />
</Dropdown>
);
};
@@ -50,7 +50,7 @@ class StoriesContainer extends Component {
const { updateAssetState } = this.props;
try {
updateAssetState(id, closeStream ? Date.now() : null);
await updateAssetState(id, closeStream ? Date.now() : null);
this.fetchAssets();
} catch (err) {
console.error(err);
@@ -113,4 +113,7 @@ StoriesContainer.propTypes = {
updateAssetState: PropTypes.func.isRequired,
};
export default connect(mapStateToProps, mapDispatchToProps)(StoriesContainer);
export default connect(
mapStateToProps,
mapDispatchToProps
)(StoriesContainer);
+27 -23
View File
@@ -3,32 +3,36 @@ import { getStaticConfiguration } from 'coral-framework/services/staticConfigura
import { createPostMessage } from 'coral-framework/services/postMessage';
document.addEventListener('DOMContentLoaded', () => {
try {
const staticConfig = getStaticConfiguration();
const { STATIC_ORIGIN: origin } = staticConfig;
const postMessage = createPostMessage(origin);
const staticConfig = getStaticConfiguration();
const { BASE_ORIGIN: origin } = staticConfig;
const postMessage = createPostMessage(origin);
// Get the auth element and parse it as JSON by decoding it.
const auth = document.getElementById('auth');
const doc = document.implementation.createHTMLDocument('');
doc.body.innerHTML = auth.innerText;
// Get the auth element and parse it as JSON by decoding it.
const auth = document.getElementById('auth');
const doc = document.implementation.createHTMLDocument('');
doc.body.innerHTML = auth.innerText;
// Auth state is contained within the node.
const { err, data } = JSON.parse(doc.body.textContent);
if (err) {
// TODO: send back the error message.
console.error(err);
// Auth state is contained within the node.
const { err, data } = JSON.parse(doc.body.textContent);
if (err) {
const errDiv = document.createElement('div');
if (err.message) {
errDiv.innerText = `${err.name}: ${err.message}`;
} else {
// The data will contain a user and a token.
const { user, token } = data;
// Send the state back.
postMessage.post(HANDLE_SUCCESSFUL_LOGIN, { user, token });
errDiv.innerText = JSON.stringify(err);
}
} finally {
// Always close the window.
setTimeout(() => {
window.close();
}, 50);
document.body.appendChild(errDiv);
throw err;
}
// The data will contain a user and a token.
const { user, token } = data;
// Send the state back.
postMessage.post(HANDLE_SUCCESSFUL_LOGIN, { user, token });
// Close the window when all went well.
setTimeout(() => {
window.close();
}, 50);
});
@@ -1,6 +1,6 @@
import * as actions from '../constants/stream';
import { buildUrl } from 'coral-framework/utils/url';
import queryString from 'query-string';
import queryString from 'querystringify';
export const setActiveReplyBox = id => ({
type: actions.SET_ACTIVE_REPLY_BOX,
@@ -14,12 +14,13 @@ export const setSort = ({ sortOrder, sortBy }) => ({
});
export const viewAllComments = () => (dispatch, _, { pym }) => {
const search = queryString.stringify({
...queryString.parse(location.search),
comment_id: undefined,
});
const query = queryString.parse(location.search);
// remove the comment_id url param
delete query.comment_id;
const search = queryString.stringify(query);
const url = buildUrl({ ...location, search });
try {
@@ -5,6 +5,9 @@ const prefix = 'TALK_EMBED_STREAM';
export const ADDTL_COMMENTS_ON_LOAD_MORE = parseInt(
defaultTo(process.env.TALK_ADDTL_COMMENTS_ON_LOAD_MORE, '10')
);
export const ADDTL_REPLIES_ON_LOAD_MORE = parseInt(
defaultTo(process.env.TALK_ADDTL_REPLIES_ON_LOAD_MORE, '999999')
);
export const ASSET_COMMENTS_LOAD_DEPTH = parseInt(
defaultTo(process.env.TALK_ASSET_COMMENTS_LOAD_DEPTH, '10')
);
@@ -41,7 +41,13 @@ class EmbedContainer extends React.Component {
document: USER_BANNED_SUBSCRIPTION,
updateQuery: (
_,
{ subscriptionData: { data: { userBanned: { state } } } }
{
subscriptionData: {
data: {
userBanned: { state },
},
},
}
) => {
notify('info', t('your_account_has_been_banned'));
props.updateStatus(state.status);
@@ -51,7 +57,13 @@ class EmbedContainer extends React.Component {
document: USER_SUSPENDED_SUBSCRIPTION,
updateQuery: (
_,
{ subscriptionData: { data: { userSuspended: { state } } } }
{
subscriptionData: {
data: {
userSuspended: { state },
},
},
}
) => {
notify('info', t('your_account_has_been_suspended'));
props.updateStatus(state.status);
@@ -61,7 +73,13 @@ class EmbedContainer extends React.Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
_,
{ subscriptionData: { data: { usernameRejected: { state } } } }
{
subscriptionData: {
data: {
usernameRejected: { state },
},
},
}
) => {
notify('info', t('your_username_has_been_rejected'));
props.updateStatus(state.status);
@@ -157,6 +175,9 @@ const USER_BANNED_SUBSCRIPTION = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -178,6 +199,9 @@ const USER_SUSPENDED_SUBSCRIPTION = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -199,6 +223,9 @@ const USERNAME_REJECTED_SUBSCRIPTION = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -235,6 +262,9 @@ const EMBED_QUERY = gql`
banned {
status
}
alwaysPremod {
status
}
suspension {
until
}
@@ -324,7 +354,10 @@ const mapDispatchToProps = dispatch =>
export default compose(
withPopupAuthHandler,
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
branch(props => !props.checkedInitialLogin, renderComponent(Spinner)),
withEmbedQuery
)(EmbedContainer);
+24 -4
View File
@@ -126,7 +126,9 @@ export default {
},
mutations: {
PostComment: ({
variables: { input: { asset_id, body, parent_id, tags = [] } },
variables: {
input: { asset_id, body, parent_id, tags = [] },
},
state: { auth },
}) => ({
optimisticResponse: {
@@ -193,7 +195,13 @@ export default {
updateQueries: {
CoralEmbedStream_Embed: (
prev,
{ mutationResult: { data: { createComment: { comment } } } }
{
mutationResult: {
data: {
createComment: { comment },
},
},
}
) => {
if (
(![ADMIN, MODERATOR].includes(prev.me.role) &&
@@ -208,7 +216,13 @@ export default {
},
CoralEmbedStream_Profile: (
prev,
{ mutationResult: { data: { createComment: { comment } } } }
{
mutationResult: {
data: {
createComment: { comment },
},
},
}
) => {
return update(prev, {
me: {
@@ -224,7 +238,13 @@ export default {
updateQueries: {
CoralEmbedStream_Embed: (
prev,
{ mutationResult: { data: { editComment: { comment } } } }
{
mutationResult: {
data: {
editComment: { comment },
},
},
}
) => {
if (
!['PREMOD', 'REJECTED', 'SYSTEM_WITHHELD'].includes(comment.status)

Some files were not shown because too many files have changed in this diff Show More