Просмотр исходного кода

Merge branch 'master' into imprv/refactor-i18n

itizawa 6 лет назад
Родитель
Сommit
35ce4fc325

+ 1 - 0
CHANGES.md

@@ -4,6 +4,7 @@
 
 
 * Feature: Alert for stale page
 * Feature: Alert for stale page
 * Improvement: Reactify admin pages (App)
 * Improvement: Reactify admin pages (App)
+* Improvement: Accessibility for editor icons of dark themes
 
 
 ## v3.6.3
 ## v3.6.3
 
 

+ 2 - 1
src/client/styles/scss/_handsontable.scss

@@ -42,7 +42,8 @@
   }
   }
 
 
   .data-import-form {
   .data-import-form {
-    background-color: #f8f8f8;
+    color: $headingtext;
+    background-color: $navbar-default-bg;
 
 
     .btn + .btn {
     .btn + .btn {
       margin-left: 5px;
       margin-left: 5px;

+ 8 - 2
src/server/models/config.js

@@ -84,8 +84,14 @@ module.exports = function(crowi) {
       'mail:smtpUser'     : undefined,
       'mail:smtpUser'     : undefined,
       'mail:smtpPassword' : undefined,
       'mail:smtpPassword' : undefined,
 
 
-      'google:clientId'     : undefined,
-      'google:clientSecret' : undefined,
+      'security:passport-google:clientId'     : undefined,
+      'security:passport-google:clientSecret' : undefined,
+
+      'security:passport-github:clientId': undefined,
+      'security:passport-github:clientSecret': undefined,
+
+      'security:passport-twitter:clientId': undefined,
+      'security:passport-twitter:clientSecret': undefined,
 
 
       'plugin:isEnabledPlugins' : true,
       'plugin:isEnabledPlugins' : true,
 
 

+ 1 - 1
src/server/routes/apiv3/customize-setting.js

@@ -116,7 +116,7 @@ module.exports = (crowi) => {
     ],
     ],
     highlight: [
     highlight: [
       body('highlightJsStyle').isString().isIn([
       body('highlightJsStyle').isString().isIn([
-        'github', 'github-gist', 'atom-one-light', 'xcode', 'vs', 'atom-one-dark', 'hybrid', 'monokai', 'tororrow-night', 'vs2015',
+        'github', 'github-gist', 'atom-one-light', 'xcode', 'vs', 'atom-one-dark', 'hybrid', 'monokai', 'tomorrow-night', 'vs2015',
       ]),
       ]),
       body('highlightJsStyleBorder').isBoolean(),
       body('highlightJsStyleBorder').isBoolean(),
     ],
     ],

+ 10 - 0
src/server/routes/login-passport.js

@@ -258,6 +258,16 @@ module.exports = function(crowi, app) {
       username: response.displayName,
       username: response.displayName,
       name: `${response.name.givenName} ${response.name.familyName}`,
       name: `${response.name.givenName} ${response.name.familyName}`,
     };
     };
+
+    // Emails are not empty if it exists
+    // See https://github.com/passport/express-4.x-facebook-example/blob/dfce5495d0313174a1b5039bab2c2dcda7e0eb61/views/profile.ejs
+    // Both Facebook and Google use OAuth 2.0, the code is similar
+    // See https://github.com/jaredhanson/passport-google-oauth2/blob/723e8f3e8e711275f89e0163e2c77cfebae33f25/README.md#examples
+    if (response.emails != null) {
+      userInfo.email = response.emails[0].value;
+      userInfo.username = userInfo.email.slice(0, userInfo.email.indexOf('@'));
+    }
+
     const externalAccount = await getOrCreateUser(req, res, userInfo, providerId);
     const externalAccount = await getOrCreateUser(req, res, userInfo, providerId);
     if (!externalAccount) {
     if (!externalAccount) {
       return loginFailure(req, res, next);
       return loginFailure(req, res, next);