Merge branch 'develop' into automod-new-messaging

This commit is contained in:
Sarah Otts 2021-01-04 11:09:29 -05:00 committed by GitHub
commit b9892ff6d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 330 additions and 198 deletions

350
package-lock.json generated
View file

@ -249,34 +249,34 @@
},
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
"integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
"dev": true,
"requires": {
"@babel/types": "^7.12.10",
"@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
"integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
"integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.10.4",
"@babel/template": "^7.10.4",
"@babel/types": "^7.10.4"
"@babel/helper-get-function-arity": "^7.12.10",
"@babel/template": "^7.12.7",
"@babel/types": "^7.12.11"
}
},
"@babel/helper-get-function-arity": {
@ -289,12 +289,12 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
"integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
"integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
"dev": true,
"requires": {
"@babel/types": "^7.11.0"
"@babel/types": "^7.12.11"
}
},
"@babel/highlight": {
@ -309,9 +309,9 @@
}
},
"@babel/parser": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
"integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
"dev": true
},
"@babel/template": {
@ -326,29 +326,29 @@
}
},
"@babel/traverse": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
"integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.10",
"@babel/types": "^7.12.10",
"@babel/code-frame": "^7.12.11",
"@babel/generator": "^7.12.11",
"@babel/helper-function-name": "^7.12.11",
"@babel/helper-split-export-declaration": "^7.12.11",
"@babel/parser": "^7.12.11",
"@babel/types": "^7.12.12",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
}
},
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -516,12 +516,12 @@
},
"dependencies": {
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -550,12 +550,12 @@
},
"dependencies": {
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -592,34 +592,34 @@
},
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
"integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
"dev": true,
"requires": {
"@babel/types": "^7.12.10",
"@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
"integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
"integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.10.4",
"@babel/template": "^7.10.4",
"@babel/types": "^7.10.4"
"@babel/helper-get-function-arity": "^7.12.10",
"@babel/template": "^7.12.7",
"@babel/types": "^7.12.11"
}
},
"@babel/helper-get-function-arity": {
@ -632,12 +632,12 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
"integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
"integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
"dev": true,
"requires": {
"@babel/types": "^7.11.0"
"@babel/types": "^7.12.11"
}
},
"@babel/highlight": {
@ -652,9 +652,9 @@
}
},
"@babel/parser": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
"integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
"dev": true
},
"@babel/template": {
@ -669,29 +669,29 @@
}
},
"@babel/traverse": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
"integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.10",
"@babel/types": "^7.12.10",
"@babel/code-frame": "^7.12.11",
"@babel/generator": "^7.12.11",
"@babel/helper-function-name": "^7.12.11",
"@babel/helper-split-export-declaration": "^7.12.11",
"@babel/parser": "^7.12.11",
"@babel/types": "^7.12.12",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
}
},
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -788,12 +788,12 @@
},
"dependencies": {
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -819,46 +819,46 @@
"dev": true
},
"@babel/helper-replace-supers": {
"version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz",
"integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz",
"integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.12.1",
"@babel/helper-optimise-call-expression": "^7.10.4",
"@babel/traverse": "^7.12.5",
"@babel/types": "^7.12.5"
"@babel/helper-member-expression-to-functions": "^7.12.7",
"@babel/helper-optimise-call-expression": "^7.12.10",
"@babel/traverse": "^7.12.10",
"@babel/types": "^7.12.11"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
"integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
"dev": true,
"requires": {
"@babel/types": "^7.12.10",
"@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
"integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
"integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.10.4",
"@babel/template": "^7.10.4",
"@babel/types": "^7.10.4"
"@babel/helper-get-function-arity": "^7.12.10",
"@babel/template": "^7.12.7",
"@babel/types": "^7.12.11"
}
},
"@babel/helper-get-function-arity": {
@ -871,12 +871,12 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
"integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
"integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
"dev": true,
"requires": {
"@babel/types": "^7.11.0"
"@babel/types": "^7.12.11"
}
},
"@babel/highlight": {
@ -891,9 +891,9 @@
}
},
"@babel/parser": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
"integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
"dev": true
},
"@babel/template": {
@ -908,29 +908,29 @@
}
},
"@babel/traverse": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
"integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.10",
"@babel/types": "^7.12.10",
"@babel/code-frame": "^7.12.11",
"@babel/generator": "^7.12.11",
"@babel/helper-function-name": "^7.12.11",
"@babel/helper-split-export-declaration": "^7.12.11",
"@babel/parser": "^7.12.11",
"@babel/types": "^7.12.12",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
}
},
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -1027,12 +1027,12 @@
},
"dependencies": {
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -1061,9 +1061,9 @@
}
},
"@babel/helper-validator-identifier": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
"dev": true
},
"@babel/helpers": {
@ -1078,34 +1078,34 @@
},
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
}
},
"@babel/generator": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
"integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
"dev": true,
"requires": {
"@babel/types": "^7.12.10",
"@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-function-name": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
"integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
"integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.10.4",
"@babel/template": "^7.10.4",
"@babel/types": "^7.10.4"
"@babel/helper-get-function-arity": "^7.12.10",
"@babel/template": "^7.12.7",
"@babel/types": "^7.12.11"
}
},
"@babel/helper-get-function-arity": {
@ -1118,12 +1118,12 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
"integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
"integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
"dev": true,
"requires": {
"@babel/types": "^7.11.0"
"@babel/types": "^7.12.11"
}
},
"@babel/highlight": {
@ -1138,9 +1138,9 @@
}
},
"@babel/parser": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
"integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
"dev": true
},
"@babel/template": {
@ -1155,29 +1155,29 @@
}
},
"@babel/traverse": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
"integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.10",
"@babel/types": "^7.12.10",
"@babel/code-frame": "^7.12.11",
"@babel/generator": "^7.12.11",
"@babel/helper-function-name": "^7.12.11",
"@babel/helper-split-export-declaration": "^7.12.11",
"@babel/parser": "^7.12.11",
"@babel/types": "^7.12.12",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
}
},
"@babel/types": {
"version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"version": "7.12.12",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
"integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-validator-identifier": "^7.12.11",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
@ -4609,9 +4609,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001166",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001166.tgz",
"integrity": "sha512-nCL4LzYK7F4mL0TjEMeYavafOGnBa98vTudH5c8lW9izUjnB99InG6pmC1ElAI1p0GlyZajv4ltUdFXvOHIl1A==",
"version": "1.0.30001171",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001171.tgz",
"integrity": "sha512-5Alrh8TTYPG9IH4UkRqEBZoEToWRLvPbSQokvzSz0lii8/FOWKG4keO1HoYfPWs8IF/NH/dyNPg1cmJGvV3Zlg==",
"dev": true
},
"canvas-fit": {
@ -20527,9 +20527,9 @@
}
},
"scratch-blocks": {
"version": "0.1.0-prerelease.20201215042523",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20201215042523.tgz",
"integrity": "sha512-M7X2syd3/bPmL/XA7NZRMS+/UTTQjZ6A09D3y4lz7Wtx7YnehszSlxAYcwR4JsLwsqeizU8YoxoFYYcE15LGQQ==",
"version": "0.1.0-prerelease.20210101034043",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210101034043.tgz",
"integrity": "sha512-ruyYUiF4QvmjPSqp2mUv3PWNR1RJD2BE9gbeZJZz9bcfkiWczFQHEdCd8lWVV+TI83BUVpxiRwjAaNarPpiJhQ==",
"dev": true,
"requires": {
"exports-loader": "0.6.3",
@ -20537,9 +20537,9 @@
}
},
"scratch-gui": {
"version": "0.1.0-prerelease.20201215053836",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20201215053836.tgz",
"integrity": "sha512-UH4n45ROLI648s8TsbfeCfanJPkrtZb4QGzCWV6na2RlqWUBNPain2zZNnuSm1ti4Y/sxO3F5i3lTVVeNDJI/Q==",
"version": "0.1.0-prerelease.20210101040933",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210101040933.tgz",
"integrity": "sha512-xKdyId0x8BaRz2uD0vZsy2NcO3w8l2HFQjwUUsK2TsUBnaodzqHeJ2n9wrE64GhRIWrcWiXybtm4kVduBT8bGQ==",
"dev": true,
"requires": {
"arraybuffer-loader": "^1.0.6",
@ -20590,8 +20590,8 @@
"redux": "3.7.2",
"redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20200528195344",
"scratch-blocks": "0.1.0-prerelease.20201215042523",
"scratch-l10n": "3.10.20201215031549",
"scratch-blocks": "0.1.0-prerelease.20210101034043",
"scratch-l10n": "3.10.20210101031524",
"scratch-paint": "0.2.0-prerelease.20201020103914",
"scratch-render": "0.1.0-prerelease.20201113223804",
"scratch-storage": "1.3.3",
@ -20775,9 +20775,9 @@
"dev": true
},
"electron-to-chromium": {
"version": "1.3.626",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.626.tgz",
"integrity": "sha512-7CanEvJx74EnvjHu1X8gf93KieyxvFLnqOXAH/ddjWD4RrUZYqdg3pykrQ/7t6SLI7DTsp4tfQXEfzeK5t6oAw==",
"version": "1.3.633",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.633.tgz",
"integrity": "sha512-bsVCsONiVX1abkWdH7KtpuDAhsQ3N3bjPYhROSAXE78roJKet0Y5wznA14JE9pzbwSZmSMAW6KiKYf1RvbTJkA==",
"dev": true
},
"file-loader": {
@ -21080,9 +21080,9 @@
}
},
"scratch-l10n": {
"version": "3.10.20201215031549",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.10.20201215031549.tgz",
"integrity": "sha512-YE1sq/NGiONV0hOZSyAsVi62qd4MhCiVEyCvv6FuaE5xiSOXM/zsFgSgB3PfrPbjGOu90cPgl9DPw3cx4LYP5A==",
"version": "3.10.20210101031524",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.10.20210101031524.tgz",
"integrity": "sha512-35xT0fNTjyjCvJAlsDWHW41Fd6YvuCDcKhVkehsPfhEXPpx9oTuKMeBhtXhoJYBn1A96Gj7E+PkSGEjY4U8ukA==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",

View file

@ -129,7 +129,7 @@
"redux-mock-store": "^1.2.3",
"redux-thunk": "2.0.1",
"sass-loader": "6.0.6",
"scratch-gui": "0.1.0-prerelease.20201215053836",
"scratch-gui": "0.1.0-prerelease.20210101040933",
"scratch-l10n": "latest",
"selenium-webdriver": "3.6.0",
"slick-carousel": "1.6.0",

View file

@ -20,6 +20,10 @@ class MuteModal extends React.Component {
'handleNext',
'handlePrevious'
]);
this.numSteps = 2;
if (this.props.showWarning) {
this.numSteps++;
}
this.state = {
step: 0
};
@ -82,6 +86,23 @@ class MuteModal extends React.Component {
/>
</p>
</MuteStep>
{this.props.showWarning ? (
<MuteStep
bottomImg="/svgs/commenting/warning.svg"
bottomImgClass="bottom-img"
header={this.props.intl.formatMessage({id: 'comments.muted.warningBlocked'})}
>
<p>
<FormattedMessage
id="comments.muted.warningCareful"
values={{CommunityGuidelinesLink: (
<a href="/community_guidelines">
<FormattedMessage id="report.CommunityGuidelinesLinkText" />
</a>
)}}
/>
</p>
</MuteStep>) : null}
</Progression>
<FlexRow className={classNames('nav-divider')} />
<FlexRow className={classNames('mute-nav')}>
@ -97,7 +118,7 @@ class MuteModal extends React.Component {
</div>
</Button>
) : null }
{this.state.step >= 1 ? (
{this.state.step >= this.numSteps - 1 ? (
<Button
className={classNames('close-button')}
onClick={this.props.onRequestClose}
@ -128,9 +149,10 @@ MuteModal.propTypes = {
muteModalMessages: PropTypes.shape({
commentType: PropTypes.string,
muteStepHeader: PropTypes.string,
muteStepContent: PropTypes.string
muteStepContent: PropTypes.array
}),
onRequestClose: PropTypes.func,
showWarning: PropTypes.bool,
timeMuted: PropTypes.string
};

View file

@ -109,17 +109,20 @@ class UsernameStep extends React.Component {
}
api({
host: '',
uri: `/accounts/check_username/${username}/`
uri: `/accounts/checkusername/${username}/`
}, (err, body, res) => {
if (err || res.statusCode !== 200) {
err = err || this.props.intl.formatMessage({id: 'general.error'});
this.form.formsy.updateInputsWithError({all: err});
return callback(false);
}
body = body[0];
// get the message in a way that will work for both scratchr2 and api
// versions of the checkusername endpoint
let msg = '';
if (body && body.msg) msg = body.msg;
else if (body && body[0]) msg = body[0].msg;
switch (body.msg) {
switch (msg) {
case 'valid username':
this.setState({
validUsername: 'pass'

View file

@ -354,6 +354,9 @@
"comments.muted.moreInfoGuidelines": "If you would like more information, you can read the {CommunityGuidelinesLink}.",
"comments.muted.moreInfoModal": "For more information, {clickHereLink}.",
"comments.muted.clickHereLinkText": "click here",
"comments.muted.warningBlocked": "If you continue to post comments like this, it will cause you to be blocked from using Scratch",
"comments.muted.warningCareful": "We don't want that to happen, so please be careful and make sure you have read and understand the {CommunityGuidelinesLink} before you try to post again!",
"social.embedLabel": "Embed",
"social.copyEmbedLinkText": "Copy embed",

View file

@ -25,6 +25,8 @@ module.exports.validateUsernameRemotely = username => (
if (err || res.statusCode !== 200) {
resolve({requestSucceeded: false, valid: false, errMsgId: 'general.error'});
}
// get the message in a way that will work for both scratchr2 and api
// versions of the checkusername endpoint
let msg = '';
if (body && body.msg) msg = body.msg;
else if (body && body[0]) msg = body[0].msg;

View file

@ -54,6 +54,11 @@
"userId": 2755634,
"name": "Christan"
},
{
"userName": "floralsunset",
"userId": 64635632,
"name": "Cindy"
},
{
"userName": "codubee",
"userId": 10866958,

View file

@ -51,6 +51,7 @@ class ComposeComment extends React.Component {
muteExpiresAtMs: this.props.muteStatus.muteExpiresAt ?
this.props.muteStatus.muteExpiresAt * 1000 : 0, // convert to ms
muteType: this.props.muteStatus.currentMessageType
showWarning: this.props.muteStatus.showWarning ? this.props.muteStatus.showWarning : false
};
}
handleInput (event) {
@ -82,12 +83,14 @@ class ComposeComment extends React.Component {
let muteOpen = false;
let muteExpiresAtMs = 0;
let rejectedStatus = ComposeStatus.REJECTED;
let showWarning = false;
if (body.status && body.status.mute_status) {
muteExpiresAtMs = body.status.mute_status.muteExpiresAt * 1000; // convert to ms
rejectedStatus = ComposeStatus.REJECTED_MUTE;
if (this.shouldShowMuteModal(body.status.mute_status.offenses)) {
if (this.shouldShowMuteModal(body.status.mute_status)) {
muteOpen = true;
}
showWarning = body.status.mute_status.showWarning;
}
// Note: does not reset the message state
this.setState({
@ -96,7 +99,8 @@ class ComposeComment extends React.Component {
appealId: body.appealId,
muteOpen: muteOpen,
muteExpiresAtMs: muteExpiresAtMs,
muteType: body.status.mute_status.currentMessageType
muteType: body.status.mute_status.currentMessageType,
showWarning: showWarning
});
return;
}
@ -135,8 +139,9 @@ class ComposeComment extends React.Component {
muteOpen: true
});
}
shouldShowMuteModal (offensesList) {
// We should show the mute modal whne the user is newly muted or hasn't seen it for a while.
shouldShowMuteModal (muteStatus) {
// We should show the mute modal if the user is in danger of being blocked or
// when the user is newly muted or hasn't seen it for a while.
// We don't want to show it more than about once a week.
// A newly muted user has only 1 offense and it happened in the last coulpe of minutes.
// If a user has more than 1 offense, it means that they have have been muted in the
@ -144,10 +149,17 @@ class ComposeComment extends React.Component {
// Assumption: The offenses list is ordered by time with the most recent at the end.
// This check is here just in case we somehow get bad data back from a backend.
if (!offensesList) {
if (!muteStatus || !muteStatus.offenses) {
return false;
}
// If the backend tells us to show a warning about getting blocked, we should show the modal
// regardless of what the offenses list looks like.
if (muteStatus.showWarning) {
return true;
}
const offensesList = muteStatus.offenses;
const numOffenses = offensesList.length;
// This isn't intended to be called if there are no offenses, but
// say no just in case.
@ -312,6 +324,7 @@ class ComposeComment extends React.Component {
className="mod-mute"
muteModalMessages={this.getMuteMessageInfo()}
shouldCloseOnOverlayClick={false}
showWarning={this.state.showWarning}
timeMuted={formatTime.formatRelativeTime(this.state.muteExpiresAtMs, window._locale)}
onRequestClose={this.handleMuteClose}
/>
@ -326,7 +339,8 @@ ComposeComment.propTypes = {
muteStatus: PropTypes.shape({
offenses: PropTypes.array,
muteExpiresAt: PropTypes.number,
currentMessageType: PropTypes.string
currentMessageType: PropTypes.string,
showWarning: PropTypes.bool
}),
onAddComment: PropTypes.func,
onCancel: PropTypes.func,
@ -343,7 +357,7 @@ ComposeComment.propTypes = {
const mapStateToProps = state => ({
muteStatus: state.session.session.permissions.mute_status ?
state.session.session.permissions.mute_status :
{muteExpiresAt: 0, offenses: []},
{muteExpiresAt: 0, offenses: [], showWarning: false},
user: state.session.session.user
});

View file

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 180"><defs><style>.cls-1,.cls-2{fill:#ff8c1a;}.cls-1{opacity:0.25;}.cls-3{fill:#fff;}.cls-4{fill:#6e7b8a;opacity:0.5;}</style></defs><path class="cls-1" d="M2.88,80.43c6.16,83.18,50.8,100.79,154.47,99C294.6,177,370.23,188.26,376.72,95.74c5.46-77.83-39.79-93.93-174-95.31C73.35-.9-2.91,2.13,2.88,80.43Z"/><path class="cls-2" d="M214.05,91.28l-118.4-.2H82.85a1.91,1.91,0,0,0-1.31,3.24l7.83,8a1.92,1.92,0,0,1,.54,1.34V122a8.93,8.93,0,0,0,8.81,9H212.2a8.92,8.92,0,0,0,8.8-9V98.42A7,7,0,0,0,214.05,91.28Z"/><path class="cls-3" d="M128.11,50.82l159-.28h17.18A2.69,2.69,0,0,1,306,55.08L295.53,66.33a2.73,2.73,0,0,0-.73,1.88V93.89c0,7-5.29,12.65-11.82,12.65H130.59c-6.53,0-11.82-5.66-11.82-12.65V60.82C118.77,55.3,123,50.82,128.11,50.82Z"/><path class="cls-4" d="M139.57,65.56H264.19a4.32,4.32,0,0,1,4.32,4.32v.69a4.32,4.32,0,0,1-4.32,4.32H138.88a4.32,4.32,0,0,1-4.32-4.32v0A5,5,0,0,1,139.57,65.56Z"/><path class="cls-4" d="M139.57,81.89h82.08a3.61,3.61,0,0,1,3.61,3.61v2.12a3.61,3.61,0,0,1-3.61,3.61H138.17a3.61,3.61,0,0,1-3.61-3.61V86.9a5,5,0,0,1,5-5Z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -104,7 +104,8 @@ describe('Compose Comment test', () => {
permissions: {
mute_status: {
muteExpiresAt: 5,
offenses: []
offenses: [],
showWarning: true
}
}
}
@ -114,6 +115,7 @@ describe('Compose Comment test', () => {
const commentInstance = component.instance();
// Check conversion to ms from seconds is done at init time.
expect(commentInstance.state.muteExpiresAtMs).toEqual(5 * 1000);
expect(commentInstance.state.showWarning).toBe(true);
// Compose box should be hidden if muted unless they got muted due to a comment they just posted.
expect(component.find('FlexRow.compose-comment').exists()).toEqual(false);
expect(component.find('MuteModal').exists()).toEqual(false);
@ -191,22 +193,61 @@ describe('Compose Comment test', () => {
commentInstance.setState({muteOpen: true});
component.update();
expect(component.find('MuteModal').exists()).toEqual(true);
expect(component.find('MuteModal').props().showWarning).toBe(false);
global.Date.now = realDateNow;
});
test('shouldShowMuteModal is false when list is undefined ', () => {
test('Mute Modal gets showWarning props from state', () => {
const store = mockStore({
session: {
session: {
user: {},
permissions: {
mute_status: {}
}
}
}
});
const component = mountWithIntl(
<ComposeComment
{...defaultProps()}
/>
, {context: {store}}
);
// set state on the ComposeComment component, not the wrapper
const commentInstance = component.find('ComposeComment').instance();
commentInstance.setState({muteOpen: true});
component.update();
expect(component.find('MuteModal').exists()).toEqual(true);
expect(component.find('MuteModal').props().showWarning).toBe(false);
commentInstance.setState({
muteOpen: true,
showWarning: true
});
component.update();
expect(component.find('MuteModal').props().showWarning).toBe(true);
});
test('shouldShowMuteModal is false when muteStatus is undefined ', () => {
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal()).toBe(false);
});
test('shouldShowMuteModal is false when list empty ', () => {
const offenses = [];
test('shouldShowMuteModal is false when list is undefined ', () => {
const muteStatus = {};
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal(offenses)).toBe(false);
expect(commentInstance.shouldShowMuteModal(muteStatus)).toBe(false);
});
test('shouldShowMuteModal is false when list empty ', () => {
const muteStatus = {
offenses: []
};
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal(muteStatus)).toBe(false);
});
test('shouldShowMuteModal is true when only 1 recent offesnse ', () => {
const offenses = [];
const realDateNow = Date.now.bind(global.Date);
global.Date.now = () => 0;
// Since Date.now mocked to 0 above, we just need a small number to make
@ -215,9 +256,11 @@ describe('Compose Comment test', () => {
expiresAt: '1000',
createdAt: '-60' // ~1 ago min given shouldShowMuteModal's conversions,
};
offenses.push(offense);
const muteStatus = {
offenses: [offense]
};
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal(offenses)).toBe(true);
expect(commentInstance.shouldShowMuteModal(muteStatus)).toBe(true);
global.Date.now = realDateNow;
});
@ -234,8 +277,33 @@ describe('Compose Comment test', () => {
offenses.push(offense);
offense.createdAt = '-180'; // 3 minutes ago;
offenses.push(offense);
const muteStatus = {
offenses: offenses
};
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal(offenses)).toBe(false);
expect(commentInstance.shouldShowMuteModal(muteStatus)).toBe(false);
global.Date.now = realDateNow;
});
test('shouldShowMuteModal is true when showWarning is true even with multiple offenses', () => {
const offenses = [];
const realDateNow = Date.now.bind(global.Date);
global.Date.now = () => 0;
// Since Date.now mocked to 0 above, we just need a small number to make
// it look like it was created more than 2 minutes ago.
let offense = {
expiresAt: '1000',
createdAt: '-119' // just shy of two min ago
};
offenses.push(offense);
offense.createdAt = '-180'; // 3 minutes ago;
offenses.push(offense);
const muteStatus = {
offenses: offenses,
showWarning: true
};
const commentInstance = getComposeCommentWrapper({}).instance();
expect(commentInstance.shouldShowMuteModal(muteStatus)).toBe(true);
global.Date.now = realDateNow;
});

View file

@ -33,6 +33,20 @@ describe('MuteModalTest', () => {
expect(component.find('button.back-button').exists()).toEqual(false);
});
test('Mute Modal shows extra showWarning step', () => {
const component = mountWithIntl(
<MuteModal
showWarning
muteModalMessages={defaultMessages}
/>
);
component.find('MuteModal').instance()
.setState({step: 2});
component.update();
expect(component.find('MuteStep').prop('bottomImg')).toEqual('/svgs/commenting/warning.svg');
expect(component.find('MuteStep').prop('totalSteps')).toEqual(3);
});
test('Mute Modal shows back & close button on last step', () => {
const component = mountWithIntl(
<MuteModal muteModalMessages={defaultMessages} />