Răsfoiți Sursa

Merge branch 'imprv/add-theme-nature'

# Conflicts:
#	lib/views/admin/customize.html
yusuketk 8 ani în urmă
părinte
comite
43cce40fe2

+ 14 - 2
CHANGES.md

@@ -1,9 +1,21 @@
 CHANGES
 ========
 
-## 3.0.8-RC
+## 3.0.9-RC
 
-* 
+* Fix: Registering new LDAP User is failed
+    * Introduced by 3.0.6
+* Support: Upgrade libs
+    * codemirror
+    * react-codemirror2
+    * normalize-path
+    * style-loader
+
+## 3.0.8
+
+* Improvement: h1#revision-path occupies most of the screen when the page path is long
+* Improvement: Ensure not to save concealed email field to localStorage
+* Fix: Cannot input "c" and "e" on iOS
 
 ## 3.0.7
 

+ 0 - 1
bin/shrink-emojione-strategy.js

@@ -4,7 +4,6 @@
  * @author Yuki Takei <yuki@weseek.co.jp>
  */
 const fs = require('graceful-fs');
-const normalize = require('normalize-path');
 const helpers = require('../config/helpers');
 
 const OUT = helpers.root('tmp/emoji_strategy_shrinked.json');

+ 1 - 1
lib/models/external-account.js

@@ -92,7 +92,7 @@ class ExternalAccount {
             return User.createUser('', usernameToBeRegistered, undefined, undefined, undefined, User.STATUS_ACTIVE);
           })
           .then(newUser => {
-            return this.associate(providerType, accountId, newUser._id);
+            return this.associate(providerType, accountId, newUser);
           });
 
       });

+ 5 - 3
lib/views/admin/customize.html

@@ -65,12 +65,14 @@
                 data-theme="{{ webpack_asset('style-theme-default-dark').css }}">
               {% include 'widget/theme-colorbox.html' %}
             </a>
+            {# Hide temporary for release v3.0.8 -- 2018.04.24 Yuki Takei
             <a id="theme-option-nature" href="#"
-                class="nature {% if 'nature' === settingForm['customize:theme'] %}active{% endif %}"
-                onclick="selectTheme('nature')"
-                data-theme="{{ webpack_asset('style-theme-nature').css }}">
+             class="nature {% if 'nature' === settingForm['customize:theme'] %}active{% endif %}"
+             onclick="selectTheme('nature')"
+             data-theme="{{ webpack_asset('style-theme-nature').css }}">
               {% include 'widget/theme-colorbox.html' %}
             </a>
+            #}
           </div>
 
           <div class="form-group">

+ 2 - 2
lib/views/layout-crowi/not_found.html

@@ -7,9 +7,9 @@
 
   <div class="header-wrap">
     <header id="page-header">
-      <div class="flex-title-line">
+      <div>
         <div>
-          <h1 class="title flex-item-title" id="revision-path"></h1>
+          <h1 class="title" id="revision-path"></h1>
           <div id="revision-url" class="url-line"></div>
         </div>
       </div>

+ 1 - 1
lib/views/layout-crowi/page.html

@@ -10,7 +10,7 @@
     <header id="page-header">
       <div class="d-flex align-items-center">
         <div class="title-container">
-          <h1 class="title flex-item-title" id="revision-path"></h1>
+          <h1 class="title" id="revision-path"></h1>
           <div id="revision-url" class="url-line"></div>
         </div>
         {% include '../widget/header-buttons.html' %}

+ 1 - 1
lib/views/layout-crowi/page_list.html

@@ -17,7 +17,7 @@
     <div class="d-flex align-items-center">
       <div class="title-container">
         <div class="d-flex">
-          <h1 class="title flex-item-title" id="revision-path"></h1>
+          <h1 class="title" id="revision-path"></h1>
           {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
           {% if searchConfigured() && !isTopPage() && !isTrashPage() %}
           <form id="search-listpage-form" class="m-l-10 input-group search-input-group hidden-xs hidden-sm"

+ 2 - 2
lib/views/layout-growi/widget/header.html

@@ -7,13 +7,13 @@
         </a>
       </div>
       <div class="title-container">
-        <h1 class="title flex-item-title" id="revision-path"></h1>
+        <h1 class="title" id="revision-path"></h1>
         <div id="revision-url" class="url-line"></div>
       </div>
       {% if page %}
       {% include '../../widget/header-buttons.html' %}
 
-      <ul class="authors hidden-sm hidden-xs">
+      <ul class="authors hidden-sm hidden-xs text-nowrap">
         <li>
           <div class="d-flex align-items-center">
             <a class="m-r-5" href="{{ userPageRoot(page.creator) }}">

+ 5 - 5
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "3.0.8-RC",
+  "version": "3.0.9-RC",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",
@@ -62,7 +62,7 @@
     "bootstrap-sass": "~3.3.6",
     "bootstrap-select": "^1.12.4",
     "check-node-version": "^3.1.1",
-    "codemirror": "^5.36.0",
+    "codemirror": "^5.37.0",
     "connect-flash": "~0.1.1",
     "connect-mongo": "^2.0.1",
     "connect-redis": "^3.3.0",
@@ -117,7 +117,7 @@
     "node-sass": "^4.5.0",
     "nodemailer": "^4.0.1",
     "nodemailer-ses-transport": "~1.5.0",
-    "normalize-path": "^2.1.1",
+    "normalize-path": "^3.0.0",
     "npm-run-all": "^4.1.2",
     "optimize-js-plugin": "0.0.4",
     "passport": "^0.4.0",
@@ -130,7 +130,7 @@
     "react-bootstrap": "^0.32.1",
     "react-bootstrap-typeahead": "^3.0.3",
     "react-clipboard.js": "^1.1.3",
-    "react-codemirror2": "^4.2.1",
+    "react-codemirror2": "^5.0.0",
     "react-dom": "^16.2.0",
     "react-dropzone": "^4.2.7",
     "reveal.js": "^3.5.0",
@@ -139,7 +139,7 @@
     "slack-node": "^0.1.8",
     "socket.io": "^2.0.3",
     "socket.io-client": "^2.0.3",
-    "style-loader": "^0.20.1",
+    "style-loader": "^0.21.0",
     "swig-templates": "^2.0.2",
     "throttle-debounce": "^1.0.1",
     "toastr": "^2.1.2",

+ 2 - 1
resource/js/components/Page/RevisionPath.js

@@ -88,7 +88,8 @@ export default class RevisionPath extends React.Component {
       afterElements.push(
         <span key={page.pagePath} className="path-segment">
           <a href={page.pagePath}>{page.pageName}</a>
-        </span>);
+        </span>
+      );
 
       // add elements for '/'
       afterElements.push(

+ 1 - 1
resource/js/legacy/crowi.js

@@ -902,7 +902,7 @@ window.addEventListener('keydown', (event) => {
 
   // ignore when target dom is input
   const inputPattern = /^input|textinput|textarea$/i;
-  if (target.tagName.match(inputPattern)) {
+  if (target.tagName.match(inputPattern) || target.isContentEditable) {
     return;
   }
 

+ 21 - 23
resource/styles/agile-admin/inverse/colors/_apply-colors-dark.scss

@@ -71,31 +71,29 @@ input.form-control, textarea.form-control {
 }
 
 /*
- * Tabs
+ * Table
  */
-.nav.nav-tabs {
-  border-bottom-color: $border;
+ .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th,
+ .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td ,
+ .table > thead > tr > th, .table-bordered{
+     border-top: 1px solid $border;
+ }
 
-  > li > a {
-    color:$linktext;
-    &:hover, &:focus {
-      color: $linktext-hover;
-    }
-  }
-  > li.active > a {
-    border-top-color: $border;
-    border-left-color: $border;
-    border-right-color: $border;
-  }
-  > li:not(.active) > a {
-    &:hover, &:focus {
-      border-top-color: darken($border, 5%);
-      border-left-color: darken($border, 5%);
-      border-right-color: darken($border, 5%);
-      border-bottom: transparent;
-    }
-  }
-}
+ .table-bordered > thead > tr > th,
+ .table-bordered > tbody > tr > th,
+ .table-bordered > tfoot > tr > th,
+ .table-bordered > thead > tr > td,
+ .table-bordered > tbody > tr > td,
+ .table-bordered > tfoot > tr > td {
+   border: 1px solid $border;
+ }
+ .table > thead > tr > th {
+     border-bottom: 1px solid $border;
+ }
+
+ .table-bordered {
+     border: 1px solid $border;
+ }
 
 
 /*

+ 0 - 7
resource/styles/agile-admin/inverse/colors/_apply-colors-light.scss

@@ -15,13 +15,6 @@
   background-color: darken($bodycolor, 5%);
 }
 
-/*
- * Tabs
- */
-.nav-tabs > li > a {
-  color: $dark;
-}
-
 /*
  * GROWI header
  */

+ 27 - 0
resource/styles/agile-admin/inverse/colors/_apply-colors.scss

@@ -214,6 +214,33 @@ legend {
   }
 }
 
+/*
+ * Tabs
+ */
+ .nav.nav-tabs {
+  border-bottom-color: $navbar-border;
+
+  > li > a {
+    color:$linktext;
+    &:hover, &:focus {
+      color: $linktext-hover;
+    }
+  }
+  > li.active > a {
+    border-top-color: $navbar-border;
+    border-left-color: $navbar-border;
+    border-right-color: $navbar-border;
+  }
+  > li:not(.active) > a {
+    &:hover, &:focus {
+      border-top-color: $active-navbar-border;
+      border-left-color: $active-navbar-border;
+      border-right-color: $active-navbar-border;
+      border-bottom: transparent;
+    }
+  }
+}
+
 
 /*
  * Crowi sidebar

+ 2 - 0
resource/styles/agile-admin/inverse/colors/default-dark.scss

@@ -20,6 +20,8 @@ $wikilinktext-hover: darken($wikilinktext, 5%);
 
 $dark: darken($bodytext, 5%);
 $border: lighten($basecolor, 15%);
+$navbar-border: lighten($border, 10%);
+$active-navbar-border: darken($border, 3%);
 
 @import 'apply-colors';
 @import 'apply-colors-dark';

+ 2 - 0
resource/styles/agile-admin/inverse/variables.scss

@@ -51,6 +51,8 @@ $rgt:right !default;
 $lft:left !default;
 
 $dark-text:#848a96 !default;
+$navbar-border: #ccc !default;
+$active-navbar-border: lighten($navbar-border, 20%) !default;
 
 /*Border radius*/
 $radius: 0 !default;

+ 2 - 2
resource/styles/bootstrap4/_mixins.scss

@@ -12,8 +12,8 @@
 // @import "mixins/size";
 // @import "mixins/reset-text";
 // @import "mixins/text-emphasis";
-// @import "mixins/text-hide";
-// @import "mixins/text-truncate";
+@import "mixins/text-hide";
+@import "mixins/text-truncate";
 // @import "mixins/visibility";
 
 // // Components

+ 1 - 1
resource/styles/bootstrap4/_utilities.scss

@@ -10,5 +10,5 @@
 // @import "utilities/screenreaders";
 // @import "utilities/sizing";
 @import "utilities/spacing";
-// @import "utilities/text";
+@import "utilities/text";
 // @import "utilities/visibility";

+ 3 - 3
resource/styles/bootstrap4/_variables.scss

@@ -231,9 +231,9 @@ $grid-breakpoints: (
 // $font-size-lg:                ($font-size-base * 1.25) !default;
 // $font-size-sm:                ($font-size-base * .875) !default;
 
-// $font-weight-light:           300 !default;
-// $font-weight-normal:          400 !default;
-// $font-weight-bold:            700 !default;
+$font-weight-light:           300 !default;
+$font-weight-normal:          400 !default;
+$font-weight-bold:            700 !default;
 
 // $font-weight-base:            $font-weight-normal !default;
 // $line-height-base:            1.5 !default;

+ 4 - 4
resource/styles/bootstrap4/utilities/_text.scss

@@ -39,11 +39,11 @@
 
 .text-white { color: #fff !important; }
 
-@each $color, $value in $theme-colors {
-  @include text-emphasis-variant(".text-#{$color}", $value);
-}
+// @each $color, $value in $theme-colors {
+//   @include text-emphasis-variant(".text-#{$color}", $value);
+// }
 
-.text-muted { color: $text-muted !important; }
+// .text-muted { color: $text-muted !important; }
 
 // Misc
 

+ 15 - 0
resource/styles/scss/_mixins.scss

@@ -0,0 +1,15 @@
+@mixin variable-font-size($basesize) {
+  font-size: $basesize;
+  @media(max-width: $screen-lg) {
+    font-size: #{$basesize * 0.9};
+  }
+  @media(max-width: $screen-md) {
+    font-size: #{$basesize * 0.8};
+  }
+  @media(max-width: $screen-sm) {
+    font-size: #{$basesize * 0.7};
+  }
+  @media(max-width: $screen-xs) {
+    font-size: #{$basesize * 0.6};
+  }
+}

+ 17 - 6
resource/styles/scss/_on-edit.scss

@@ -34,7 +34,7 @@ body.on-edit {
    */
   .nav-main-right-tab:not(.dropdown) {
     // hide if screen size is less than smartphone
-    @media (max-width: $screen-xs-max) {
+    @media (max-width: $screen-xs) {
       display: none;
     }
   }
@@ -128,12 +128,12 @@ body.on-edit {
 
   .row.bg-title {
     $left-margin: $nav-main-left-tab-width * 2 + 25px;  // width of .nav-main-left-tab x 2 + some margin
-    $right-margin: 128px + 94px;                        // width of presentation and history tabs width
+    $right-margin: 128px + 94px + 46px;                 // width of all of nav-main-right-tab
 
     position: absolute;
     z-index: 1;
     left: $left-margin;
-    min-width: calc(100% - #{$left-margin} - #{$right-margin});
+    width: calc(100% - #{$left-margin} - #{$right-margin});
 
     // for crowi layout
     > .col-md-9, .col-xs-12 {
@@ -143,13 +143,24 @@ body.on-edit {
 
     background: none;
 
-    h1 {
-      font-size: 20px;
+    .header-wrap {
+      overflow-x: hidden;
+    }
+    h1#revision-path {
+      @include variable-font-size(20px);
       line-height: 1em;
+
+      // nowrap even if the path is too long
+      .d-flex {
+        flex-wrap: nowrap;
+      }
+      .path-segment {
+        white-space: nowrap;
+      }
     }
 
     // hide if screen size is less than smartphone
-    @media (max-width: $screen-xs-max) {
+    @media (max-width: $screen-sm) {
       display: none;
     }
   }

+ 13 - 9
resource/styles/scss/_page.scss

@@ -52,10 +52,19 @@
       }
     }
 
-    h1 {
-      font-size: 28px;
+    .url-line {
+      color: #999;
+      font-size: 1rem;
+    }
+
+    h1#revision-path {
+      @include variable-font-size(28px);
+
       margin-top: 0;
       margin-bottom: 0;
+      .d-flex {
+        flex-wrap: wrap;  // for long page path
+      }
 
       // crowi layout only
       a.last-path {
@@ -68,11 +77,6 @@
 
     }
 
-    .url-line {
-      color: #999;
-      font-size: 1rem;
-    }
-
     // affix
     &.affix {
       width: 100%;
@@ -82,8 +86,8 @@
       z-index: 15; // over the .sidebar
       box-shadow: 0 0px 2px #999;
 
-      h1 {
-        font-size: 1.8em;
+      h1#revision-path {
+        @include variable-font-size(20px);
       }
     }
 

+ 4 - 3
resource/styles/scss/style.scss

@@ -1,12 +1,13 @@
-// vendor
-@import 'vendor';
-
 // import variables
 @import '../agile-admin/inverse/variables';
 @import 'variables';
+@import 'mixins';
 
 @import 'override-bootstrap-variables';
 
+// vendor
+@import 'vendor';
+
 // override react-bootstrap-typeahead styles
 @import 'override-rbt';
 

+ 4 - 0
resource/styles/scss/theme/_override-agileadmin.scss

@@ -1,3 +1,7 @@
+.bg-title {
+  overflow: unset;
+}
+
 /*
  * Growi original
  */

+ 16 - 19
yarn.lock

@@ -1607,9 +1607,9 @@ code-point-at@^1.0.0:
   version "1.1.0"
   resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
 
-codemirror@^5.36.0:
-  version "5.36.0"
-  resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.36.0.tgz#1172ad9dc298056c06e0b34e5ccd23825ca15b40"
+codemirror@^5.37.0:
+  version "5.37.0"
+  resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.37.0.tgz#c349b584e158f590277f26d37c2469a6bc538036"
 
 color-convert@^1.3.0, color-convert@^1.9.0:
   version "1.9.1"
@@ -4934,12 +4934,16 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
     semver "2 || 3 || 4 || 5"
     validate-npm-package-license "^3.0.1"
 
-normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
+normalize-path@^2.0.0, normalize-path@^2.0.1:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
   dependencies:
     remove-trailing-separator "^1.0.1"
 
+normalize-path@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+
 normalize-range@^0.1.2:
   version "0.1.2"
   resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
@@ -5955,9 +5959,9 @@ react-clipboard.js@^1.1.3:
     clipboard "^1.6.1"
     prop-types "^15.5.0"
 
-react-codemirror2@^4.2.1:
-  version "4.2.1"
-  resolved "https://registry.yarnpkg.com/react-codemirror2/-/react-codemirror2-4.2.1.tgz#4ad3c5c60ebbcb34880f961721b51527324ec021"
+react-codemirror2@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/react-codemirror2/-/react-codemirror2-5.0.0.tgz#18e0d4495c3cfe0c4675dd9bfcea074ca3aa9f56"
 
 react-dom@^16.2.0:
   version "16.2.0"
@@ -6503,20 +6507,13 @@ schema-utils@^0.3.0:
   dependencies:
     ajv "^5.0.0"
 
-schema-utils@^0.4.0:
+schema-utils@^0.4.0, schema-utils@^0.4.5:
   version "0.4.5"
   resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e"
   dependencies:
     ajv "^6.1.0"
     ajv-keywords "^3.1.0"
 
-schema-utils@^0.4.3:
-  version "0.4.3"
-  resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.3.tgz#e2a594d3395834d5e15da22b48be13517859458e"
-  dependencies:
-    ajv "^5.0.0"
-    ajv-keywords "^2.1.0"
-
 scss-tokenizer@^0.2.3:
   version "0.2.3"
   resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
@@ -6980,12 +6977,12 @@ strip-json-comments@~2.0.1:
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
 
-style-loader@^0.20.1:
-  version "0.20.1"
-  resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.20.1.tgz#33ac2bf4d5c65a8906bc586ad253334c246998d0"
+style-loader@^0.21.0:
+  version "0.21.0"
+  resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.21.0.tgz#68c52e5eb2afc9ca92b6274be277ee59aea3a852"
   dependencies:
     loader-utils "^1.1.0"
-    schema-utils "^0.4.3"
+    schema-utils "^0.4.5"
 
 supports-color@4.4.0:
   version "4.4.0"