Merge pull request #2208 from mattermost/client-upgrades
Updating some client deps + eslint
Этот коммит содержится в:
@@ -1,204 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "eslint:recommended",
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"jsx": true,
|
|
||||||
"blockBindings": true,
|
|
||||||
"modules": true,
|
|
||||||
"classes": true,
|
|
||||||
"arrowFunctions": true,
|
|
||||||
"defaultParams": true
|
|
||||||
},
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"plugins": [
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"node": true,
|
|
||||||
"jquery": true,
|
|
||||||
"es6": true
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"React": false,
|
|
||||||
"ReactDOM": false,
|
|
||||||
"ReactBootstrap": false,
|
|
||||||
"ReactIntl": false,
|
|
||||||
"ReactIntlLocaleData": false,
|
|
||||||
"Chart": false,
|
|
||||||
"katex": false
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"comma-dangle": [2, "never"],
|
|
||||||
"no-arrow-condition": 2,
|
|
||||||
"no-case-declarations": 2,
|
|
||||||
"no-cond-assign": [2, "except-parens"],
|
|
||||||
"no-console": 2,
|
|
||||||
"no-constant-condition": 2,
|
|
||||||
"no-debugger": 2,
|
|
||||||
"no-dupe-args": 2,
|
|
||||||
"no-dupe-keys": 2,
|
|
||||||
"no-duplicate-case": 2,
|
|
||||||
"no-empty": 2,
|
|
||||||
"no-empty-pattern": 2,
|
|
||||||
"no-ex-assign": 2,
|
|
||||||
"no-extra-semi": 2,
|
|
||||||
"no-fallthrough": 2,
|
|
||||||
"no-func-assign": 2,
|
|
||||||
"no-inner-declarations": 0,
|
|
||||||
"no-invalid-regexp": 2,
|
|
||||||
"no-irregular-whitespace": 2,
|
|
||||||
"no-unexpected-multiline": 2,
|
|
||||||
"no-unreachable": 2,
|
|
||||||
"no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2], "enforceConst": true, "detectObjects": true } ],
|
|
||||||
"valid-typeof": 2,
|
|
||||||
|
|
||||||
"block-scoped-var": 2,
|
|
||||||
"complexity": [0, 8],
|
|
||||||
"consistent-return": 2,
|
|
||||||
"curly": [2, "all"],
|
|
||||||
"dot-location": [2, "object"],
|
|
||||||
"dot-notation": 2,
|
|
||||||
"eqeqeq": [2, "smart"],
|
|
||||||
"global-require": 2,
|
|
||||||
"guard-for-in": 2,
|
|
||||||
"no-alert": 2,
|
|
||||||
"no-array-constructor": 2,
|
|
||||||
"no-caller": 2,
|
|
||||||
"no-div-regex": 2,
|
|
||||||
"no-else-return": 2,
|
|
||||||
"no-eval": 2,
|
|
||||||
"no-extend-native": 2,
|
|
||||||
"no-extra-bind": 2,
|
|
||||||
"no-floating-decimal": 2,
|
|
||||||
"no-implied-eval": 2,
|
|
||||||
"no-iterator": 2,
|
|
||||||
"no-labels": 2,
|
|
||||||
"no-lone-blocks": 2,
|
|
||||||
"no-loop-func": 2,
|
|
||||||
"no-multi-spaces": [2, { "exceptions": { "Property": false } }],
|
|
||||||
"no-multi-str": 0,
|
|
||||||
"no-native-reassign": 2,
|
|
||||||
"no-new": 2,
|
|
||||||
"no-new-func": 2,
|
|
||||||
"no-new-object": 2,
|
|
||||||
"no-new-wrappers": 2,
|
|
||||||
"no-octal-escape": 2,
|
|
||||||
"no-param-reassign": 2,
|
|
||||||
"no-process-env": 2,
|
|
||||||
"no-process-exit": 2,
|
|
||||||
"no-proto": 2,
|
|
||||||
"no-redeclare": 2,
|
|
||||||
"no-return-assign": [2, "always"],
|
|
||||||
"no-script-url": 2,
|
|
||||||
"no-self-compare": 2,
|
|
||||||
"no-sequences": 2,
|
|
||||||
"no-throw-literal": 2,
|
|
||||||
"no-undef-init": 2,
|
|
||||||
"no-unused-expressions": 2,
|
|
||||||
"no-useless-concat": 1,
|
|
||||||
"no-void": 2,
|
|
||||||
"no-warning-comments": 1,
|
|
||||||
"no-with": 2,
|
|
||||||
"radix": 2,
|
|
||||||
"vars-on-top": 0,
|
|
||||||
"wrap-iife": [2, "outside"],
|
|
||||||
"yoda": [2, "never", {"exceptRange": false, "onlyEquality": false}],
|
|
||||||
|
|
||||||
"no-undefined": 2,
|
|
||||||
"no-shadow": [2, {"hoist": "functions"}],
|
|
||||||
"no-shadow-restricted-names": 2,
|
|
||||||
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
|
|
||||||
"no-use-before-define": [2, "nofunc"],
|
|
||||||
|
|
||||||
// Style
|
|
||||||
"array-bracket-spacing": [2, "never"],
|
|
||||||
"brace-style": [2, "1tbs", { "allowSingleLine": false }],
|
|
||||||
"camelcase": [2, {"properties": "never"}],
|
|
||||||
"comma-spacing": [2, {"before": false, "after": true}],
|
|
||||||
"comma-style": [2, "last"],
|
|
||||||
"computed-property-spacing": [2, "never"],
|
|
||||||
"consistent-this": [2, "self"],
|
|
||||||
"func-names": 2,
|
|
||||||
"func-style": [2, "declaration"],
|
|
||||||
"indent": [2, 4, {"SwitchCase": 0}],
|
|
||||||
"jsx-quotes": [2, "prefer-single"],
|
|
||||||
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
|
|
||||||
"linebreak-style": 2,
|
|
||||||
"lines-around-comment": [2, { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true, "allowBlockEnd": true }],
|
|
||||||
"new-cap": 2,
|
|
||||||
"new-parens": 2,
|
|
||||||
"no-lonely-if": 2,
|
|
||||||
"no-mixed-spaces-and-tabs": 2,
|
|
||||||
"no-multiple-empty-lines": [2, {"max": 1}],
|
|
||||||
"no-negated-condition": 2,
|
|
||||||
"no-nested-ternary": 2,
|
|
||||||
"no-spaced-func": 2,
|
|
||||||
"no-ternary": 0,
|
|
||||||
"no-trailing-spaces": [2, { "skipBlankLines": false }],
|
|
||||||
"no-underscore-dangle": 2,
|
|
||||||
"no-unneeded-ternary": [2, {"defaultAssignment": false}],
|
|
||||||
"object-curly-spacing": [2, "never"],
|
|
||||||
"one-var": [2, "never"],
|
|
||||||
"operator-linebreak": [2, "after"],
|
|
||||||
"padded-blocks": [2, "never"],
|
|
||||||
"quote-props": [2, "as-needed"],
|
|
||||||
"quotes": [2, "single", "avoid-escape"],
|
|
||||||
"semi": [2, "always"],
|
|
||||||
"semi-spacing": [2, {"before": false, "after": true}],
|
|
||||||
"space-after-keywords": [2, "always"],
|
|
||||||
"space-before-blocks": [2, "always"],
|
|
||||||
"space-before-function-paren": [2, "never"],
|
|
||||||
"space-before-keywords": [2, "always"],
|
|
||||||
"space-in-parens": [2, "never"],
|
|
||||||
"space-infix-ops": 2,
|
|
||||||
"space-return-throw-case": 2,
|
|
||||||
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
|
||||||
"wrap-regex": 2,
|
|
||||||
|
|
||||||
// ES6 stuff
|
|
||||||
"arrow-parens": [2, "always"],
|
|
||||||
"arrow-body-style": 0,
|
|
||||||
"arrow-spacing": [2, { "before": true, "after": true }],
|
|
||||||
"constructor-super": 2,
|
|
||||||
"generator-star-spacing": [2, {"before": false, "after": true}],
|
|
||||||
"no-class-assign": 2,
|
|
||||||
"no-const-assign": 2,
|
|
||||||
"no-dupe-class-members": 2,
|
|
||||||
"no-this-before-super": 2,
|
|
||||||
"no-var": 0,
|
|
||||||
"object-shorthand": [1, "always"],
|
|
||||||
"prefer-arrow-callback": 1,
|
|
||||||
"prefer-const": 1,
|
|
||||||
"prefer-spread": 2,
|
|
||||||
"prefer-reflect": 1,
|
|
||||||
"prefer-template": 0,
|
|
||||||
"require-yield": 2,
|
|
||||||
|
|
||||||
// React Specific
|
|
||||||
"react/display-name": [2, { "acceptTranspilerName": true }],
|
|
||||||
"react/jsx-boolean-value": [2, "always"],
|
|
||||||
"react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }],
|
|
||||||
"react/jsx-curly-spacing": [2, "never"],
|
|
||||||
"react/jsx-indent-props": [2, 4],
|
|
||||||
"react/jsx-key": 2,
|
|
||||||
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
|
|
||||||
"react/jsx-no-bind": 1,
|
|
||||||
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
|
|
||||||
"react/jsx-no-literals": 1,
|
|
||||||
"react/jsx-no-undef": 2,
|
|
||||||
"react/jsx-uses-react": 2,
|
|
||||||
"react/jsx-uses-vars": 2,
|
|
||||||
"react/no-danger": 0,
|
|
||||||
"react/no-did-mount-set-state": 2,
|
|
||||||
"react/no-did-update-set-state": 2,
|
|
||||||
"react/no-direct-mutation-state": 2,
|
|
||||||
"react/no-multi-comp": [2, { "ignoreStateless": true }],
|
|
||||||
"react/no-set-state": 0,
|
|
||||||
"react/no-unknown-property": 2,
|
|
||||||
"react/prefer-es6-class": 2,
|
|
||||||
"react/prop-types": 2,
|
|
||||||
"react/self-closing-comp": 2,
|
|
||||||
"react/sort-comp": 0,
|
|
||||||
"react/wrap-multilines": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
226
web/react/.eslintrc.json
Обычный файл
226
web/react/.eslintrc.json
Обычный файл
@@ -0,0 +1,226 @@
|
|||||||
|
{
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 6,
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"jsx": true,
|
||||||
|
"impliedStrict": true,
|
||||||
|
"modules": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"plugins": [
|
||||||
|
"react"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"jquery": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"React": false,
|
||||||
|
"ReactDOM": false,
|
||||||
|
"ReactBootstrap": false,
|
||||||
|
"ReactIntl": false,
|
||||||
|
"ReactIntlLocaleData": false,
|
||||||
|
"Chart": false,
|
||||||
|
"katex": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"comma-dangle": [2, "never"],
|
||||||
|
"array-callback-return": 2,
|
||||||
|
"prefer-rest-params": 2,
|
||||||
|
"no-unmodified-loop-condition": 2,
|
||||||
|
"sort-imports": 0,
|
||||||
|
"no-new-symbol": 2,
|
||||||
|
"no-empty-function": 2,
|
||||||
|
"no-whitespace-before-property": 2,
|
||||||
|
"no-useless-constructor": 2,
|
||||||
|
"id-blacklist": 0,
|
||||||
|
"one-var-declaration-per-line": 0,
|
||||||
|
"no-extra-label": 2,
|
||||||
|
"template-curly-spacing": [2, "never"],
|
||||||
|
"no-self-assign": 2,
|
||||||
|
"newline-per-chained-call": 0,
|
||||||
|
"no-confusing-arrow": 2,
|
||||||
|
"no-case-declarations": 2,
|
||||||
|
"no-cond-assign": [2, "except-parens"],
|
||||||
|
"no-console": 2,
|
||||||
|
"no-constant-condition": 2,
|
||||||
|
"no-debugger": 2,
|
||||||
|
"no-dupe-args": 2,
|
||||||
|
"no-dupe-keys": 2,
|
||||||
|
"no-duplicate-case": 2,
|
||||||
|
"no-empty": 2,
|
||||||
|
"no-empty-pattern": 2,
|
||||||
|
"no-ex-assign": 2,
|
||||||
|
"no-extra-semi": 2,
|
||||||
|
"no-fallthrough": 2,
|
||||||
|
"no-func-assign": 2,
|
||||||
|
"no-inner-declarations": 0,
|
||||||
|
"no-invalid-regexp": 2,
|
||||||
|
"no-irregular-whitespace": 2,
|
||||||
|
"no-unexpected-multiline": 2,
|
||||||
|
"no-unreachable": 2,
|
||||||
|
"no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2], "enforceConst": true, "detectObjects": true } ],
|
||||||
|
"valid-typeof": 2,
|
||||||
|
|
||||||
|
"block-scoped-var": 2,
|
||||||
|
"complexity": [0, 8],
|
||||||
|
"consistent-return": 2,
|
||||||
|
"curly": [2, "all"],
|
||||||
|
"dot-location": [2, "object"],
|
||||||
|
"dot-notation": 2,
|
||||||
|
"eqeqeq": [2, "smart"],
|
||||||
|
"global-require": 2,
|
||||||
|
"guard-for-in": 2,
|
||||||
|
"no-alert": 2,
|
||||||
|
"no-array-constructor": 2,
|
||||||
|
"no-caller": 2,
|
||||||
|
"no-div-regex": 2,
|
||||||
|
"no-else-return": 2,
|
||||||
|
"no-eval": 2,
|
||||||
|
"no-extend-native": 2,
|
||||||
|
"no-extra-bind": 2,
|
||||||
|
"no-floating-decimal": 2,
|
||||||
|
"no-implied-eval": 2,
|
||||||
|
"no-implicit-globals": 0,
|
||||||
|
"no-iterator": 2,
|
||||||
|
"no-labels": 2,
|
||||||
|
"no-lone-blocks": 2,
|
||||||
|
"no-loop-func": 2,
|
||||||
|
"no-multi-spaces": [2, { "exceptions": { "Property": false } }],
|
||||||
|
"no-multi-str": 0,
|
||||||
|
"no-native-reassign": 2,
|
||||||
|
"no-new": 2,
|
||||||
|
"no-new-func": 2,
|
||||||
|
"no-new-object": 2,
|
||||||
|
"no-new-wrappers": 2,
|
||||||
|
"no-octal-escape": 2,
|
||||||
|
"no-param-reassign": 2,
|
||||||
|
"no-process-env": 2,
|
||||||
|
"no-process-exit": 2,
|
||||||
|
"no-proto": 2,
|
||||||
|
"no-redeclare": 2,
|
||||||
|
"no-return-assign": [2, "always"],
|
||||||
|
"no-script-url": 2,
|
||||||
|
"no-self-compare": 2,
|
||||||
|
"no-sequences": 2,
|
||||||
|
"no-throw-literal": 2,
|
||||||
|
"no-undef-init": 2,
|
||||||
|
"no-unused-expressions": 2,
|
||||||
|
"no-useless-concat": 1,
|
||||||
|
"no-void": 2,
|
||||||
|
"no-warning-comments": 1,
|
||||||
|
"no-with": 2,
|
||||||
|
"radix": 2,
|
||||||
|
"vars-on-top": 0,
|
||||||
|
"wrap-iife": [2, "outside"],
|
||||||
|
"yoda": [2, "never", {"exceptRange": false, "onlyEquality": false}],
|
||||||
|
|
||||||
|
"no-undefined": 2,
|
||||||
|
"no-shadow": [2, {"hoist": "functions"}],
|
||||||
|
"no-shadow-restricted-names": 2,
|
||||||
|
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
|
||||||
|
"no-use-before-define": [2, "nofunc"],
|
||||||
|
|
||||||
|
// Style
|
||||||
|
"array-bracket-spacing": [2, "never"],
|
||||||
|
"brace-style": [2, "1tbs", { "allowSingleLine": false }],
|
||||||
|
"camelcase": [2, {"properties": "never"}],
|
||||||
|
"comma-spacing": [2, {"before": false, "after": true}],
|
||||||
|
"comma-style": [2, "last"],
|
||||||
|
"computed-property-spacing": [2, "never"],
|
||||||
|
"consistent-this": [2, "self"],
|
||||||
|
"func-names": 2,
|
||||||
|
"func-style": [2, "declaration"],
|
||||||
|
"indent": [2, 4, {"SwitchCase": 0}],
|
||||||
|
"jsx-quotes": [2, "prefer-single"],
|
||||||
|
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
|
||||||
|
"linebreak-style": 2,
|
||||||
|
"lines-around-comment": [2, { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true, "allowBlockEnd": true }],
|
||||||
|
"new-cap": 2,
|
||||||
|
"new-parens": 2,
|
||||||
|
"no-lonely-if": 2,
|
||||||
|
"no-mixed-spaces-and-tabs": 2,
|
||||||
|
"no-multiple-empty-lines": [2, {"max": 1}],
|
||||||
|
"no-negated-condition": 2,
|
||||||
|
"no-nested-ternary": 2,
|
||||||
|
"no-spaced-func": 2,
|
||||||
|
"no-ternary": 0,
|
||||||
|
"no-trailing-spaces": [2, { "skipBlankLines": false }],
|
||||||
|
"no-underscore-dangle": 2,
|
||||||
|
"no-unneeded-ternary": [2, {"defaultAssignment": false}],
|
||||||
|
"object-curly-spacing": [2, "never"],
|
||||||
|
"one-var": [2, "never"],
|
||||||
|
"operator-linebreak": [2, "after"],
|
||||||
|
"padded-blocks": [2, "never"],
|
||||||
|
"quote-props": [2, "as-needed"],
|
||||||
|
"quotes": [2, "single", "avoid-escape"],
|
||||||
|
"semi": [2, "always"],
|
||||||
|
"semi-spacing": [2, {"before": false, "after": true}],
|
||||||
|
"keyword-spacing": [2, {"before": true, "after": true, "overrides": {}}],
|
||||||
|
"space-before-blocks": [2, "always"],
|
||||||
|
"space-before-function-paren": [2, "never"],
|
||||||
|
"space-in-parens": [2, "never"],
|
||||||
|
"space-infix-ops": 2,
|
||||||
|
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
||||||
|
"wrap-regex": 2,
|
||||||
|
|
||||||
|
// ES6 stuff
|
||||||
|
"arrow-parens": [2, "always"],
|
||||||
|
"arrow-body-style": 0,
|
||||||
|
"arrow-spacing": [2, { "before": true, "after": true }],
|
||||||
|
"constructor-super": 2,
|
||||||
|
"generator-star-spacing": [2, {"before": false, "after": true}],
|
||||||
|
"no-class-assign": 2,
|
||||||
|
"no-const-assign": 2,
|
||||||
|
"no-dupe-class-members": 2,
|
||||||
|
"no-this-before-super": 2,
|
||||||
|
"no-var": 0,
|
||||||
|
"object-shorthand": [1, "always"],
|
||||||
|
"prefer-arrow-callback": 1,
|
||||||
|
"prefer-const": 1,
|
||||||
|
"prefer-spread": 2,
|
||||||
|
"prefer-reflect": 1,
|
||||||
|
"prefer-template": 0,
|
||||||
|
"require-yield": 2,
|
||||||
|
|
||||||
|
// React Specific
|
||||||
|
"react/display-name": [2, { "ignoreTranspilerName": false }],
|
||||||
|
"react/no-deprecated": 2,
|
||||||
|
"react/no-is-mounted": 2,
|
||||||
|
"react/no-string-refs": 1,
|
||||||
|
"react/jsx-pascal-case": 2,
|
||||||
|
"react/jsx-indent": [1, 4],
|
||||||
|
"react/jsx-equals-spacing": [2, "never"],
|
||||||
|
"react/jsx-handler-names": 0,
|
||||||
|
"react/jsx-boolean-value": [2, "always"],
|
||||||
|
"react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }],
|
||||||
|
"react/jsx-curly-spacing": [2, "never"],
|
||||||
|
"react/jsx-indent-props": [2, 4],
|
||||||
|
"react/jsx-key": 2,
|
||||||
|
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
|
||||||
|
"react/jsx-no-bind": 1,
|
||||||
|
"react/jsx-space-before-closing": [2, "never"],
|
||||||
|
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
|
||||||
|
"react/jsx-no-literals": 1,
|
||||||
|
"react/jsx-no-undef": 2,
|
||||||
|
"react/jsx-uses-react": 2,
|
||||||
|
"react/jsx-uses-vars": 2,
|
||||||
|
"react/no-danger": 0,
|
||||||
|
"react/no-did-mount-set-state": 2,
|
||||||
|
"react/no-did-update-set-state": 2,
|
||||||
|
"react/no-direct-mutation-state": 2,
|
||||||
|
"react/no-multi-comp": [2, { "ignoreStateless": true }],
|
||||||
|
"react/no-set-state": 0,
|
||||||
|
"react/no-unknown-property": 2,
|
||||||
|
"react/prefer-es6-class": 2,
|
||||||
|
"react/prop-types": 2,
|
||||||
|
"react/self-closing-comp": 2,
|
||||||
|
"react/sort-comp": 0,
|
||||||
|
"react/wrap-multilines": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,10 +4,6 @@
|
|||||||
import {FormattedMessage} from 'mm-intl';
|
import {FormattedMessage} from 'mm-intl';
|
||||||
|
|
||||||
export default class StatisticCount extends React.Component {
|
export default class StatisticCount extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let loading = (
|
let loading = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|||||||
@@ -112,9 +112,6 @@ export default class UserList extends React.Component {
|
|||||||
this.getTeamProfiles(newProps.team.id);
|
this.getTeamProfiles(newProps.team.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
var serverError = '';
|
var serverError = '';
|
||||||
if (this.state.serverError) {
|
if (this.state.serverError) {
|
||||||
|
|||||||
@@ -207,9 +207,6 @@ const holders = defineMessages({
|
|||||||
});
|
});
|
||||||
|
|
||||||
class AuditTable extends React.Component {
|
class AuditTable extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
var accessList = [];
|
var accessList = [];
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ export default class Authorize extends React.Component {
|
|||||||
window.location.replace(data.redirect);
|
window.location.replace(data.redirect);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
() => {}
|
() => {
|
||||||
|
//Do nothing on error
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
handleDeny() {
|
handleDeny() {
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ import SidebarRight from '../components/sidebar_right.jsx';
|
|||||||
import SidebarRightMenu from '../components/sidebar_right_menu.jsx';
|
import SidebarRightMenu from '../components/sidebar_right_menu.jsx';
|
||||||
|
|
||||||
export default class ChannelView extends React.Component {
|
export default class ChannelView extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className='container-fluid'>
|
<div className='container-fluid'>
|
||||||
|
|||||||
@@ -245,7 +245,9 @@ class FileAttachment extends React.Component {
|
|||||||
this.setState({fileSize: parseInt(data.size, 10), mime: data.mime});
|
this.setState({fileSize: parseInt(data.size, 10), mime: data.mime});
|
||||||
}
|
}
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
function error() {}
|
function error() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
fileSizeString = utils.fileSizeToString(this.state.fileSize);
|
fileSizeString = utils.fileSizeToString(this.state.fileSize);
|
||||||
|
|||||||
@@ -47,3 +47,10 @@ export default function FileInfoPreview({filename, fileUrl, fileInfo, formatMess
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInfoPreview.propTypes = {
|
||||||
|
filename: React.PropTypes.string.isRequired,
|
||||||
|
fileUrl: React.PropTypes.string.isRequired,
|
||||||
|
fileInfo: React.PropTypes.object.isRequired,
|
||||||
|
formatMessage: React.PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
import MemberListItem from './member_list_item.jsx';
|
import MemberListItem from './member_list_item.jsx';
|
||||||
|
|
||||||
export default class MemberList extends React.Component {
|
export default class MemberList extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
var members = [];
|
var members = [];
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
import PostAttachment from './post_attachment.jsx';
|
import PostAttachment from './post_attachment.jsx';
|
||||||
|
|
||||||
export default class PostAttachmentList extends React.Component {
|
export default class PostAttachmentList extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let content = [];
|
let content = [];
|
||||||
this.props.attachments.forEach((attachment, i) => {
|
this.props.attachments.forEach((attachment, i) => {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export default class PostAttachmentOEmbed extends React.Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default class PostBodyAdditionalContent extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
let content = [];
|
let content = [];
|
||||||
|
|
||||||
if (Boolean(this.props.post.type)) {
|
if (this.props.post.type) {
|
||||||
const component = this.getComponent();
|
const component = this.getComponent();
|
||||||
|
|
||||||
if (component) {
|
if (component) {
|
||||||
|
|||||||
@@ -557,6 +557,11 @@ function FloatingTimestamp({isScrolling, post}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FloatingTimestamp.propTypes = {
|
||||||
|
isScrolling: React.PropTypes.bool.isRequired,
|
||||||
|
post: React.PropTypes.object
|
||||||
|
};
|
||||||
|
|
||||||
function ScrollToBottomArrows({isScrolling, atBottom, onClick}) {
|
function ScrollToBottomArrows({isScrolling, atBottom, onClick}) {
|
||||||
// only show on mobile
|
// only show on mobile
|
||||||
if ($(window).width() > 768) {
|
if ($(window).width() > 768) {
|
||||||
@@ -577,3 +582,9 @@ function ScrollToBottomArrows({isScrolling, atBottom, onClick}) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollToBottomArrows.propTypes = {
|
||||||
|
isScrolling: React.PropTypes.bool.isRequired,
|
||||||
|
atBottom: React.PropTypes.bool.isRequired,
|
||||||
|
onClick: React.PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|||||||
@@ -173,7 +173,9 @@ export default class PostsViewContainer extends React.Component {
|
|||||||
scrollPostId={this.state.scrollPost}
|
scrollPostId={this.state.scrollPost}
|
||||||
postViewScrolled={this.handlePostsViewScroll}
|
postViewScrolled={this.handlePostsViewScroll}
|
||||||
loadMorePostsTopClicked={this.loadMorePostsTop}
|
loadMorePostsTopClicked={this.loadMorePostsTop}
|
||||||
loadMorePostsBottomClicked={() => {}}
|
loadMorePostsBottomClicked={() => {
|
||||||
|
// Do Nothing
|
||||||
|
}}
|
||||||
showMoreMessagesTop={!this.state.atTop[this.state.currentChannelIndex]}
|
showMoreMessagesTop={!this.state.atTop[this.state.currentChannelIndex]}
|
||||||
showMoreMessagesBottom={false}
|
showMoreMessagesBottom={false}
|
||||||
introText={channel ? createChannelIntroMessage(channel) : null}
|
introText={channel ? createChannelIntroMessage(channel) : null}
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export default class SidebarRight extends React.Component {
|
|||||||
$('.sidebar__overlay').remove();
|
$('.sidebar__overlay').remove();
|
||||||
});
|
});
|
||||||
}, 500);*/
|
}, 500);*/
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
this.doStrangeThings();
|
this.doStrangeThings();
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ export default class TeamSignUp extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
import {FormattedMessage, FormattedHTMLMessage} from 'mm-intl';
|
import {FormattedMessage, FormattedHTMLMessage} from 'mm-intl';
|
||||||
|
|
||||||
export default class SignupTeamConfirm extends React.Component {
|
export default class SignupTeamConfirm extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className='signup-team__container'>
|
<div className='signup-team__container'>
|
||||||
|
|||||||
@@ -10,9 +10,6 @@ var Tooltip = ReactBootstrap.Tooltip;
|
|||||||
var OverlayTrigger = ReactBootstrap.OverlayTrigger;
|
var OverlayTrigger = ReactBootstrap.OverlayTrigger;
|
||||||
|
|
||||||
export default class TimeSince extends React.Component {
|
export default class TimeSince extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default class ModalToggleButton extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {children, dialogType, dialogProps, onClick, ...props} = this.props; // eslint-disable-line no-redeclare
|
const {children, dialogType, dialogProps, onClick, ...props} = this.props; // eslint-disable-line no-use-before-define
|
||||||
|
|
||||||
// allow callers to provide an onClick which will be called before the modal is shown
|
// allow callers to provide an onClick which will be called before the modal is shown
|
||||||
let clickHandler = this.show;
|
let clickHandler = this.show;
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export default class TutorialIntroScreens extends React.Component {
|
|||||||
case 2:
|
case 2:
|
||||||
return this.createScreenThree();
|
return this.createScreenThree();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
createScreenOne() {
|
createScreenOne() {
|
||||||
const circles = this.createCircles();
|
const circles = this.createCircles();
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
// Indicator for the left sidebar which indicate if there's unread posts in a channel that is not shown
|
// Indicator for the left sidebar which indicate if there's unread posts in a channel that is not shown
|
||||||
// because it is either above or below the screen
|
// because it is either above or below the screen
|
||||||
export default class UnreadChannelIndicator extends React.Component {
|
export default class UnreadChannelIndicator extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
let displayValue = 'none';
|
let displayValue = 'none';
|
||||||
if (this.props.show) {
|
if (this.props.show) {
|
||||||
|
|||||||
@@ -111,12 +111,13 @@ class UserSettingsModal extends React.Component {
|
|||||||
this.afterConfirm = () => this.handleHide();
|
this.afterConfirm = () => this.handleHide();
|
||||||
this.showConfirmModal();
|
this.showConfirmModal();
|
||||||
|
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resetTheme();
|
this.resetTheme();
|
||||||
this.deactivateTab();
|
this.deactivateTab();
|
||||||
this.props.onModalDismissed();
|
this.props.onModalDismissed();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// called after the dialog is fully hidden and faded out
|
// called after the dialog is fully hidden and faded out
|
||||||
@@ -295,7 +296,12 @@ class UserSettingsModal extends React.Component {
|
|||||||
closeModal={this.closeModal}
|
closeModal={this.closeModal}
|
||||||
collapseModal={this.collapseModal}
|
collapseModal={this.collapseModal}
|
||||||
setEnforceFocus={(enforceFocus) => this.setState({enforceFocus})}
|
setEnforceFocus={(enforceFocus) => this.setState({enforceFocus})}
|
||||||
setRequireConfirm={(requireConfirm) => this.requireConfirm = requireConfirm}
|
setRequireConfirm={
|
||||||
|
(requireConfirm) => {
|
||||||
|
this.requireConfirm = requireConfirm;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -203,7 +203,9 @@ class ViewImageModal extends React.Component {
|
|||||||
window.open(serverData.public_link);
|
window.open(serverData.public_link);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
() => {}
|
() => {
|
||||||
|
//Do Nothing on error
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,6 +385,11 @@ function LoadingImagePreview({progress, loading}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadingImagePreview.propTypes = {
|
||||||
|
progress: React.PropTypes.number,
|
||||||
|
loading: React.PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
|
function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
|
||||||
let previewUrl;
|
let previewUrl;
|
||||||
if (fileInfo.has_preview_image) {
|
if (fileInfo.has_preview_image) {
|
||||||
@@ -405,4 +412,11 @@ function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImagePreview.propTypes = {
|
||||||
|
filename: React.PropTypes.string.isRequired,
|
||||||
|
fileUrl: React.PropTypes.string.isRequired,
|
||||||
|
fileInfo: React.PropTypes.object.isRequired,
|
||||||
|
maxHeight: React.PropTypes.number.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
export default injectIntl(ViewImageModal);
|
export default injectIntl(ViewImageModal);
|
||||||
@@ -4,9 +4,6 @@
|
|||||||
import {FormattedMessage} from 'mm-intl';
|
import {FormattedMessage} from 'mm-intl';
|
||||||
|
|
||||||
export default class ViewImagePopoverBar extends React.Component {
|
export default class ViewImagePopoverBar extends React.Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
var publicLink = '';
|
var publicLink = '';
|
||||||
if (global.window.mm_config.EnablePublicLink === 'true') {
|
if (global.window.mm_config.EnablePublicLink === 'true') {
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ export default class YoutubeVideo extends React.Component {
|
|||||||
receivedYoutubeData: true,
|
receivedYoutubeData: true,
|
||||||
title: metadata.title
|
title: metadata.title
|
||||||
});
|
});
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
play() {
|
play() {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autolinker": "0.22.0",
|
"autolinker": "0.24.0",
|
||||||
"fastclick": "^1.0.6",
|
"fastclick": "1.0.6",
|
||||||
"flux": "2.1.1",
|
"flux": "2.1.1",
|
||||||
"highlight.js": "8.9.1",
|
"highlight.js": "9.1.0",
|
||||||
"keymirror": "0.1.1",
|
"keymirror": "0.1.1",
|
||||||
"marked": "mattermost/marked#cb85e5cc81bc7937dbb73c3c53d9532b1b97e3ca",
|
"marked": "mattermost/marked#cb85e5cc81bc7937dbb73c3c53d9532b1b97e3ca",
|
||||||
"mm-intl": "mattermost/mm-intl#805442fd474fa40cd586ddeda404dbbe8e60626d",
|
"mm-intl": "mattermost/mm-intl#805442fd474fa40cd586ddeda404dbbe8e60626d",
|
||||||
@@ -14,18 +14,18 @@
|
|||||||
"twemoji": "1.4.1"
|
"twemoji": "1.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "4.1.7",
|
"babel-eslint": "5.0.0",
|
||||||
"babel-plugin-transform-runtime": "6.1.4",
|
"babel-plugin-transform-runtime": "6.5.2",
|
||||||
"babel-preset-es2015": "6.1.18",
|
"babel-preset-es2015": "6.5.0",
|
||||||
"babel-preset-react": "6.1.18",
|
"babel-preset-react": "6.5.0",
|
||||||
"babel-preset-stage-0": "6.1.18",
|
"babel-preset-stage-0": "6.5.0",
|
||||||
"babelify": "7.2.0",
|
"babelify": "7.2.0",
|
||||||
"browserify": "12.0.1",
|
"browserify": "13.0.0",
|
||||||
"eslint": "1.9.0",
|
"eslint": "2.2.0",
|
||||||
"eslint-plugin-react": "3.9.0",
|
"eslint-plugin-react": "4.0.0",
|
||||||
"exorcist": "0.4.0",
|
"exorcist": "0.4.0",
|
||||||
"uglify-js": "2.6.1",
|
"uglify-js": "2.6.1",
|
||||||
"watchify": "3.6.1"
|
"watchify": "3.7.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"check": "",
|
"check": "",
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class Root extends React.Component {
|
|||||||
translations: data,
|
translations: data,
|
||||||
loaded: true
|
loaded: true
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ class Root extends React.Component {
|
|||||||
<ChannelLoader/>
|
<ChannelLoader/>
|
||||||
<ErrorBar/>
|
<ErrorBar/>
|
||||||
<ChannelView/>
|
<ChannelView/>
|
||||||
|
|
||||||
<GetPostLinkModal/>
|
<GetPostLinkModal/>
|
||||||
<GetTeamInviteLinkModal/>
|
<GetTeamInviteLinkModal/>
|
||||||
<InviteMemberModal/>
|
<InviteMemberModal/>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class ModalStoreClass extends EventEmitter {
|
|||||||
|
|
||||||
handleEventPayload(payload) {
|
handleEventPayload(payload) {
|
||||||
// toggle event handlers should accept a boolean show/hide value and can accept a map of arguments
|
// toggle event handlers should accept a boolean show/hide value and can accept a map of arguments
|
||||||
const {type, value, ...args} = payload.action; //eslint-disable-line no-redeclare
|
const {type, value, ...args} = payload.action; //eslint-disable-line no-use-before-define
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ActionTypes.TOGGLE_IMPORT_THEME_MODAL:
|
case ActionTypes.TOGGLE_IMPORT_THEME_MODAL:
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ class SuggestionStore extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleEventPayload(payload) {
|
handleEventPayload(payload) {
|
||||||
const {type, id, ...other} = payload.action; // eslint-disable-line no-redeclare
|
const {type, id, ...other} = payload.action; // eslint-disable-line no-use-before-define
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ActionTypes.SUGGESTION_PRETEXT_CHANGED:
|
case ActionTypes.SUGGESTION_PRETEXT_CHANGED:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export function createChannelIntroMessage(channel) {
|
|||||||
} else if (channel.type === 'O' || channel.type === 'P') {
|
} else if (channel.type === 'O' || channel.type === 'P') {
|
||||||
return createStandardIntroMessage(channel);
|
return createStandardIntroMessage(channel);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createDMIntroMessage(channel) {
|
export function createDMIntroMessage(channel) {
|
||||||
|
|||||||
@@ -1430,7 +1430,7 @@ export function listIncomingHooks(success, error) {
|
|||||||
|
|
||||||
export function getAllPreferences(success, error) {
|
export function getAllPreferences(success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `/api/v1/preferences/`,
|
url: '/api/v1/preferences/',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
success,
|
success,
|
||||||
|
|||||||
@@ -157,5 +157,5 @@ export function getImagePathForEmoticon(name) {
|
|||||||
if (name) {
|
if (name) {
|
||||||
return `/static/images/emoji/${name}.png`;
|
return `/static/images/emoji/${name}.png`;
|
||||||
}
|
}
|
||||||
return `/static/images/emoji`;
|
return '/static/images/emoji';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ export function getCookie(name) {
|
|||||||
if (parts.length === 2) {
|
if (parts.length === 2) {
|
||||||
return parts.pop().split(';').shift();
|
return parts.pop().split(';').shift();
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestedNotificationPermission = false;
|
var requestedNotificationPermission = false;
|
||||||
@@ -188,7 +189,10 @@ export function ding() {
|
|||||||
var audio = new Audio('/static/images/bing.mp3');
|
var audio = new Audio('/static/images/bing.mp3');
|
||||||
audio.play();
|
audio.play();
|
||||||
canDing = false;
|
canDing = false;
|
||||||
setTimeout(() => canDing = true, 3000);
|
setTimeout(() => {
|
||||||
|
canDing = true;
|
||||||
|
return;
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user