Browse Source

Merge branch 'master' into imprv/4685-4991-impl-test-for-deleteCompletely

itizawa 5 years ago
parent
commit
5a36a3eb95

+ 5 - 2
CHANGES.md

@@ -1,9 +1,12 @@
 # CHANGES
 
+## v4.2.8-RC
 
-## v.4.2.7
+* Fix: Fixed the display of updtedAt and createdAt being reversed 
 
-* 
+## v4.2.7
+
+* Fix: Installer doesn't work on Chrome
 
 ## v4.2.6
 

+ 5 - 7
README.md

@@ -11,9 +11,6 @@
 <p align="center">
   <a href="https://docs.growi.org">Documentation</a> / <a href="https://demo.growi.org">Demo</a>
 </p>
-<p align="center">
-  <a href="https://heroku.com/deploy"><img src="https://www.herokucdn.com/deploy/button.png"></a>
-</p>
 
 
 GROWI
@@ -33,8 +30,8 @@ Table Of Contents
 
 - [Features](#features)
 - [Quick Start for Production](#quick-start-for-production)
-    - [Heroku](#heroku)
     - [docker-compose](#docker-compose)
+    - [Helm (Experimental)](#helm)
     - [On-premise](#on-premise)
 - [Environment Variables](#environment-variables)
 - [Documentation](#documentation)
@@ -61,14 +58,15 @@ Features
 Quick Start for Production
 ===========================
 
-### Heroku
-
-- [GROWI Docs: Launch on Heroku](https://docs.growi.org/en/admin-guide/getting-started/heroku.html) ([en](https://docs.growi.org/en/admin-guide/getting-started/heroku.html)/[ja](https://docs.growi.org/ja/admin-guide/getting-started/heroku.html))
 
 ### docker-compose
 
 - [GROWI Docs: Launch with docker-compose](https://docs.growi.org/en/admin-guide/getting-started/docker-compose.html) ([en](https://docs.growi.org/en/admin-guide/getting-started/docker-compose.html)/[ja](https://docs.growi.org/ja/admin-guide/getting-started/docker-compose.html))
 
+### Helm (Experimental)
+
+- [GROWI Helm Chart](https://github.com/weseek/helm-charts/tree/master/charts/growi)
+
 ### On-premise
 
 **[Migration Guide from Crowi](https://docs.growi.org/en/admin-guide/migration-guide/from-crowi-onpremise.html) ([en](https://docs.growi.org/en/admin-guide/migration-guide/from-crowi-onpremise.html)/[ja](https://docs.growi.org/ja/admin-guide/migration-guide/from-crowi-onpremise.html))** is here.

+ 1 - 1
package.json

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

+ 13 - 8
src/client/js/components/InstallerForm.jsx

@@ -13,12 +13,12 @@ class InstallerForm extends React.Component {
 
     this.state = {
       isValidUserName: true,
-      isSubmitButtonDisabled: false,
+      isSubmittingDisabled: false,
       selectedLang: {},
     };
     // this.checkUserName = this.checkUserName.bind(this);
 
-    this.clickHandler = this.clickHandler.bind(this);
+    this.submitHandler = this.submitHandler.bind(this);
   }
 
   componentWillMount() {
@@ -42,11 +42,17 @@ class InstallerForm extends React.Component {
     this.setState({ selectedLang: meta });
   }
 
-  clickHandler() {
-    this.setState({ isSubmitButtonDisabled: true });
+  submitHandler() {
+    if (this.state.isSubmittingDisabled) {
+      return;
+    }
+
+    this.setState({ isSubmittingDisabled: true });
     setTimeout(() => {
-      this.setState({ isSubmitButtonDisabled: false });
+      this.setState({ isSubmittingDisabled: false });
     }, 3000);
+
+    document['register-form'].submit();
   }
 
   render() {
@@ -66,7 +72,7 @@ class InstallerForm extends React.Component {
           </div>
         </div>
         <div className="row">
-          <form role="form" action="/installer" method="post" id="register-form" className="col-md-12">
+          <form role="form" action="/installer" method="post" id="register-form" className="col-md-12" onSubmit={this.submitHandler}>
             <div className="dropdown mb-3">
               <div className="d-flex dropdown-with-icon">
                 <i className="icon-bubbles border-0 rounded-0" />
@@ -163,8 +169,7 @@ class InstallerForm extends React.Component {
                 type="submit"
                 className="btn-fill btn btn-register"
                 id="register"
-                disabled={this.state.isSubmitButtonDisabled}
-                onClick={this.clickHandler}
+                disabled={this.state.isSubmittingDisabled}
               >
                 <div className="eff"></div>
                 <span className="btn-label"><i className="icon-user-follow" /></span>

+ 6 - 5
src/client/js/components/Navbar/AuthorInfo.jsx

@@ -1,10 +1,11 @@
 import React from 'react';
 import PropTypes from 'prop-types';
-
 import { userPageRoot } from '@commons/util/path-utils';
+import { format } from 'date-fns';
 
 import UserPicture from '../User/UserPicture';
 
+const formatType = 'yyyy/MM/dd HH:mm';
 const AuthorInfo = (props) => {
   const {
     mode, user, date, locate,
@@ -14,14 +15,14 @@ const AuthorInfo = (props) => {
     ? 'Created by'
     : 'Updated by';
   const infoLabelForFooter = mode === 'create'
-    ? 'Last revision posted at'
-    : 'Created at';
+    ? 'Created at'
+    : 'Last revision posted at';
   const userLabel = user != null
     ? <a href={userPageRoot(user)}>{user.name}</a>
     : <i>Unknown</i>;
 
   if (locate === 'footer') {
-    return <p>{infoLabelForFooter} {date} by <UserPicture user={user} size="sm" /> {userLabel}</p>;
+    return <p>{infoLabelForFooter} {format(new Date(date), formatType)} by <UserPicture user={user} size="sm" /> {userLabel}</p>;
   }
 
   return (
@@ -31,7 +32,7 @@ const AuthorInfo = (props) => {
       </div>
       <div>
         <div>{infoLabelForSubNav} {userLabel}</div>
-        <div className="text-muted text-date">{date}</div>
+        <div className="text-muted text-date">{format(new Date(date), formatType)}</div>
       </div>
     </div>
   );

+ 2 - 2
src/server/routes/hackmd.js

@@ -191,8 +191,8 @@ module.exports = function(crowi, app) {
 
     const { status, headers } = hackmdResponse;
 
-    // validate HackMD/CodiMD specific header
-    if (headers['codimd-version'] == null && headers['hackmd-version'] == null) {
+    // validate HackMD/CodiMD/HedgeDoc specific header
+    if (headers['codimd-version'] == null && headers['hackmd-version'] == null && headers['hedgedoc-version'] == null) {
       const message = 'Connecting to a non-HackMD server.';
       logger.error(message);
       return res.json(ApiResponse.error(message));

+ 6 - 0
src/server/service/config-loader.js

@@ -392,6 +392,12 @@ const ENV_VAR_NAME_TO_CONFIG_INFO = {
     type:    TYPES.NUMBER,
     default: 7788,
   },
+  GROWI_CLOUD_URI: {
+    ns:      'crowi',
+    key:     'app:growiCloudUri',
+    type:    TYPES.STRING,
+    default: null,
+  },
 };
 
 class ConfigLoader {