From 62219273518b85f03930fc038d01b2649d1c6ba0 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 2 Oct 2015 12:47:54 -0400 Subject: Update allow/deny oauth page UI, and add ouath as reserved word. --- model/utils.go | 1 + web/react/pages/authorize.jsx | 16 ++++++------- web/sass-files/sass/partials/_oauth.scss | 31 +++++++++++++++++++++++++ web/sass-files/sass/styles.scss | 3 +++ web/templates/authorize.html | 40 ++++++++++++++++---------------- 5 files changed, 63 insertions(+), 28 deletions(-) create mode 100644 web/sass-files/sass/partials/_oauth.scss diff --git a/model/utils.go b/model/utils.go index e19cceba5..93b8c4512 100644 --- a/model/utils.go +++ b/model/utils.go @@ -163,6 +163,7 @@ var reservedName = []string{ "post", "cluster", "api", + "oauth", } var wwwStart = regexp.MustCompile(`^www`) diff --git a/web/react/pages/authorize.jsx b/web/react/pages/authorize.jsx index db42c8266..8ea8b13eb 100644 --- a/web/react/pages/authorize.jsx +++ b/web/react/pages/authorize.jsx @@ -3,16 +3,16 @@ var Authorize = require('../components/authorize.jsx'); -function setupAuthorizePage(teamName, appName, responseType, clientId, redirectUri, scope, state) { +function setupAuthorizePage(props) { React.render( , document.getElementById('authorize') ); diff --git a/web/sass-files/sass/partials/_oauth.scss b/web/sass-files/sass/partials/_oauth.scss new file mode 100644 index 000000000..35d3a95e3 --- /dev/null +++ b/web/sass-files/sass/partials/_oauth.scss @@ -0,0 +1,31 @@ +.oauth-prompt { + background: #fff; + border: 1px solid #ddd; + padding: 1em 2em 0; + margin: 50px auto; + max-width: 90%; + width: 600px; + .prompt__heading { + font-size: em(20px); + line-height: normal; + margin: 1em 0; + display: table; + width: 100%; + > div { + display: table-cell; + vertical-align: top; + } + img { + margin-right: 15px; + } + } + .prompt__allow { + margin: 1em 0; + font-size: em(24px); + } + .prompt__buttons { + text-align: right; + border-top: 1px solid #ddd; + padding: 1.5em 0; + } +} \ No newline at end of file diff --git a/web/sass-files/sass/styles.scss b/web/sass-files/sass/styles.scss index e704536a8..c614052da 100644 --- a/web/sass-files/sass/styles.scss +++ b/web/sass-files/sass/styles.scss @@ -41,3 +41,6 @@ // Responsive Css @import "partials/responsive"; + +// Standalone Css +@import "partials/oauth"; diff --git a/web/templates/authorize.html b/web/templates/authorize.html index 3392c1b1e..b0fa3e475 100644 --- a/web/templates/authorize.html +++ b/web/templates/authorize.html @@ -1,26 +1,26 @@ {{define "authorize"}} {{template "head" . }} - -
-
-
- -
-
-
- -
- -
-
- + +
+
+
+
+ +
+
An application would like to connect to your {{.Props.TeamName}} account.
+
+

The app {{.Props.AppName}} would like the ability to access Mattermost on your behalf.

+

Allow {{.Props.AppName}} access?

+
+ + +
+
+
+ {{end}} -- cgit v1.2.3-1-g7c22