diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | config/config.json | 2 | ||||
-rw-r--r-- | doc/integrations/webhooks/Incoming.md | 2 | ||||
-rw-r--r-- | utils/config.go | 2 | ||||
-rw-r--r-- | web/react/components/channel_notifications.jsx | 4 | ||||
-rw-r--r-- | web/react/components/navbar_dropdown.jsx | 39 | ||||
-rw-r--r-- | web/react/components/post_body.jsx | 2 | ||||
-rw-r--r-- | web/react/components/user_settings/user_settings_appearance.jsx | 14 | ||||
-rw-r--r-- | web/react/package.json | 21 | ||||
-rw-r--r-- | web/react/utils/constants.jsx | 16 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 4 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_mentions.scss | 7 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_search.scss | 7 | ||||
-rw-r--r-- | web/templates/head.html | 21 |
15 files changed, 83 insertions, 77 deletions
diff --git a/.gitignore b/.gitignore index ebd5e4342..fc9076e69 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ node_modules dist npm-debug.log -bundle*.js +web/static/js/bundle*.js +web/static/js/libs*.js model/version.go model/version.go.bak @@ -43,6 +43,7 @@ travis: @$(GO) clean $(GOFLAGS) -i ./... @cd web/react/ && npm install + cd web/react/ && npm run build-libs @echo Checking for style guide compliance cd web/react && $(ESLINT) --quiet components/* dispatcher/* pages/* stores/* utils/* @@ -83,10 +84,11 @@ travis: mkdir -p web/static/js cd web/react && npm run build - cd web/sass-files && compass compile + cd web/sass-files && compass compile -e production --force - mkdir -p $(DIST_PATH)/web - cp -RL web/static $(DIST_PATH)/web + mkdir -p $(DIST_PATH)/web/static/js + cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/ + cp -RL web/static/js/jquery-dragster $(DIST_PATH)/web/static/js/ cp -RL web/templates $(DIST_PATH)/web mkdir -p $(DIST_PATH)/api @@ -97,6 +99,7 @@ travis: cp README.md $(DIST_PATH) mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js + mv $(DIST_PATH)/web/static/js/libs.min.js $(DIST_PATH)/web/static/js/libs-$(BUILD_NUMBER).min.js @sed -i'.bak' 's|react-with-addons-0.13.3.js|react-with-addons-0.13.3.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|jquery-1.11.1.js|jquery-1.11.1.min.js|g' $(DIST_PATH)/web/templates/head.html @@ -104,6 +107,7 @@ travis: @sed -i'.bak' 's|react-bootstrap-0.25.1.js|react-bootstrap-0.25.1.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|perfect-scrollbar.js|perfect-scrollbar.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|bundle.js|bundle-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|libs.min.js|libs-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html rm $(DIST_PATH)/web/templates/*.bak mv doc/README.md doc/index.md @@ -129,6 +133,7 @@ install: fi @cd web/react/ && npm install + @cd web/react/ && npm run build-libs check: install @echo Running ESLint... @@ -185,6 +190,7 @@ clean: rm -rf web/react/node_modules rm -f web/static/js/bundle*.js + rm -f web/static/js/libs*.js rm -f web/static/css/styles.css rm -rf data/* @@ -257,7 +263,7 @@ dist: install mkdir -p web/static/js cd web/react && npm run build - cd web/sass-files && compass compile + cd web/sass-files && compass compile -e production --force mkdir -p $(DIST_PATH)/web cp -RL web/static $(DIST_PATH)/web @@ -271,6 +277,7 @@ dist: install cp README.md $(DIST_PATH) mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js + mv $(DIST_PATH)/web/static/js/libs.min.js $(DIST_PATH)/web/static/js/libs-$(BUILD_NUMBER).min.js @sed -i'.bak' 's|react-with-addons-0.13.3.js|react-with-addons-0.13.3.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|jquery-1.11.1.js|jquery-1.11.1.min.js|g' $(DIST_PATH)/web/templates/head.html @@ -278,6 +285,7 @@ dist: install @sed -i'.bak' 's|react-bootstrap-0.25.1.js|react-bootstrap-0.25.1.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|perfect-scrollbar.js|perfect-scrollbar.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|bundle.js|bundle-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|libs.min.js|libs-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html rm $(DIST_PATH)/web/templates/*.bak tar -C dist -czf $(DIST_PATH).tar.gz mattermost diff --git a/config/config.json b/config/config.json index b14175372..88da33215 100644 --- a/config/config.json +++ b/config/config.json @@ -89,4 +89,4 @@ "TokenEndpoint": "", "UserApiEndpoint": "" } -} +}
\ No newline at end of file diff --git a/doc/integrations/webhooks/Incoming.md b/doc/integrations/webhooks/Incoming.md index 6e25f182e..0814eb420 100644 --- a/doc/integrations/webhooks/Incoming.md +++ b/doc/integrations/webhooks/Incoming.md @@ -56,7 +56,7 @@ payload={"channel": "off-topic", "text": "Hello, this is some text."} Combining everything above, here is an example message made using a curl command: ``` -curl -i -X POST 'payload={"channel": "off-topic", "text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx +curl -i -X POST -d 'payload={"channel": "off-topic", "text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx ``` A post with that text will be made to the Off-Topic channel. diff --git a/utils/config.go b/utils/config.go index 44c4c43af..90e44259a 100644 --- a/utils/config.go +++ b/utils/config.go @@ -179,6 +179,8 @@ func getClientProperties(c *model.Config) map[string]string { props["BuildHash"] = model.BuildHash props["SiteName"] = c.TeamSettings.SiteName + props["EnableTeamCreation"] = strconv.FormatBool(c.TeamSettings.EnableTeamCreation) + props["EnableOAuthServiceProvider"] = strconv.FormatBool(c.ServiceSettings.EnableOAuthServiceProvider) props["SegmentDeveloperKey"] = c.ServiceSettings.SegmentDeveloperKey diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx index fed8e789e..ed76b7bce 100644 --- a/web/react/components/channel_notifications.jsx +++ b/web/react/components/channel_notifications.jsx @@ -195,9 +195,7 @@ export default class ChannelNotifications extends React.Component { const extraInfo = ( <span> - {'Selecting an option other than "Default" will override the global notification settings.'} - <br/> - {'Desktop notifications are available on Firefox, Safari, and Chrome.'} + {'Selecting an option other than "Default" will override the global notification settings. Desktop notifications are available on Firefox, Safari, and Chrome.'} </span> ); diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index 78057d10b..30c4e94ae 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -135,30 +135,35 @@ export default class NavbarDropdown extends React.Component { var teams = []; - teams.push( - <li - className='divider' - key='div' - > - </li> - ); - if (this.state.teams.length > 1) { + teams.push( + <li + className='divider' + key='div' + > + </li> + ); + this.state.teams.forEach((teamName) => { if (teamName !== this.props.teamName) { teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>); } }); } - teams.push(<li key='newTeam_li'> - <a - key='newTeam_a' - target='_blank' - href={Utils.getWindowLocationOrigin() + '/signup_team'} - > - {'Create a New Team'} - </a> - </li>); + + if (global.window.config.EnableTeamCreation === 'true') { + teams.push( + <li key='newTeam_li'> + <a + key='newTeam_a' + target='_blank' + href={Utils.getWindowLocationOrigin() + '/signup_team'} + > + {'Create a New Team'} + </a> + </li> + ); + } return ( <ul className='nav navbar-nav navbar-right'> diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 6cfd243de..1d94cab47 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -215,7 +215,7 @@ export default class PostBody extends React.Component { comment = ( <p className='post-link'> <span> - {'Commented on '}{name}{apostrophe}{' message:'} + {'Commented on '}{name}{apostrophe}{' message: '} <a className='theme' onClick={this.props.handleCommentClick} diff --git a/web/react/components/user_settings/user_settings_appearance.jsx b/web/react/components/user_settings/user_settings_appearance.jsx index c4a137ed8..be6cf1f42 100644 --- a/web/react/components/user_settings/user_settings_appearance.jsx +++ b/web/react/components/user_settings/user_settings_appearance.jsx @@ -214,14 +214,14 @@ export default class UserSettingsAppearance extends React.Component { <div className='divider-dark first'/> {themeUI} <div className='divider-dark'/> + <br/> + <a + className='theme' + onClick={this.handleImportModal} + > + {'Import theme colors from Slack'} + </a> </div> - <br/> - <a - className='theme' - onClick={this.handleImportModal} - > - {'Import theme colors from Slack'} - </a> </div> ); } diff --git a/web/react/package.json b/web/react/package.json index a097b6aa8..e6a662375 100644 --- a/web/react/package.json +++ b/web/react/package.json @@ -5,7 +5,6 @@ "dependencies": { "autolinker": "0.18.1", "babel-runtime": "5.8.24", - "bootstrap-colorpicker": "2.2.0", "flux": "2.1.1", "keymirror": "0.1.1", "marked": "0.3.5", @@ -13,18 +12,18 @@ "twemoji": "1.4.1" }, "devDependencies": { - "browserify": "11.0.1", - "envify": "3.4.0", - "babelify": "6.1.3", + "browserify": "11.2.0", + "babelify": "6.3.0", "uglify-js": "2.4.24", - "watchify": "3.3.1", + "watchify": "3.4.0", "eslint": "1.6.0", "eslint-plugin-react": "3.5.1" }, "scripts": { - "start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx", - "build": "NODE_ENV=production browserify ./**/*.jsx | uglifyjs -c -m --screw-ie8 > ../static/js/bundle.min.js", - "test": "jest" + "check": "", + "build-libs": "browserify -r crypto -r autolinker -r flux -r keymirror -r marked -r object-assign -r twemoji | uglifyjs -c -m --screw-ie8 > ../static/js/libs.min.js", + "start": "watchify --fast -x crypto -x node -x autolinker -x flux -x keymirror -x marked -x object-assign -x twemoji -o ../static/js/bundle.js -v -d ./**/*.jsx", + "build": "browserify -x crypto -x autolinker -x flux -x keymirror -x marked -x object-assign -x twemoji ./**/*.jsx | uglifyjs -c -m --screw-ie8 > ../static/js/bundle.min.js" }, "browserify": { "transform": [ @@ -35,11 +34,7 @@ "runtime" ] } - ], - "envify" + ] ] - }, - "jest": { - "rootDir": "." } } diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 8fe1a5884..8fd0ab79b 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -138,7 +138,8 @@ module.exports = { linkColor: '#2389d7', buttonBg: '#2389d7', buttonColor: '#FFFFFF', - mentionHighlightBg: '#fff2bb' + mentionHighlightBg: '#fff2bb', + mentionHighlightLink: '#2f81b7' }, organization: { type: 'Organization', @@ -159,7 +160,8 @@ module.exports = { linkColor: '#2f81b7', buttonBg: '#1dacfc', buttonColor: '#FFFFFF', - mentionHighlightBg: '#fff2bb' + mentionHighlightBg: '#fff2bb', + mentionHighlightLink: '#2f81b7' }, mattermostDark: { type: 'Mattermost Dark', @@ -180,7 +182,8 @@ module.exports = { linkColor: '#A4FFEB', buttonBg: '#4CBBA4', buttonColor: '#FFFFFF', - mentionHighlightBg: '#338886' + mentionHighlightBg: '#984063', + mentionHighlightLink: '#A4FFEB' }, windows10: { type: 'Windows Dark', @@ -201,7 +204,8 @@ module.exports = { linkColor: '#0177e7', buttonBg: '#0177e7', buttonColor: '#FFFFFF', - mentionHighlightBg: '#276198' + mentionHighlightBg: '#784098', + mentionHighlightLink: '#A4FFEB' } }, THEME_ELEMENTS: [ @@ -276,6 +280,10 @@ module.exports = { { id: 'mentionHighlightBg', uiName: 'Mention Highlight BG' + }, + { + id: 'mentionHighlightLink', + uiName: 'Mention Highlight Link' } ] }; diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 8431e56bc..f79f3492f 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -531,6 +531,10 @@ export function applyTheme(theme) { if (theme.mentionHighlightBg) { changeCss('.mention-highlight, .search-highlight', 'background:' + theme.mentionHighlightBg, 1); } + + if (theme.mentionHighlightLink) { + changeCss('.mention-highlight .mention-link', 'color:' + theme.mentionHighlightLink, 1); + } } export function changeCss(className, classValue, classRepeat) { // we need invisible container to store additional css definitions diff --git a/web/sass-files/sass/partials/_mentions.scss b/web/sass-files/sass/partials/_mentions.scss index fb74eb4f5..f59cefbc6 100644 --- a/web/sass-files/sass/partials/_mentions.scss +++ b/web/sass-files/sass/partials/_mentions.scss @@ -57,11 +57,4 @@ .mention-highlight { background-color:#fff2bb; - a { - color: inherit; - text-decoration: underline; - &:hover, &:active { - color: inherit; - } - } }
\ No newline at end of file diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss index a7b1ab190..2de1b5380 100644 --- a/web/sass-files/sass/partials/_search.scss +++ b/web/sass-files/sass/partials/_search.scss @@ -106,11 +106,4 @@ .search-highlight { background-color: #FFF2BB; - a { - color: inherit; - text-decoration: underline; - &:hover, &:active { - color: inherit; - } - } } diff --git a/web/templates/head.html b/web/templates/head.html index faac4975a..8039f48a1 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -1,6 +1,6 @@ {{define "head"}} <head> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="robots" content="noindex, nofollow"> <title>{{ .Props.Title }}</title> @@ -22,24 +22,22 @@ window.config = {{ .ClientProps }}; </script> - + <!-- CSS Should always go first --> <link rel="stylesheet" href="/static/css/bootstrap-3.3.5.min.css"> - <link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css" rel="stylesheet"> - <link rel="stylesheet" href="/static/css/bootstrap-colorpicker.min.css" rel="stylesheet"> + <link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css"> + <link rel="stylesheet" href="/static/css/bootstrap-colorpicker.min.css"> + <link rel="stylesheet" href="/static/css/styles.css"> + <link rel="stylesheet" href="/static/css/google-fonts.css"> + + <link id="favicon" rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> + <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> <script src="/static/js/react-with-addons-0.13.3.js"></script> <script src="/static/js/jquery-1.11.1.js"></script> <script src="/static/js/bootstrap-3.3.5.js"></script> <script src="/static/js/bootstrap-colorpicker.min.js"></script> <script src="/static/js/react-bootstrap-0.25.1.js"></script> - - <link id="favicon" rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> - <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> - <link href='/static/css/google-fonts.css' rel='stylesheet' type='text/css'> - <link rel="stylesheet" href="/static/css/styles.css"> - <script src="/static/js/perfect-scrollbar-0.6.5.jquery.js"></script> - <script src="/static/js/jquery-dragster/jquery.dragster.js"></script> <style id="antiClickjack">body{display:none !important;}</style> @@ -60,6 +58,7 @@ } </script> + <script src="/static/js/libs.min.js"></script> <script src="/static/js/bundle.js"></script> <script type="text/javascript"> |