Browse Source

Merge branch 'master' into feature-search-r

Sotaro KARASAWA 10 years ago
parent
commit
7cc498472f

+ 16 - 0
CHANGES.md

@@ -1,6 +1,22 @@
 CHANGES
 ========
 
+## 1.4.0
+
+* Feature: Slack integration.
+* Feature: Page comment.
+* Feature: User page.
+* Feature: User bookmark page and created pages list.
+* Feature: Portal for list.
+* Feature: History diff (Thank you: @suzuki #65).
+* Feature: Image uploader for local server (Thank you: @riaf ).
+* Improve: List view styles.
+* Improve: Paste handler with `> ` line (Thank you: @suzuki #57).
+* Fix: Google Apps cliendId validation (Thank you: @suzutan #72).
+* Fix: Bug of detecting prefix of the path on list view.
+* And some fixes. (Thank you: @yuya-takeyama @takahashim)
+* Library Update: now Crowi doesn't depends on bower.
+
 ## 1.3.1
 
 * Fix: Logic of checking uploadable was broken.

+ 2 - 1
README.md

@@ -4,7 +4,7 @@ Crowi - The Simple & Powerful Communication Tool Based on Wiki
 ================================================================
 
 
-[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
+[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/crowi/crowi/tree/v1.4.0)
 
 [![Circle CI](https://circleci.com/gh/crowi/crowi.svg?style=svg)](https://circleci.com/gh/crowi/crowi)
 [![Join the chat at https://gitter.im/crowi/general](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/crowi/general)
@@ -42,6 +42,7 @@ Dependencies
 * Amazon S3 (optional)
 * Facebook Application (optional)
 * Google Project (optional)
+* Slack App (optional)
 
 
 Start Up on Local

+ 1 - 1
lib/form/admin/google.js

@@ -5,6 +5,6 @@ var form = require('express-form')
 
 module.exports = form(
   field('settingForm[google:clientId]').trim().is(/^[\d\.a-z\-\.]+$/),
-  field('settingForm[google:clientSecret]').trim().is(/^[\da-zA-Z\-]+$/)
+  field('settingForm[google:clientSecret]').trim().is(/^[\da-zA-Z\-_]+$/)
 );
 

+ 4 - 3
lib/views/admin/notification.html

@@ -147,11 +147,11 @@
       </p>
       <h4>1. Register Slack App</h4>
       <p>
-      Create App from this link, and fill the form out as below:
+      Create App from <a href="https://api.slack.com/applications/new">this link</a>, and fill the form out as below:
       </p>
       <dl class="dl-horizontal">
         <dt>App Name</dt> <dd><code>Crowi</code> </dd>
-        <dt>Icon</dt> <dd>Upload this image as the icon (Free to download and use it) =&gt; <img src=""></dd>
+        <dt>Icon</dt> <dd>Upload this image as the icon (Free to download and use it) =&gt; <a href="https://github.com/crowi/crowi/tree/master/resource/logo">Crowi Logo</a></dd>
         <dt>Short description</dt> <dd><code>Crowi's Slack Notification Integration</code> </dd>
         <dt>Long description</dt> <dd><code>Crowi's Slack Notification Integration</code> </dd>
       </dl>
@@ -160,7 +160,8 @@
       </p>
 
       <h4>2. Get <code>clientId</code> and <code>clientSecret</code></h4>
-      <h4>3. Configure Slack on this notification setting screen</h4>
+      <h4>3. After clientId nad clientSecret set, click "Connect to Slack" button to start OAuth process.</h4>
+      <h4>4. Configure Slack on this notification setting screen</h4>
       {% endif %}
 
 

+ 0 - 0
lib/views/admin/slackauth.html


+ 0 - 1
lib/views/admin/slackauthstart.html

@@ -1 +0,0 @@
-<a href="{{ url }}">auth</a>

+ 5 - 0
lib/views/me/index.html

@@ -122,11 +122,16 @@
             新しい画像をアップロード
           </label>
           <div class="col-sm-9">
+            {% if isUploadable() %}
             <form action="/_api/me/picture/upload" id="pictureUploadForm" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
               <input name="userPicture" type="file" accept="image/*">
               <div id="pictureUploadFormProgress">
               </div>
             </form>
+            {% else %}
+            * 画像をアップロードをするための設定がされていません。<br>
+            * アップロードできるようにするには、AWS またはローカルアップロードの設定をしてください。<br>
+            {% endif %}
           </div>
         </div>
       </fieldset>

+ 1 - 1
lib/views/me/password.html

@@ -5,7 +5,7 @@
 {% block content_head %}
 <div class="header-wrap">
   <header id="page-header">
-  <h1 class="title" id="">ユーザー設定</h1>
+    <h1 class="title" id="">ユーザー設定</h1>
   </header>
 </div>
 {% endblock %}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "crowi",
-  "version": "1.3.1",
+  "version": "1.4.0",
   "description": "The simple & powerful Wiki",
   "tags": [
     "wiki",

+ 1 - 1
resource/css/_wiki.scss

@@ -42,7 +42,7 @@ div.body {
   .revision-head-link {
     display: none;
     font-size: 0.6em;
-    padding-top: 8px;
+    padding-top: 4px;
     padding-left: 10px;
   }
   &:hover .revision-head-link {

+ 9 - 0
resource/js/crowi.js

@@ -141,6 +141,7 @@ Crowi.rendererType = {};
 Crowi.rendererType.markdown = function(){};
 Crowi.rendererType.markdown.prototype = {
   render: function(contentText) {
+
     marked.setOptions({
       gfm: true,
       highlight: function (code, lang, callback) {
@@ -169,6 +170,8 @@ Crowi.rendererType.markdown.prototype = {
     });
 
     var contentHtml = Crowi.unescape(contentText);
+    // TODO 前処理系のプラグイン化
+    contentHtml = this.preFormatMarkdown(contentHtml);
     contentHtml = this.expandImage(contentHtml);
     contentHtml = this.link(contentHtml);
 
@@ -181,6 +184,12 @@ Crowi.rendererType.markdown.prototype = {
       $body.html(content);
     });
   },
+  preFormatMarkdown: function(content){
+    var x = content
+      .replace(/^(#{1,})([^\s]+)?(.*)$/gm, '$1 $2$3') // spacer for section
+      .replace(/>[\s]*\n>[\s]*\n/g, '> <br>\n> \n');
+    return x;
+  },
   link: function (content) {
     return content
       //.replace(/\s(https?:\/\/[\S]+)/g, ' <a href="$1">$1</a>') // リンク

BIN
resource/logo/crowi-logo-840.png