From 1ca84a8f8a2af05d39abbd888823faf62c7840b4 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 24 Sep 2015 21:05:21 +0500 Subject: plt-298 - Improving UI for webhooks --- config/config.json | 2 +- .../user_settings/manage_incoming_hooks.jsx | 65 +++++++++++----------- web/sass-files/sass/partials/_base.scss | 4 ++ web/sass-files/sass/partials/_modal.scss | 16 ++++-- web/sass-files/sass/partials/_settings.scss | 15 +++++ 5 files changed, 62 insertions(+), 40 deletions(-) diff --git a/config/config.json b/config/config.json index aa92ccf4e..4874f8b09 100644 --- a/config/config.json +++ b/config/config.json @@ -5,7 +5,7 @@ "SegmentDeveloperKey": "", "GoogleDeveloperKey": "", "EnableOAuthServiceProvider": false, - "EnableIncomingWebhooks": false, + "EnableIncomingWebhooks": true, "EnableTesting": false }, "TeamSettings": { diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx index df089a403..12c041c7f 100644 --- a/web/react/components/user_settings/manage_incoming_hooks.jsx +++ b/web/react/components/user_settings/manage_incoming_hooks.jsx @@ -107,23 +107,23 @@ export default class ManageIncomingHooks extends React.Component { this.state.hooks.forEach((hook) => { const c = ChannelStore.get(hook.channel_id); hooks.push( -
-
- - {'URL: '}{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id} - -
- +
+
+
+ {'URL: '}{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id} +
+
{'Channel: '}{c.name} - -
- - {'Remove'} - +
+
+ + {'Remove'} + +
); }); @@ -134,41 +134,38 @@ export default class ManageIncomingHooks extends React.Component { } else if (hooks.length > 0) { displayHooks = hooks; } else { - displayHooks = ; + displayHooks = ; } const existingHooks = ( -
- -
+
+ {displayHooks}
); return ( -
+
-
-
+
-
{serverError} - - {'Add'} - +
{existingHooks}
diff --git a/web/sass-files/sass/partials/_base.scss b/web/sass-files/sass/partials/_base.scss index 50946ed83..87d9b8200 100644 --- a/web/sass-files/sass/partials/_base.scss +++ b/web/sass-files/sass/partials/_base.scss @@ -44,6 +44,10 @@ body { } } +.word-break--all { + word-break: break-all; +} + a { word-break: break-word; color: $primary-color; diff --git a/web/sass-files/sass/partials/_modal.scss b/web/sass-files/sass/partials/_modal.scss index b0d5a0f7d..e4e8b20b6 100644 --- a/web/sass-files/sass/partials/_modal.scss +++ b/web/sass-files/sass/partials/_modal.scss @@ -11,6 +11,9 @@ } a, a:focus, a:hover { color: #2389D7; + &.text-danger { + color: #a94442; + } } .custom-textarea { color: inherit; @@ -20,11 +23,14 @@ box-shadow: none; } } - .btn.btn-primary { - background: #4285f4; - &:hover, &:focus, &:active { - background: $primary-color--hover; - color: #fff; + .btn { + font-size: 13px; + &.btn-primary { + background: #4285f4; + &:hover, &:focus, &:active { + background: $primary-color--hover; + color: #fff; + } } } .info__label { diff --git a/web/sass-files/sass/partials/_settings.scss b/web/sass-files/sass/partials/_settings.scss index 8dcd8f35c..3aab05d70 100644 --- a/web/sass-files/sass/partials/_settings.scss +++ b/web/sass-files/sass/partials/_settings.scss @@ -32,6 +32,7 @@ } .settings-table { display: table; + table-layout: fixed; width: 100%; > div { display: table-cell; @@ -125,6 +126,10 @@ } } + .font--small { + font-size: 13px; + } + .section-describe { color:grey; } @@ -155,8 +160,18 @@ .has-error { color: #a94442; } + .padding-top { + padding-top: 7px; + &.x2 { + padding-top: 14px; + } + } .control-label { color: #555; + font-weight: 600; + &.text-left { + text-align: left; + } } hr { border-color: #ccc; -- cgit v1.2.3-1-g7c22 From e6697a447ea95c47abcced13144d8d062afce0bb Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 24 Sep 2015 12:12:12 -0400 Subject: Hiding export from UI --- web/react/components/team_settings_modal.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx index 0513c811f..8ffbdc6d0 100644 --- a/web/react/components/team_settings_modal.jsx +++ b/web/react/components/team_settings_modal.jsx @@ -36,7 +36,9 @@ export default class TeamSettingsModal extends React.Component { let tabs = []; tabs.push({name: 'general', uiName: 'General', icon: 'glyphicon glyphicon-cog'}); tabs.push({name: 'import', uiName: 'Import', icon: 'glyphicon glyphicon-upload'}); - tabs.push({name: 'export', uiName: 'Export', icon: 'glyphicon glyphicon-download'}); + + // To enable export uncomment this line + //tabs.push({name: 'export', uiName: 'Export', icon: 'glyphicon glyphicon-download'}); tabs.push({name: 'feature', uiName: 'Advanced', icon: 'glyphicon glyphicon-wrench'}); return ( -- cgit v1.2.3-1-g7c22 From 7efacb09bfb9dbd6b4c8dbca59c76e60c88d0e53 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 24 Sep 2015 12:39:36 -0400 Subject: Fixing arrow keys in preview image modal --- web/react/components/view_image.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx index 8db63e196..e645878c1 100644 --- a/web/react/components/view_image.jsx +++ b/web/react/components/view_image.jsx @@ -40,7 +40,9 @@ export default class ViewImageModal extends React.Component { }; } handleNext(e) { - e.stopPropagation(); + if (e) { + e.stopPropagation(); + } var id = this.state.imgId + 1; if (id > this.props.filenames.length - 1) { id = 0; @@ -49,7 +51,9 @@ export default class ViewImageModal extends React.Component { this.loadImage(id); } handlePrev(e) { - e.stopPropagation(); + if (e) { + e.stopPropagation(); + } var id = this.state.imgId - 1; if (id < 0) { id = this.props.filenames.length - 1; -- cgit v1.2.3-1-g7c22 From 717fab65e0bde0b3395fb6c59cc35c3d1014ef1d Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 24 Sep 2015 09:44:36 -0700 Subject: Partial fix for PLT-203 --- web/web.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/web/web.go b/web/web.go index 3b36f3d56..1e435d47f 100644 --- a/web/web.go +++ b/web/web.go @@ -145,14 +145,8 @@ func root(c *api.Context, w http.ResponseWriter, r *http.Request) { return } - if len(c.Session.UserId) == 0 { - page := NewHtmlTemplatePage("signup_team", "Signup") - page.Render(c, w) - } else { - page := NewHtmlTemplatePage("home", "Home") - page.Props["TeamURL"] = c.GetTeamURL() - page.Render(c, w) - } + page := NewHtmlTemplatePage("signup_team", "Signup") + page.Render(c, w) } func signup(c *api.Context, w http.ResponseWriter, r *http.Request) { @@ -175,8 +169,7 @@ func login(c *api.Context, w http.ResponseWriter, r *http.Request) { var team *model.Team if tResult := <-api.Srv.Store.Team().GetByName(teamName); tResult.Err != nil { l4g.Error("Couldn't find team name=%v, teamURL=%v, err=%v", teamName, c.GetTeamURL(), tResult.Err.Message) - // This should probably do somthing nicer - http.Redirect(w, r, "http://"+r.Host, http.StatusTemporaryRedirect) + http.Redirect(w, r, api.GetProtocol(r)+"://"+r.Host, http.StatusTemporaryRedirect) return } else { team = tResult.Data.(*model.Team) -- cgit v1.2.3-1-g7c22 From 0e08d7d46059585916923219858fdc14f47d370e Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 24 Sep 2015 21:51:03 +0500 Subject: Removing config file EnableIncomingWebhooks to false --- config/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.json b/config/config.json index 4874f8b09..aa92ccf4e 100644 --- a/config/config.json +++ b/config/config.json @@ -5,7 +5,7 @@ "SegmentDeveloperKey": "", "GoogleDeveloperKey": "", "EnableOAuthServiceProvider": false, - "EnableIncomingWebhooks": true, + "EnableIncomingWebhooks": false, "EnableTesting": false }, "TeamSettings": { -- cgit v1.2.3-1-g7c22 From fe55c77a41b8a82a68f19f2acb77198eec4f8ca4 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 24 Sep 2015 13:54:48 -0400 Subject: Removed smilies that start with a semicolon --- web/react/utils/emoticons.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx index 7210201ff..a7c837199 100644 --- a/web/react/utils/emoticons.jsx +++ b/web/react/utils/emoticons.jsx @@ -5,15 +5,14 @@ const emoticonPatterns = { smile: /:-?\)/g, // :) open_mouth: /:o/gi, // :o scream: /:-o/gi, // :-o - smirk: /[:;]-?]/g, // :] - grinning: /[:;]-?d/gi, // :D + smirk: /:-?]/g, // :] + grinning: /:-?d/gi, // :D stuck_out_tongue_closed_eyes: /x-d/gi, // x-d - stuck_out_tongue_winking_eye: /[:;]-?p/gi, // ;p + stuck_out_tongue_winking_eye: /:-?p/gi, // :p rage: /:-?[\[@]/g, // :@ frowning: /:-?\(/g, // :( sob: /:['’]-?\(|:'\(/g, // :`( kissing_heart: /:-?\*/g, // :* - wink: /;-?\)/g, // ;) pensive: /:-?\//g, // :/ confounded: /:-?s/gi, // :s flushed: /:-?\|/g, // :| -- cgit v1.2.3-1-g7c22 From e58f15a28698122525b274bac01252e53fb1170c Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 24 Sep 2015 11:06:00 -0700 Subject: Disabling OAuth provider for 0.8 --- .../components/admin_console/service_settings.jsx | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/web/react/components/admin_console/service_settings.jsx b/web/react/components/admin_console/service_settings.jsx index 1bb1f053b..4b09fefc2 100644 --- a/web/react/components/admin_console/service_settings.jsx +++ b/web/react/components/admin_console/service_settings.jsx @@ -35,7 +35,7 @@ export default class ServiceSettings extends React.Component { config.ServiceSettings.SegmentDeveloperKey = React.findDOMNode(this.refs.SegmentDeveloperKey).value.trim(); config.ServiceSettings.GoogleDeveloperKey = React.findDOMNode(this.refs.GoogleDeveloperKey).value.trim(); - config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked; + //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked; config.ServiceSettings.EnableIncomingWebhooks = React.findDOMNode(this.refs.EnableIncomingWebhooks).checked; config.ServiceSettings.EnableTesting = React.findDOMNode(this.refs.EnableTesting).checked; @@ -170,45 +170,12 @@ export default class ServiceSettings extends React.Component {
-
- -
- - -

{'When enabled Mattermost will act as an Oauth2 Provider. Changing this will require a server restart before taking effect.'}

-
-
-
-
- -
- -

{'Default theme color for team sites.'}

-
-
-