Procházet zdrojové kódy

Merge pull request #364 from weseek/master

release v3.0.8
Yuki Takei před 8 roky
rodič
revize
2d02955a04

+ 6 - 1
CHANGES.md

@@ -1,7 +1,12 @@
 CHANGES
 ========
 
-## 3.0.7-RC
+## 3.0.8-RC
+
+* Improvement: h1#revision-path occupies most of the screen when the page path is long
+* Fix: Cannot input "c" and "e" on iOS
+
+## 3.0.7
 
 * Improvement: Enable to download an attached file with original name
 * Improvement: Use MongoDB for session store instead of Redis

+ 1 - 0
config/webpack.common.js

@@ -30,6 +30,7 @@ module.exports = function (options) {
       'style':                './resource/styles/scss/style.scss',
       'style-theme-default':  './resource/styles/scss/theme/default.scss',
       'style-theme-default-dark':  './resource/styles/scss/theme/default-dark.scss',
+      'style-theme-nature':   './resource/styles/scss/theme/nature.scss',
       'style-presentation':   './resource/styles/scss/style-presentation.scss',
     },
     externals: {

+ 1 - 1
lib/locales/en-US/welcome.md

@@ -18,7 +18,7 @@ Contents
 
 |All Pages|[/Sandbox]|
 | --- | --- |
-| $lsx(/) | <div class="alert alert-success"><span style="font-size: x-large;"><i class="icon-check"></i> [[Sandboxをチェック>/Sandbox]]</span></div> $lsx(/Sandbox)|
+| $lsx(/) | <div class="alert alert-success"><span style="font-size: x-large;"><i class="icon-check"></i> [Sandboxをチェック](/Sandbox)</span></div> $lsx(/Sandbox)|
 
 Slack
 =====

+ 1 - 1
lib/locales/ja/welcome.md

@@ -18,7 +18,7 @@ Contents
 
 |All Pages|[/Sandbox]|
 | --- | --- |
-| $lsx(/) | <div class="alert alert-success"><span style="font-size: x-large;"><i class="icon-check"></i> [[Sandboxをチェック>/Sandbox]]</span></div> $lsx(/Sandbox)|
+| $lsx(/) | <div class="alert alert-success"><span style="font-size: x-large;"><i class="icon-check"></i> [Sandboxをチェック](/Sandbox)</span></div> $lsx(/Sandbox)|
 
 Slack
 =====

+ 1 - 1
lib/models/user.js

@@ -12,7 +12,7 @@ module.exports = function(crowi) {
     , STATUS_SUSPENDED  = 3
     , STATUS_DELETED    = 4
     , STATUS_INVITED    = 5
-    , USER_PUBLIC_FIELDS = '_id image isGravatarEnabled googleId name username email introduction status lang createdAt admin' // TODO: どこか別の場所へ...
+    , USER_PUBLIC_FIELDS = '_id image isEmailPublished isGravatarEnabled googleId name username email introduction status lang createdAt admin' // TODO: どこか別の場所へ...
 
     , LANG_EN    = 'en'
     , LANG_EN_US = 'en-US'

+ 9 - 0
lib/routes/user.js

@@ -54,6 +54,15 @@ module.exports = function(crowi, app) {
     }
 
     userFetcher
+    .then(function(userList) {
+      return userList.map((user) => {
+        // omit email
+        if (true !== user.isEmailPublished) { // compare to 'true' because Crowi original data doesn't have 'isEmailPublished'
+          user.email = undefined;
+        }
+        return user;
+      });
+    })
     .then(function(userList) {
       var result = {
         users: userList,

+ 7 - 0
lib/views/admin/customize.html

@@ -65,6 +65,13 @@
                 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"
+             class="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"

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

@@ -7,7 +7,7 @@
         </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 %}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "3.0.7-RC",
+  "version": "3.0.8-RC",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",

+ 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 - 0
resource/styles/agile-admin/inverse/colors/nature.scss

@@ -0,0 +1,21 @@
+@import '../variables';
+
+$themecolor:#112744;
+
+$topbar:#334455;
+$sidebar:#fff;
+$bodycolor:#fff;
+$headingtext: #2b2b2b;
+$bodytext: #333333;
+$linktext: lighten($themecolor, 20%);
+$linktext-hover: lighten($linktext, 20%);
+$sidebar-text:#38495a;
+
+$primary: $themecolor;
+
+$logo-mark-fill: lighten(desaturate($topbar, 10%), 15%);
+$wikilinktext: lighten($themecolor, 20%);
+$wikilinktext-hover: lighten($wikilinktext, 20%);
+
+@import 'apply-colors';
+@import 'apply-colors-light';

+ 11 - 0
resource/styles/scss/_admin.scss

@@ -116,5 +116,16 @@
         fill: #f75b36;
       }
     }
+    .nature {
+      .color1 {
+        fill: #dfffd1;
+      }
+      .color2 {
+        fill: #1f9b33;
+      }
+      .color3 {
+        fill: #56f736;
+      }
+    }
   }
 }

+ 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);
       }
     }
 

+ 1 - 0
resource/styles/scss/style.scss

@@ -4,6 +4,7 @@
 // import variables
 @import '../agile-admin/inverse/variables';
 @import 'variables';
+@import 'mixins';
 
 @import 'override-bootstrap-variables';
 

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

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

+ 8 - 0
resource/styles/scss/theme/nature.scss

@@ -0,0 +1,8 @@
+// import colors
+@import '../../agile-admin/inverse/colors/nature';
+
+// apply agile-admin theme
+@import '../../agile-admin/inverse/style';
+
+// override
+@import 'override-agileadmin';