Skip to content

Commit

Permalink
Merge pull request #187 from weseek/master
Browse files Browse the repository at this point in the history
release v2.1.2
  • Loading branch information
yuki-takei authored Oct 7, 2017
2 parents 558023d + 2deb7ac commit 85c09d2
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGES
========

## 2.1.2

* Improvement: Ensure to prevent suspending own account
* Fix: Ensure to be able to use `.` for username when invited
* Fix: monospace font for `<code></code>`

## 2.1.1

* Fix: The problem that React Modal doesn't work
Expand Down
2 changes: 1 addition & 1 deletion lib/form/invited.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var form = require('express-form')
, field = form.field;

module.exports = form(
field('invitedForm.username').required().is(/^[\da-zA-Z\-_]+$/),
field('invitedForm.username').required().is(/^[\da-zA-Z\-_\.]+$/),
field('invitedForm.name').required(),
field('invitedForm.password').required().is(/^[\x20-\x7F]{6,}$/)
);
Expand Down
17 changes: 11 additions & 6 deletions lib/views/admin/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,17 @@ <h2>ユーザー一覧</h2>
</form>
{% endif %}
{% if sUser.status == 2 %}

<form action="/admin/user/{{ sUser._id.toString() }}/suspend" method="post">
<input type="hidden" name="_csrf" value="{{ csrf() }}">
<button type="submit" class="btn btn-block btn-warning">アカウント停止</button>
</form>
{% endif %}
{% if sUser.username != user.username %}
<form action="/admin/user/{{ sUser._id.toString() }}/suspend" method="post">
<input type="hidden" name="_csrf" value="{{ csrf() }}">
<button type="submit" class="btn btn-block btn-warning">アカウント停止</button>
</form>
{% else %}
<button class="btn btn-block btn-warning" disabled>アカウント停止</button>
<br>
<p class="alert alert-danger">自分自身のアカウントを停止することはできません</p>
{% endif %}
{% endif %}
{% if sUser.status == 3 %}
<form action="/admin/user/{{ sUser._id.toString() }}/activate" method="post">
<input type="hidden" name="_csrf" value="{{ csrf() }}">
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crowi-plus",
"version": "2.1.1-RC",
"version": "2.1.2-RC",
"description": "Enhanced Crowi",
"tags": [
"wiki",
Expand Down Expand Up @@ -135,9 +135,9 @@
"sinon-chai": "^2.13.0"
},
"engines": {
"node": "6.11.3",
"npm": "4.6.1",
"yarn": "1.1.0"
"node": ">=6.11 <7",
"npm": ">=4.6 <5",
"yarn": "~1.1.0"
},
"config": {
"blanket": {
Expand Down
5 changes: 4 additions & 1 deletion resource/css/_form.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// import crowi variable
@import 'utilities';

.crowi.main-container .main .content-main.on-edit { // {{{ Edit Form of Page
padding: 0;

Expand Down Expand Up @@ -137,7 +140,7 @@
} // }}}

textarea {
font-family: menlo, monaco, consolas, monospace;
font-family: $font-family-monospace-not-strictly;
line-height: 1.1em;
}

Expand Down
3 changes: 2 additions & 1 deletion resource/css/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ $link-hover-color: darken($link-color, 15%);
//
$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
// $font-family-serif: Georgia, "Times New Roman", Times, serif;
$font-family-monospace: Monaco, Menlo, Consolas, "Courier New", MeiryoKe_Console, monospace;
$font-family-monospace: Osaka-Mono, "MS Gothic", Monaco, Menlo, Consolas, "Courier New", monospace;
$font-family-monospace-not-strictly: Monaco, Menlo, Consolas, "Courier New", MeiryoKe_Console, "M+ 1m", monospace;
// $font-family-base: $font-family-sans-serif;
//
// $font-size-base: 14px;
Expand Down
7 changes: 7 additions & 0 deletions resource/css/_wiki.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// import crowi variable
@import 'utilities';

div.body {
padding: 10px;
}
Expand Down Expand Up @@ -181,6 +184,10 @@ div.body {
};
*/

p code { // only inline code blocks
font-family: $font-family-monospace-not-strictly;
}

.page-template-builder {
position: relative;

Expand Down

0 comments on commit 85c09d2

Please sign in to comment.