فهرست منبع

Merge branch 'master' into reactify-admin/security

itizawa 6 سال پیش
والد
کامیت
b952617e40

+ 3 - 2
.github/workflows/build.yml

@@ -2,8 +2,9 @@ name: Release Docker Images
 
 on:
   push:
-    tags:
-      - v3.*.*
+    branches:
+      - tmp/release-**
+
 
 jobs:
 

+ 1 - 0
.github/workflows/release.yml

@@ -41,5 +41,6 @@ jobs:
       uses: Roang-zero1/github-create-release-action@master
       with:
         created_tag: v${{ env.RELEASE_VERSION }}
+        changelog_file: CHANGES.md
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 168 - 160
CHANGES.md

@@ -1,9 +1,17 @@
 # CHANGES
 
-## v3.6.4-RC
+## v3.6.5-RC
+
+*
+
+## v3.6.4
 
 * Feature: Alert for stale page
+* Improvement: Reactify admin pages (Home)
 * Improvement: Reactify admin pages (App)
+* Improvement: Accessibility for editor icons of dark themes
+* Improvement: Accessibility for importing table data pane
+* Improvement: Resolve username and email when logging in with Google OAuth
 
 ## v3.6.3
 
@@ -15,7 +23,7 @@
     * file-loader
     * mini-css-extract-plugin
 
-## 3.6.2
+## v3.6.2
 
 * Improvement: Reactify admin pages (Customize)
 * Improvement: Ensure not to consider `[text|site](https://example.com]` as a row in the table
@@ -25,7 +33,7 @@
 * Fix: Emoji Autocomplete window does not float correctly
     * Introduced by 3.5.0
 
-## 3.6.1
+## v3.6.1
 
 ### BREAKING CHANGES
 
@@ -50,19 +58,19 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Support: Upgrade libs
     * growi-commons
 
-## 3.6.0 (Missing number)
+## v3.6.0 (Missing number)
 
-## 3.5.25
+## v3.5.25
 
 * Improvement: Disable ESC key to close Handsontable Modal
 * Fix: Exported data of empty collection is broken
 * Fix: Some components crash after when the page with attachment has exported/imported
 
-## 3.5.24
+## v3.5.24
 
 * Fix: Plugins are not working on Heroku
 
-## 3.5.23
+## v3.5.23
 
 * Fix: Global Notification failed to send e-mail
 * Fix: Pagination is not working for trash list
@@ -70,17 +78,17 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Support: Upgrade libs
     * growi-commons
 
-## 3.5.22
+## v3.5.22
 
 * Improvement: Add `FILE_UPLOAD_DISABLED` env var
 
-## 3.5.21
+## v3.5.21
 
 * Improvement: Cache control when retrieving attachment data
 * Fix: Inviting user doesn't work
     * Introduced by 3.5.20
 
-## 3.5.20
+## v3.5.20
 
 * Improvement: Organize MongoDB collection indexes uniqueness
 * Improvement: Reactify admin pages (External Account Management)
@@ -95,9 +103,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * react-i18next
     * validator
 
-## 3.5.19 (Missing number)
+## v3.5.19 (Missing number)
 
-## 3.5.18
+## v3.5.18
 
 * Improvement: Import GROWI Archive
     * Process asynchronously
@@ -110,7 +118,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Improvement: Add link to [docs.growi.org](https://docs.growi.org)
 * Fix: Monospace font code is broken when printing on Mac
 
-## 3.5.17
+## v3.5.17
 
 * Feature: Upload to GCS (Google Cloud Storage)
 * Feature: Statistics API
@@ -123,21 +131,21 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Fix: Config default values
 * Support: REPL with `console` npm scripts
 
-## 3.5.16
+## v3.5.16
 
 * Fix: Full Text Search doesn't work after when building indices
     * Introduced by 3.5.12
 
-## 3.5.15
+## v3.5.15
 
 * Feature: Import/Export Page data
 * Fix: The link to Sandbox on Markdown Help Modal doesn't work
 * Support: Upgrade libs
     * codemirror
 
-## 3.5.14 (Missing number)
+## v3.5.14 (Missing number)
 
-## 3.5.13
+## v3.5.13
 
 * Feature: Re-edit comments
 * Support: [growi-plugin-attachment-refs](https://github.com/weseek/growi-plugin-attachment-refs)
@@ -145,7 +153,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * entities
     * markdown-it
 
-## 3.5.12
+## v3.5.12
 
 * Improvement: Use Elasticsearch Alias
 * Improvement: Connect to HTTPS PlantUML URL in default
@@ -154,7 +162,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Support: Upgrade libs
     * terser-webpack-plugin
 
-## 3.5.11
+## v3.5.11
 
 * Fix: HackMD Editor shows 404 error when HackMD redirect to fqdn URI
     * Introduced by 3.5.8
@@ -168,7 +176,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * webpack-cli
     * webpack-merge
 
-## 3.5.10
+## v3.5.10
 
 * Feature: Send Global Notification with Slack
 * Improvement: Show loading spinner when fetching page history data
@@ -179,7 +187,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * date-fns
     * eslint-config-weseek
 
-## 3.5.9
+## v3.5.9
 
 * Fix: Editing table with Spreadsheet like GUI (Handsontable) is failed
 * Fix: Plugins are not initialized when first launching
@@ -191,7 +199,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * rimraf
     * style-loader
 
-## 3.5.8
+## v3.5.8
 
 * Improvement: Controls when HackMD/CodiMD has unsaved draft
 * Improvement: Show hints if HackMD/CodiMD integration is not working
@@ -199,15 +207,15 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Improvement: Comment Thread Layout
 * Improvement: Show commented date with date distance format
 
-## 3.5.7 (Missing number)
+## v3.5.7 (Missing number)
 
-## 3.5.6
+## v3.5.6
 
 * Fix: Saving new page is failed when empty string tag is set
 * Fix: Link of Create template page button in New Page Modal is broken
 * Fix: Global Notification dows not work when creating/moving/deleting/like/comment
 
-## 3.5.5
+## v3.5.5
 
 * Feature: Support S3-compatible object storage (e.g. MinIO)
 * Feature: Enable/Disable ID/Password Authentication
@@ -222,13 +230,13 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
     * mini-css-extract-plugin
     * react-hotkeys
 
-## 3.5.4
+## v3.5.4
 
 * Fix: List private pages wrongly
 * Fix: Global Notification Trigger Path does not parse glob correctly
 * Fix: Consecutive page deletion requests cause unexpected complete page deletion
 
-## 3.5.3
+## v3.5.3
 
 * Improvement: Calculate string width when save with Spreadsheet like GUI (Handsontable)
 * Fix: Search Result Page doesn't work
@@ -236,7 +244,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Fix: Dropdown to copy page path/URL/MarkdownLink shows under CodeMirror vscrollbar
 * Fix: Link to /trash in Dropdown menu
 
-## 3.5.2
+## v3.5.2
 
 * Feature: Remain metadata option when Move/Rename page
 * Improvement: Support code highlight for Swift and Kotlin
@@ -247,7 +255,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/36x.html>
 * Support: Upgrade libs
     * growi-commons
 
-## 3.5.1
+## v3.5.1
 
 ### BREAKING CHANGES
 
@@ -303,9 +311,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/35x.html>
     * mongoose-unique-validator
     * null-loader
 
-## 3.5.0 (Missing number)
+## v3.5.0 (Missing number)
 
-## 3.4.7
+## v3.4.7
 
 * Improvement: Handle private pages on group deletion
 * Fix: Searching with `tag:xxx` syntax doesn't work
@@ -314,7 +322,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/35x.html>
 * I18n: Import data page
 * I18n: Group Management page
 
-## 3.4.6
+## v3.4.6
 
 * Feature: Tags
 * Feature: Dropdown to copy page path/URL/MarkdownLink
@@ -332,7 +340,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/35x.html>
     * null-loader
     * react-codemirror
 
-## 3.4.5
+## v3.4.5
 
 * Improvement: Pass autolink through the XSS filter according to CommonMark Spec
 * Fix: Update ElasticSearch index when deleting/duplicating pages
@@ -342,11 +350,11 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/35x.html>
     * growi-commons
     * xss
 
-## 3.4.4
+## v3.4.4
 
 * Fix: Comment component doesn't work
 
-## 3.4.3
+## v3.4.3
 
 * Improvement: Add 'antarctic' theme
 * Support Apply eslint-config-airbnb based rules
@@ -365,16 +373,16 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/35x.html>
     * react-i18next
     * string-width
 
-## 3.4.2
+## v3.4.2
 
 * Fix: Nofitication to Slack doesn't work
     * Introduced by 3.4.0
 
-## 3.4.1
+## v3.4.1
 
 * Fix: "Cannot find module 'stream-to-promise'" occured when build client with `FILE_UPLOAD=local`
 
-## 3.4.0
+## v3.4.0
 
 ### BREAKING CHANGES
 
@@ -403,7 +411,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react-dom
 
 
-## 3.3.10
+## v3.3.10
 
 * Feature: PlantUML and Blockdiag on presentation
 * Improvement: Render slides of presentation with GrowiRenderer
@@ -422,7 +430,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * webpack-cli
     * webpack-merge
 
-## 3.3.9
+## v3.3.9
 
 * Fix: Import from Qiita:Team doesn't work
     * Introduced by 3.3.0
@@ -431,7 +439,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade libs
     * react-bootstrap-typeahead
 
-## 3.3.8
+## v3.3.8
 
 * Fix: Move/Duplicate don't work
     * Introduced by 3.3.7
@@ -440,7 +448,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react
     * react-bootstrap-typeahead
 
-## 3.3.7
+## v3.3.7
 
 * Feature: Editor toolbar
 * Feature: `prefix:/path` searching syntax to filter with page path prefix
@@ -453,7 +461,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade libs
     * node-sass
 
-## 3.3.6
+## v3.3.6
 
 * Improvement: Site URL settings must be set
 * Improvement: Site URL settings can be set with environment variable
@@ -475,9 +483,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * sinon
     * sinon-chai
 
-## 3.3.5 (Missing number)
+## v3.3.5 (Missing number)
 
-## 3.3.4
+## v3.3.4
 
 * Improvement: SAML configuration with environment variables
 * Improvement: Upload file with pasting from clipboard
@@ -486,7 +494,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Fix: Connecting to MongoDB failed when processing migration
 * Support: Get ready to use new config management system
 
-## 3.3.3
+## v3.3.3
 
 * Feature: Show line numbers to a code block
 * Feature: Bulk update the scope of descendant pages when create/update page
@@ -501,12 +509,12 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * migrate-mongo
     * string-width
 
-## 3.3.2
+## v3.3.2
 
 * Fix: Specified Group ACL is not persisted correctly
     * Introduced by 3.3.0
 
-## 3.3.1
+## v3.3.1
 
 * Feature: NO_CDN Mode
 * Feature: Add option to show/hide restricted pages in list
@@ -521,9 +529,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * googleapis
     * passport-saml
 
-## 3.3.0 (Missing number)
+## v3.3.0 (Missing number)
 
-## 3.2.10
+## v3.2.10
 
 * Fix: Pages in trash are available to create
 * Fix: Couldn't create portal page under Crowi Classic Behavior
@@ -531,7 +539,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * I18n: Installer
 
 
-## 3.2.9
+## v3.2.9
 
 * Feature: Attachment Storing to MongoDB GridFS
 * Fix: row/col moving of Spreadsheet like GUI (Handsontable) doesn't work
@@ -540,7 +548,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * codemirror
     * react-codemirror2
 
-## 3.2.8
+## v3.2.8
 
 * Improvement: Add an option to use email for account link when using SAML federation
 * Fix: Editor layout is sometimes broken
@@ -550,14 +558,14 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * googleapis
     * react-dropzone
 
-## 3.2.7
+## v3.2.7
 
 * Feature: Import CSV/TSV/HTML table on Spreadsheet like GUI (Handsontable)
 * Fix: Pasting table data copied from Excel includes unnecessary line breaks
 * Fix: Page break Preset 1 for Presentation mode is broken
 * Fix: Login Form when LDAP login failed caused 500 Internal Server Error
 
-## 3.2.6
+## v3.2.6
 
 * Feature: Add select alignment buttons of Spreadsheet like GUI (Handsontable)
 * Improvement: Shrink the rows that have no diff of revision history page
@@ -569,7 +577,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * i18next-node-fs-backend
     * i18next-sprintf-postprocessor
 
-## 3.2.5
+## v3.2.5
 
 * Improvement: Expandable Spreadsheet like GUI (Handsontable)
 * Improvement: Move/Resize rows/columns of Spreadsheet like GUI (Handsontable)
@@ -582,7 +590,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * metismenu
     * sinon
 
-## 3.2.4
+## v3.2.4
 
 * Feature: Edit table with Spreadsheet like GUI (Handsontable)
 * Feature: Paging recent created in users home
@@ -601,13 +609,13 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * mongoose-unique-validator
     * multer
 
-## 3.2.3
+## v3.2.3
 
 * Feature: Kibela like layout
 * Improvement: Custom newpage separator for presentation view
 * Support: Shrink image size for themes which recently added
 
-## 3.2.2
+## v3.2.2
 
 * Feature: SAML Authentication (SSO)
 * Improvement: Add 'wood' theme
@@ -617,7 +625,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support Upgrade libs
     * style-loader
 
-## 3.2.1
+## v3.2.1
 
 * Feature: Import data from esa.io
 * Feature: Import data from Qiita:Team
@@ -632,20 +640,20 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * sass-loader
     * style-loader
 
-## 3.2.0
+## v3.2.0
 
 * Feature: HackMD integration so that user will be able to simultaneously edit with multiple people
 * Feature: Login with Twitter Account (OAuth)
 * Fix: The Initial scroll position is wrong when reloading the page
 
-## 3.1.14
+## v3.1.14
 
 * Improvement: Show help for header search box
 * Improvement: Add Markdown Cheatsheet to Editor component
 * Fix: Couldn't delete page completely from search result page
 * Fix: Tabs of trash page are broken
 
-## 3.1.13
+## v3.1.13
 
 * Feature: Global Notification
 * Feature: Send Global Notification with E-mail
@@ -660,7 +668,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react-dom
 
 
-## 3.1.12
+## v3.1.12
 
 * Feature: Add XSS Settings
 * Feature: Notify to Slack when comment
@@ -672,19 +680,19 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Fix: Invitation mail do not be sent
 * Fix: Edit template button on New Page modal doesn't work
 
-## 3.1.11
+## v3.1.11
 
 * Fix: OAuth doesn't work in production because callback URL field cannot be specified
     * Introduced by 3.1.9
 
-## 3.1.10
+## v3.1.10
 
 * Fix: Enter key on react-bootstrap-typeahead doesn't submit
     * Introduced by 3.1.9
 * Fix: CodeMirror of `/admin/customize` is broken
     * Introduced by 3.1.9
 
-## 3.1.9
+## v3.1.9
 
 * Feature: Login with Google Account (OAuth)
 * Feature: Login with GitHub Account (OAuth)
@@ -700,9 +708,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react-codemirror2
     * webpack
 
-## 3.1.8 (Missing number)
+## v3.1.8 (Missing number)
 
-## 3.1.7
+## v3.1.7
 
 * Fix: Update hidden input 'pageForm[grant]' when save with `Ctrl-S`
 * Fix: Show alert message when conflict
@@ -713,7 +721,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * sinon
     * sinon-chai
 
-## 3.1.6
+## v3.1.6
 
 * Feature: Support [blockdiag](http://blockdiag.com)
 * Feature: Add `BLOCKDIAG_URI` environment variable
@@ -722,7 +730,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * googleapis
     * throttle-debounce
 
-## 3.1.5
+## v3.1.5
 
 * Feature: Write comment with Markdown
 * Improvement: Support some placeholders for template page
@@ -742,13 +750,13 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * markdown-it-toc-and-anchor-with-slugid
 
 
-## 3.1.4 (Missing number)
+## v3.1.4 (Missing number)
 
 
-## 3.1.3 (Missing number)
+## v3.1.3 (Missing number)
 
 
-## 3.1.2
+## v3.1.2
 
 * Feature: Template page
 * Improvement: Add 'future' theme
@@ -776,14 +784,14 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react-clipboard.js
     * xss
 
-## 3.1.1
+## v3.1.1
 
 * Improvement: Add 'blue-night' theme
 * Improvement: List up pages which restricted for Group ACL
 * Fix: PageGroupRelation didn't remove when page is removed completely
 
 
-## 3.1.0
+## v3.1.0
 
 * Improvement: Group Access Control List - Select group modal
 * Improvement: Better input on mobile
@@ -803,7 +811,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * elasticsearch
     * googleapis
 
-## 3.0.13
+## v3.0.13
 
 * Improvement: Add Vim/Emacs/Sublime-Text icons for keybindings menu
 * Improvement: Add 'mono-blue' theme
@@ -816,14 +824,14 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * upgrade 'markdown-it-toc-and-anchor-with-slugid' and omit 'uslug'
 * Support: Optimize .eslintrc.js
 
-## 3.0.12
+## v3.0.12
 
 * Feature: Support Vim/Emacs/Sublime-Text keybindings
 * Improvement: Add some CodeMirror themes (Eclipse, Dracula)
 * Improvement: Dynamic loading for CodeMirror theme files from CDN
 * Improvement: Prevent XSS when move/redirect/duplicate
 
-## 3.0.11
+## v3.0.11
 
 * Fix: login.html is broken in iOS
 * Fix: Removing attachment is crashed
@@ -834,14 +842,14 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * googleapis
     * sinon
 
-## 3.0.10
+## v3.0.10
 
 * Improvement: Add 'nature' theme
 * Fix: Page list and Timeline layout for layout-growi
 * Fix: Adjust theme colors
     * Introduced by 3.0.9
 
-## 3.0.9
+## v3.0.9
 
 * Fix: Registering new LDAP User is failed
     * Introduced by 3.0.6
@@ -852,13 +860,13 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * normalize-path
     * style-loader
 
-## 3.0.8
+## v3.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
+## v3.0.7
 
 * Improvement: Enable to download an attached file with original name
 * Improvement: Use MongoDB for session store instead of Redis
@@ -868,7 +876,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Fix: Broken page path of timeline
     * Introduced by 3.0.4
 
-## 3.0.6
+## v3.0.6
 
 * Improvement: Automatically bind external accounts newly logged in to local accounts when username match
 * Improvement: Simplify configuration for Slack Web API
@@ -881,18 +889,18 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * sass-loader
     * uglifycss
 
-## 3.0.5
+## v3.0.5
 
 * Improvement: Update lsx icons and styles
 * Fix: lsx plugins doesn't show page names
 
-## 3.0.4
+## v3.0.4
 
 * Improvement: The option that switch whether add h1 section when create new page
 * Improvement: Encode page path that includes special character
 * Fix: Page-saving error after new page creation
 
-## 3.0.3
+## v3.0.3
 
 * Fix: Login page is broken in iOS
 * Fix: Hide presentation tab if portal page
@@ -903,7 +911,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Fix: Activating invited user form url is wrong
 * Support: Use postcss-loader and autoprefixer
 
-## 3.0.2
+## v3.0.2
 
 * Feature: Group Access Control List
 * Feature: Add site theme selector
@@ -919,11 +927,11 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react-bootstrap-typeahead
     * react-clipboard.js
 
-## 3.0.1 (Missing number)
+## v3.0.1 (Missing number)
 
-## 3.0.0 (Missing number)
+## v3.0.0 (Missing number)
 
-## 2.4.4
+## v2.4.4
 
 * Feature: Autoformat Markdown Table
 * Feature: highlight.js Theme Selector
@@ -935,7 +943,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * react, react-dom
     * codemirror, react-codemirror2
 
-## 2.4.3
+## v2.4.3
 
 * Improvement: i18n in `/admin`
 * Improvement: Add `SESSION_NAME` environment variable
@@ -944,7 +952,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * uglifycss
     * sinon-chai
 
-## 2.4.2
+## v2.4.2
 
 * Improvement: Ensure to set absolute url from root when attaching files when `FILE_UPLOAD=local`
 * Fix: Inline code blocks that includes doller sign are broken
@@ -954,7 +962,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * googleapis
     * markdown-it-plantuml
 
-## 2.4.1
+## v2.4.1
 
 * Feature: Custom Header HTML
 * Improvement: Add highlight.js languages
@@ -967,7 +975,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * axios
     * diff2html
 
-## 2.4.0
+## v2.4.0
 
 * Feature: Support Footnotes
 * Feature: Support Task lists
@@ -980,7 +988,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Improvement: Update `#revision-body` tab contents after saving with `Ctrl-S`
 * Fix: 500 Internal Server Error occures when basic-auth configuration is set
 
-## 2.3.9
+## v2.3.9
 
 * Fix: `Ctrl-/` doesn't work on Chrome
 * Fix: Close Shortcuts help with `Ctrl-/`, ESC key
@@ -988,7 +996,7 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade libs
     * googleapis
 
-## 2.3.8
+## v2.3.8
 
 * Feature: Suggest page path when creating pages
 * Improvement: Prevent keyboard shortcuts when modal is opened
@@ -999,19 +1007,19 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * style-loader
     * react-codemirror2
 
-## 2.3.7
+## v2.3.7
 
 * Fix: Open popups when `Ctrl+C` pressed
     * Introduced by 2.3.5
 
-## 2.3.6
+## v2.3.6
 
 * Feature: Theme Selector for Editor
 * Improvement: Remove unportalize button from crowi-plus layout
 * Fix: CSS for admin pages
 * Support: Shrink the size of libraries to include
 
-## 2.3.5
+## v2.3.5
 
 * Feature: Enhanced Editor by CodeMirror
 * Feature: Emoji AutoComplete
@@ -1027,26 +1035,26 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * mongoose-unique-validator
     * etc..
 
-## 2.3.4 (Missing number)
+## v2.3.4 (Missing number)
 
-## 2.3.3
+## v2.3.3
 
 * Fix: The XSS Library escapes inline code blocks
     * Degraded by 2.3.0
 * Fix: NPE occurs on Elasticsearch when initial access
 * Fix: Couldn't invite users(failed to create)
 
-## 2.3.2
+## v2.3.2
 
 * Improvement: Add LDAP group search options
 
-## 2.3.1
+## v2.3.1
 
 * Fix: Blockquote doesn't work
     * Degraded by 2.3.0
 * Fix: Couldn't create user with first LDAP logging in
 
-## 2.3.0
+## v2.3.0
 
 * Feature: LDAP Authentication
 * Improvement: Prevent XSS
@@ -1054,14 +1062,14 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade libs
     * express-pino-logger
 
-## 2.2.4
+## v2.2.4
 
 * Fix: googleapis v23.0.0 lost the function `oauth2Client.setCredentials`
     * Degraded by 2.2.2 updates
 * Fix: HeaderSearchBox didn't append 'q=' param when searching
     * Degraded by 2.2.3 updates
 
-## 2.2.3
+## v2.2.3
 
 * Fix: The server responds anything when using passport
     * Degraded by 2.2.2 updates
@@ -1070,9 +1078,9 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade react-bootstrap-typeahead
 * Improvement: Replace emojify.js with emojione
 
-## 2.2.2 (Missing number)
+## v2.2.2 (Missing number)
 
-## 2.2.1
+## v2.2.1
 
 * Feature: Duplicate page
 * Improve: Ensure that admin users can remove users waiting for approval
@@ -1080,22 +1088,22 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Support: Upgrade React to 16
 * Support: Upgrade outdated libs
 
-## 2.2.0
+## v2.2.0
 
 * Support: Merge official Crowi v1.6.3
 
-## 2.1.2
+## v2.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
+## v2.1.1
 
 * Fix: The problem that React Modal doesn't work
 * Support: Lock some packages(react, react-dom, mongoose)
 
-## 2.1.0
+## v2.1.0
 
 * Feature: Adopt Passport the authentication middleware
 * Feature: Selective batch deletion in search result page
@@ -1103,98 +1111,98 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
 * Fix: The problem that couldn't update user data in /me
 * Support: Upgrade outdated libs
 
-## 2.0.9
+## v2.0.9
 
 * Fix: Server is down when a guest user accesses to someone's private pages
 * Support: Merge official Crowi (master branch)
 * Support: Upgrade outdated libs
 
-## 2.0.8
+## v2.0.8
 
 * Fix: The problem that path including round bracket makes something bad
 * Fix: Recursively option processes also unexpedted pages
 * Fix: en-US translation
 
-## 2.0.7
+## v2.0.7
 
 * Improvement: Add recursively option for Delete/Move/Putback operation
 * Improvement: Comment layout and sort order (crowi-plus Enhanced Layout)
 
-## 2.0.6
+## v2.0.6
 
 * Fix: check whether `$APP_DIR/public/uploads` exists before creating symlink
     * Fixed in weseek/crowi-plus-docker
 
-## 2.0.5
+## v2.0.5
 
 * Improvement: Adjust styles for CodeMirror
 * Fix: File upload does not work when using crowi-plus-docker-compose and `FILE_UPLOAD=local` is set  
     * Fixed in weseek/crowi-plus-docker
 
-## 2.0.2 - 2.0.4 (Missing number)
+## v2.0.2 - 2.0.4 (Missing number)
 
-## 2.0.1
+## v2.0.1
 
 * Feature: Custom Script
 * Improvement: Adjust layout and styles for admin pages
 * Improvement: Record and show last updated date in user list page
 * Fix: Ignore Ctrl+(Shift+)Tab when editing (cherry-pick from the official)
 
-## 2.0.0
+## v2.0.0
 
 * Feature: Enabled to integrate with Slack using Incoming Webhooks
 * Support: Upgrade all outdated libs
 
-## 1.2.16
+## v1.2.16
 
 * Improvement: Condition for creating portal
 * Fix: Couldn't create new page after installation cleanly
 
-## 1.2.15
+## v1.2.15
 
 * Improvement: Optimize cache settings for express server
 * Improvement: Add a logo link to the affix header
 * Fix: Child pages under `/trash` are not shown when applying crowi-plus Simplified Behavior
 
-## 1.2.14
+## v1.2.14
 
 * Fix: Tabs(`a[data-toggle="tab"][href="#..."]`) push browser history twice
 * Fix: `a[href="#edit-form"]` still save history even when disabling pushing states option
 
-## 1.2.13
+## v1.2.13
 
 * Improvement: Enabled to switch whether to push states with History API when tabs changes
 * Fix: Layout of the Not Found page
 
-## 1.2.12 (Missing number)
+## v1.2.12 (Missing number)
 
-## 1.2.11
+## v1.2.11
 
 * Improvement: Enabled to open editing form from affix header
 * Improvement: Enabled to open editing form from each section headers
 
-## 1.2.10
+## v1.2.10
 
 * Fix: Revise `server:prod:container` script for backward compatibility
 
-## 1.2.9
+## v1.2.9
 
 * Improvement: Enabled to save with <kbd>⌘+S</kbd> on Mac
 * Improvement: Adopt the fastest logger 'pino'
 * Fix: The problem that can't upload profile image
 
-## 1.2.8
+## v1.2.8
 
 * Fix: The problem that redirect doesn't work when using 'crowi-plus Simplified Behavior'
 
-## 1.2.7 (Missing number)
+## v1.2.7 (Missing number)
 
-## 1.2.6
+## v1.2.6
 
 * Fix: The problem that page_list widget doesn't show the picture of revision.author
 * Fix: Change implementation of Bootstrap3 toggle switch for admin pages
 
-## 1.2.5
+## v1.2.5
 
 * Feature: crowi-plus Simplified Behavior
     * `/page` and `/page/` both shows the page
@@ -1202,136 +1210,136 @@ Upgrading Guide: <https://docs.growi.org/en/admin-guide/upgrading/34x.html>
     * All pages shows the list of sub pages
 * Improvement: Ensure to be able to disable Timeline feature
 
-## 1.2.4
+## v1.2.4
 
 * Fix: Internal Server Error has occurred when a guest user visited the page someone added "liked"
 
-## 1.2.3
+## v1.2.3
 
 * Improvement: Ensure to be able to use Presentation Mode even when not logged in
 * Improvement: Presentation Mode on IE11 (Experimental)
 * Fix: Broken Presentation Mode
 
-## 1.2.2
+## v1.2.2
 
 * Support: Merge official Crowi (master branch)
 
-## 1.2.1
+## v1.2.1
 
 * Fix: buildIndex error occured when access to installer
 
-## 1.2.0
+## v1.2.0
 
 * Support: Merge official Crowi v1.6.2
 
-## 1.1.12
+## v1.1.12
 
 * Feature: Remove Comment Button
 
-## 1.1.11
+## v1.1.11
 
 * Fix: Omit Comment form from page_list (crowi-plus Enhanced Layout)
 * Fix: .search-box is broken on sm/xs screen
 
-## 1.1.10
+## v1.1.10
 
 * Fix: .search-box is broken on sm/xs screen
 * Support: Browsable with IE11 (Experimental)
 
-## 1.1.9
+## v1.1.9
 
 * Improvement: Ensure to generate indices of Elasticsearch when installed
 * Fix: Specify the version of Bonsai Elasticsearch on Heroku
 
-## 1.1.8
+## v1.1.8
 
 * Fix: Depth of dropdown-menu when `.on-edit`
 * Fix: Error occured on saveing with `Ctrl-S`
 * Fix: Guest users browsing
 
-## 1.1.7
+## v1.1.7
 
 * Feature: Add option to allow guest users to browse
 * Fix: crowi-plus Enhanced Layout
 
-## 1.1.6
+## v1.1.6
 
 * Fix: crowi-plus Enhanced Layout
 
-## 1.1.5
+## v1.1.5
 
 * Fix: crowi-plus Enhanced Layout
 * Support: Merge official Crowi v1.6.1 master branch [573144b]
 
-## 1.1.4
+## v1.1.4
 
 * Feature: Ensure to select layout type from Admin Page
 * Feature: Add crowi-plus Enhanced Layout
 
-## 1.1.3
+## v1.1.3
 
 * Improvement: Use POSIX-style paths (bollowed crowi/crowi#219 by @Tomasom)
 
-## 1.1.2
+## v1.1.2
 
 * Imprv: Brushup fonts and styles
 * Fix: Ensure to specity revision id when saving with `Ctrl-S`
 
-## 1.1.1
+## v1.1.1
 
 * Feature: Save with `Ctrl-S`
 * Imprv: Brushup fonts and styles
 
-## 1.1.0
+## v1.1.0
 
 * Support: Merge official Crowi v1.6.1
 
-## 1.0.9
+## v1.0.9
 
 * Feature: Delete user
 * Feature: Upload other than images
 
-## 1.0.8
+## v1.0.8
 
 * Feature: Ensure to delete page completely
 * Feature: Ensure to delete redirect page
 * Fix: https access to Gravatar (this time for sure)
 
-## 1.0.7
+## v1.0.7
 
 * Feature: Keyboard navigation for search box
 * Improvement: Intelligent Search
 
-## 1.0.6
+## v1.0.6
 
 * Feature: Copy button that copies page path to clipboard
 * Fix: https access to Gravatar
 * Fix: server watching crash with `Error: read ECONNRESET` on Google Chrome
 
-## 1.0.5
+## v1.0.5
 
 * Feature: Ensure to use Gravatar for profile image
 
-## 1.0.4
+## v1.0.4
 
 * Improvement: Detach code blocks before preProcess
 * Support: Ensure to deploy to Heroku with INSTALL_PLUGINS env
 * Support: Ensure to load plugins easily when development
 
-## 1.0.3
+## v1.0.3
 
 * Improvement: Adjust styles
 
-## 1.0.2
+## v1.0.2
 
 * Improvement: For lsx
 
-## 1.0.1
+## v1.0.1
 
 * Feature: Custom CSS
 * Support: Notify build failure to Slask
 
-## 1.0.0
+## v1.0.0
 
 * Feature: Plugin mechanism
 * Feature: Switchable LineBreaks ON/OFF from admin page

+ 2 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "3.6.4-RC",
+  "version": "3.6.5-RC",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",
@@ -124,6 +124,7 @@
     "nodemailer-ses-transport": "~1.5.0",
     "npm-run-all": "^4.1.2",
     "openid-client": "=2.5.0",
+    "package-installed-version-sync": "^2.1.0",
     "passport": "^0.4.0",
     "passport-github": "^1.1.0",
     "passport-google-oauth20": "^2.0.0",

+ 5 - 0
src/client/js/app.jsx

@@ -34,6 +34,7 @@ import MyDraftList from './components/MyDraftList/MyDraftList';
 import UserPictureList from './components/User/UserPictureList';
 import TableOfContents from './components/TableOfContents';
 
+import AdminHome from './components/Admin/AdminHome/AdminHome';
 import UserGroupDetailPage from './components/Admin/UserGroupDetail/UserGroupDetailPage';
 import MarkdownSetting from './components/Admin/MarkdownSetting/MarkDownSetting';
 import UserManagement from './components/Admin/UserManagement';
@@ -51,6 +52,7 @@ import PageContainer from './services/PageContainer';
 import CommentContainer from './services/CommentContainer';
 import EditorContainer from './services/EditorContainer';
 import TagContainer from './services/TagContainer';
+import AdminHomeContainer from './services/AdminHomeContainer';
 import AdminCustomizeContainer from './services/AdminCustomizeContainer';
 import UserGroupDetailContainer from './services/UserGroupDetailContainer';
 import AdminUsersContainer from './services/AdminUsersContainer';
@@ -167,11 +169,13 @@ Object.keys(componentMappings).forEach((key) => {
 });
 
 // create unstated container instance for admin
+const adminHomeContainer = new AdminHomeContainer(appContainer);
 const adminCustomizeContainer = new AdminCustomizeContainer(appContainer);
 const adminUsersContainer = new AdminUsersContainer(appContainer);
 const adminExternalAccountsContainer = new AdminExternalAccountsContainer(appContainer);
 const adminMarkDownContainer = new AdminMarkDownContainer(appContainer);
 const adminContainers = {
+  'admin-home': adminHomeContainer,
   'admin-customize': adminCustomizeContainer,
   'admin-user-page': adminUsersContainer,
   'admin-external-account-setting': adminExternalAccountsContainer,
@@ -199,6 +203,7 @@ if (adminAppElem != null) {
  *  value: React Element
  */
 const adminComponentMappings = {
+  'admin-home': <AdminHome />,
   'admin-customize': <Customize />,
   'admin-user-page': <UserManagement />,
   'admin-external-account-setting': <ManageExternalAccount />,

+ 71 - 0
src/client/js/components/Admin/AdminHome/AdminHome.jsx

@@ -0,0 +1,71 @@
+import React, { Fragment } from 'react';
+import PropTypes from 'prop-types';
+import { withTranslation } from 'react-i18next';
+import loggerFactory from '@alias/logger';
+
+import { toastError } from '../../../util/apiNotification';
+
+import { createSubscribedElement } from '../../UnstatedUtils';
+import AppContainer from '../../../services/AppContainer';
+import AdminHomeContainer from '../../../services/AdminHomeContainer';
+import SystemInfomationTable from './SystemInfomationTable';
+import InstalledPluginTable from './InstalledPluginTable';
+
+const logger = loggerFactory('growi:admin');
+
+class AdminHome extends React.Component {
+
+  async componentDidMount() {
+    const { adminHomeContainer } = this.props;
+
+    try {
+      await adminHomeContainer.retrieveAdminHomeData();
+    }
+    catch (err) {
+      toastError(err);
+      adminHomeContainer.setState({ retrieveError: err });
+      logger.error(err);
+    }
+  }
+
+  render() {
+    const { t } = this.props;
+
+    return (
+      <Fragment>
+        <p>
+          {t('admin_top.wiki_administrator')}
+          <br></br>
+          {t('admin_top.assign_administrator')}
+        </p>
+
+        <div className="row mb-5">
+          <div className="col-md-12">
+            <h2 className="admin-setting-header">{t('admin_top.System Information')}</h2>
+            <SystemInfomationTable />
+          </div>
+        </div>
+
+        <div className="row mb-5">
+          <div className="col-md-12">
+            <h2 className="admin-setting-header">{t('admin_top.List of installed plugins')}</h2>
+            <InstalledPluginTable />
+          </div>
+        </div>
+      </Fragment>
+    );
+  }
+
+}
+
+const AdminHomeWrapper = (props) => {
+  return createSubscribedElement(AdminHome, props, [AppContainer, AdminHomeContainer]);
+};
+
+AdminHome.propTypes = {
+  t: PropTypes.func.isRequired, // i18next
+  appContainer: PropTypes.instanceOf(AppContainer).isRequired,
+  adminHomeContainer: PropTypes.instanceOf(AdminHomeContainer).isRequired,
+};
+
+export default withTranslation()(AdminHomeWrapper);

+ 53 - 0
src/client/js/components/Admin/AdminHome/InstalledPluginTable.jsx

@@ -0,0 +1,53 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { withTranslation } from 'react-i18next';
+
+import { createSubscribedElement } from '../../UnstatedUtils';
+import AppContainer from '../../../services/AppContainer';
+import AdminHomeContainer from '../../../services/AdminHomeContainer';
+
+class InstalledPluginTable extends React.Component {
+
+  render() {
+    const { t, adminHomeContainer } = this.props;
+
+    return (
+      <table className="table table-bordered">
+        <thead>
+          <tr>
+            <th className="text-center">{ t('admin_top.Package name') }</th>
+            <th className="text-center">{ t('admin_top.Specified version') }</th>
+            <th className="text-center">{ t('admin_top.Installed version') }</th>
+          </tr>
+        </thead>
+        <tbody>
+          { adminHomeContainer.state.installedPlugins.map((plugin) => {
+            return (
+              <tr key={plugin.name}>
+                <td>{ plugin.name }</td>
+                <td className="text-center">{ plugin.requiredVersion }</td>
+                <td className="text-center">{ plugin.installedVersion }</td>
+              </tr>
+            );
+          }) }
+        </tbody>
+      </table>
+    );
+  }
+
+}
+
+InstalledPluginTable.propTypes = {
+  t: PropTypes.func.isRequired, // i18next
+  appContainer: PropTypes.instanceOf(AppContainer).isRequired,
+  adminHomeContainer: PropTypes.instanceOf(AdminHomeContainer).isRequired,
+};
+
+/**
+ * Wrapper component for using unstated
+ */
+const InstalledPluginTableWrapper = (props) => {
+  return createSubscribedElement(InstalledPluginTable, props, [AppContainer, AdminHomeContainer]);
+};
+
+export default withTranslation()(InstalledPluginTableWrapper);

+ 53 - 0
src/client/js/components/Admin/AdminHome/SystemInfomationTable.jsx

@@ -0,0 +1,53 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { withTranslation } from 'react-i18next';
+
+import { createSubscribedElement } from '../../UnstatedUtils';
+import AppContainer from '../../../services/AppContainer';
+import AdminHomeContainer from '../../../services/AdminHomeContainer';
+
+class SystemInformationTable extends React.Component {
+
+  render() {
+    const { adminHomeContainer } = this.props;
+
+    return (
+      <table className="table table-bordered">
+        <tbody>
+          <tr>
+            <th className="col-sm-4">GROWI</th>
+            <td>{ adminHomeContainer.state.growiVersion }</td>
+          </tr>
+          <tr>
+            <th>node.js</th>
+            <td>{ adminHomeContainer.state.nodeVersion }</td>
+          </tr>
+          <tr>
+            <th>npm</th>
+            <td>{ adminHomeContainer.state.npmVersion }</td>
+          </tr>
+          <tr>
+            <th>yarn</th>
+            <td>{ adminHomeContainer.state.yarnVersion }</td>
+          </tr>
+        </tbody>
+      </table>
+    );
+  }
+
+}
+
+SystemInformationTable.propTypes = {
+  t: PropTypes.func.isRequired, // i18next
+  appContainer: PropTypes.instanceOf(AppContainer).isRequired,
+  adminHomeContainer: PropTypes.instanceOf(AdminHomeContainer).isRequired,
+};
+
+/**
+ * Wrapper component for using unstated
+ */
+const SystemInformationTableWrapper = (props) => {
+  return createSubscribedElement(SystemInformationTable, props, [AppContainer, AdminHomeContainer]);
+};
+
+export default withTranslation()(SystemInformationTableWrapper);

+ 9 - 9
src/client/js/components/Admin/App/AppSettingsPage.jsx

@@ -39,35 +39,35 @@ class AppSettingsPage extends React.Component {
       <Fragment>
         <div className="row">
           <div className="col-md-12">
-            <h2>{t('App Settings')}</h2>
+            <h2 className="admin-setting-header">{t('App Settings')}</h2>
             <AppSetting />
           </div>
         </div>
 
-        <div className="row">
+        <div className="row mt-5">
           <div className="col-md-12">
-            <h2>{t('Site URL settings')}</h2>
+            <h2 className="admin-setting-header">{t('Site URL settings')}</h2>
             <SiteUrlSetting />
           </div>
         </div>
 
-        <div className="row">
+        <div className="row mt-5">
           <div className="col-md-12">
-            <h2>{t('app_setting.Mail settings')}</h2>
+            <h2 className="admin-setting-header">{t('app_setting.Mail settings')}</h2>
             <MailSetting />
           </div>
         </div>
 
-        <div className="row">
+        <div className="row mt-5">
           <div className="col-md-12">
-            <h2>{t('app_setting.AWS settings')}</h2>
+            <h2 className="admin-setting-header">{t('app_setting.AWS settings')}</h2>
             <AwsSetting />
           </div>
         </div>
 
-        <div className="row">
+        <div className="row mt-5">
           <div className="col-md-12">
-            <h2>{t('app_setting.Plugin settings')}</h2>
+            <h2 className="admin-setting-header">{t('app_setting.Plugin settings')}</h2>
             <PluginSetting />
           </div>
         </div>

+ 15 - 12
src/client/js/components/PageEditor/CodeMirrorEditor.jsx

@@ -18,6 +18,7 @@ import PreventMarkdownListInterceptor from './PreventMarkdownListInterceptor';
 import MarkdownTableInterceptor from './MarkdownTableInterceptor';
 import mtu from './MarkdownTableUtil';
 import HandsontableModal from './HandsontableModal';
+import EditorIcon from './EditorIcon';
 
 const loadScript = require('simple-load-script');
 const loadCssSync = require('load-css-file');
@@ -648,13 +649,14 @@ export default class CodeMirrorEditor extends AbstractEditor {
 
   getNavbarItems() {
     return [
+      /* eslint-disable max-len */
       <Button
         key="nav-item-bold"
         bsSize="small"
         title="Bold"
         onClick={this.createReplaceSelectionHandler('**', '**')}
       >
-        <img src="/images/icons/editor/bold.svg" alt="icon-bold" height="13" />
+        <EditorIcon icon="Bold" />
       </Button>,
       <Button
         key="nav-item-italic"
@@ -662,7 +664,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Italic"
         onClick={this.createReplaceSelectionHandler('*', '*')}
       >
-        <img src="/images/icons/editor/italic.svg" alt="icon-italic" height="13" />
+        <EditorIcon icon="Italic" />
       </Button>,
       <Button
         key="nav-item-strikethrough"
@@ -670,7 +672,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Strikethrough"
         onClick={this.createReplaceSelectionHandler('~~', '~~')}
       >
-        <img src="/images/icons/editor/strikethrough.svg" alt="icon-strikethrough" height="13" />
+        <EditorIcon icon="Strikethrough" />
       </Button>,
       <Button
         key="nav-item-header"
@@ -678,7 +680,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Heading"
         onClick={this.makeHeaderHandler}
       >
-        <img src="/images/icons/editor/header.svg" alt="icon-header" height="13" />
+        <EditorIcon icon="Heading" />
       </Button>,
       <Button
         key="nav-item-code"
@@ -686,7 +688,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Inline Code"
         onClick={this.createReplaceSelectionHandler('`', '`')}
       >
-        <img src="/images/icons/editor/code.svg" alt="icon-code" height="13" />
+        <EditorIcon icon="InlineCode" />
       </Button>,
       <Button
         key="nav-item-quote"
@@ -694,7 +696,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Quote"
         onClick={this.createAddPrefixToEachLinesHandler('> ')}
       >
-        <img src="/images/icons/editor/quote.svg" alt="icon-quote" height="13" />
+        <EditorIcon icon="Quote" />
       </Button>,
       <Button
         key="nav-item-ul"
@@ -702,7 +704,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="List"
         onClick={this.createAddPrefixToEachLinesHandler('- ')}
       >
-        <img src="/images/icons/editor/list-ul.svg" alt="icon-list-ul" height="13" />
+        <EditorIcon icon="List" />
       </Button>,
       <Button
         key="nav-item-ol"
@@ -710,7 +712,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Numbered List"
         onClick={this.createAddPrefixToEachLinesHandler('1. ')}
       >
-        <img src="/images/icons/editor/list-ol.svg" alt="icon-list-ol" height="13" />
+        <EditorIcon icon="NumberedList" />
       </Button>,
       <Button
         key="nav-item-checkbox"
@@ -718,7 +720,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Check List"
         onClick={this.createAddPrefixToEachLinesHandler('- [ ] ')}
       >
-        <img src="/images/icons/editor/check.svg" alt="icon-check" height="13" />
+        <EditorIcon icon="CheckList" />
       </Button>,
       <Button
         key="nav-item-link"
@@ -726,7 +728,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Link"
         onClick={this.createReplaceSelectionHandler('[', ']()')}
       >
-        <img src="/images/icons/editor/link.svg" alt="icon-link" height="13" />
+        <EditorIcon icon="Link" />
       </Button>,
       <Button
         key="nav-item-image"
@@ -734,7 +736,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Image"
         onClick={this.createReplaceSelectionHandler('![', ']()')}
       >
-        <img src="/images/icons/editor/picture.svg" alt="icon-picture" height="13" />
+        <EditorIcon icon="Image" />
       </Button>,
       <Button
         key="nav-item-table"
@@ -742,8 +744,9 @@ export default class CodeMirrorEditor extends AbstractEditor {
         title="Table"
         onClick={this.showHandsonTableHandler}
       >
-        <img src="/images/icons/editor/table.svg" alt="icon-table" height="13" />
+        <EditorIcon icon="Table" />
       </Button>,
+      /* eslint-able max-len */
     ];
   }
 

+ 89 - 0
src/client/js/components/PageEditor/EditorIcon.jsx

@@ -0,0 +1,89 @@
+/* eslint-disable max-len */
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const EditorIcon = (props) => {
+
+  switch (props.icon) {
+    case 'Bold':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 10.9 14">
+          <path d="M0 0h5.6c3 0 4.7 1.1 4.7 3.4a3.1 3.1 0 0 1-2.5 3.1 3.7 3.7 0 0 1 3.1 3.5c0 2.9-1.4 4-4.2 4H0zm5.2 6.5c2.7 0 2.6-1.4 2.6-3.1S7.9.7 5.6.7H2.3v5.8zm-2.9 6.6h3.4c2.1 0 2.7-1.1 2.7-3.1s0-2.8-3.2-2.8H2.3z" />
+        </svg>
+      );
+    case 'Italic':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 8.6 13.9">
+          <path d="M8.1 0a.6.6 0 0 1 .5.6c0 .3-.2.6-.7.6H6.2L3.8 12.8h1.8c.2 0 .4.3.4.5a.7.7 0 0 1-.7.6H.5c-.3 0-.5-.4-.5-.6s.4-.6.7-.6h1.7L4.9 1.2H3.1a.5.5 0 0 1-.5-.5c0-.3.1-.7.8-.7z" />
+        </svg>
+      );
+    case 'Strikethrough':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 19.5 14">
+          <path d="M5.8 6.2H9C7.2 5.7 6.3 5 6.3 3.8a2.2 2.2 0 0 1 .9-1.9 4.3 4.3 0 0 1 2.5-.7 4.3 4.3 0 0 1 2.5.7 3.1 3.1 0 0 1 1.1 1.6.7.7 0 0 0 .6.4h.3a.7.7 0 0 0 .4-.8A3.6 3.6 0 0 0 13.1 1a6.7 6.7 0 0 0-6-.5 3.1 3.1 0 0 0-1.7 1.3 3.6 3.6 0 0 0-.6 2 2.9 2.9 0 0 0 1 2.3zm7 2.5a2 2 0 0 1 .6 1.4 2.4 2.4 0 0 1-1 1.9 3.7 3.7 0 0 1-2.5.7 4.6 4.6 0 0 1-3-.8 3.7 3.7 0 0 1-1.2-2 .6.6 0 0 0-.6-.5h-.2a.7.7 0 0 0-.5.8 4.1 4.1 0 0 0 1.5 2.5A6 6 0 0 0 9.8 14a7.5 7.5 0 0 0 2.6-.5 4.9 4.9 0 0 0 1.8-1.4 4.3 4.3 0 0 0 .6-2.2 5 5 0 0 0-.2-1.2zM.4 7.9a.7.7 0 0 1-.4-.5.4.4 0 0 1 .4-.4h18.8a.4.4 0 0 1 .3.6c0 .1-.1.2-.2.3z" />
+        </svg>
+      );
+    case 'Heading':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 13.7 14">
+          <path d="M10.2 0h2.9a.6.6 0 0 1 .6.6.6.6 0 0 1-.6.6h-.8v11.6h.8a.6.6 0 0 1 .6.6.6.6 0 0 1-.6.6h-2.9a.6.6 0 0 1-.6-.6.6.6 0 0 1 .6-.6h.8V7.2H2.7v5.6h.8a.6.6 0 0 1 .6.6.6.6 0 0 1-.6.6H.6a.6.6 0 0 1-.6-.6.6.6 0 0 1 .6-.6h.7V1.2H.6A.6.6 0 0 1 0 .6.6.6 0 0 1 .6 0h2.9a.6.6 0 0 1 .6.6.6.6 0 0 1-.6.6h-.8v4.9H11V1.2h-.8a.6.6 0 0 1-.6-.6.6.6 0 0 1 .6-.6z" />
+        </svg>
+      );
+    case 'InlineCode':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 18.1 14">
+          <path d="M17.8 7.9l-4 3.8a.5.5 0 0 1-.8 0 .5.5 0 0 1 0-.8L16.8 7 13 3.2a.6.6 0 0 1 0-.9.5.5 0 0 1 .8 0l4 3.8a1.3 1.3 0 0 1 0 1.8zM5.2 2.3a.7.7 0 0 1 0 .9L1.3 7l3.9 3.9a.6.6 0 0 1 0 .8.6.6 0 0 1-.9 0L.4 7.9a1.3 1.3 0 0 1 0-1.8l3.9-3.8a.6.6 0 0 1 .9 0zM11.5.8L7.8 13.6a.6.6 0 0 1-.7.4.6.6 0 0 1-.5-.8L10.3.4a.7.7 0 0 1 .8-.4.6.6 0 0 1 .4.8z" />
+        </svg>
+      );
+    case 'Quote':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 17 12">
+          <path d="M5 0H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a1.7 1.7 0 0 0 1-.3V10a.9.9 0 0 1-1 1H3v1h2a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 6H2a.9.9 0 0 1-1-1V2a.9.9 0 0 1 1-1h3a.9.9 0 0 1 1 1v3a.9.9 0 0 1-1 1zm10-6h-3a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a1.7 1.7 0 0 0 1-.3V10a.9.9 0 0 1-1 1h-2v1h2a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 6h-3a.9.9 0 0 1-1-1V2a.9.9 0 0 1 1-1h3a.9.9 0 0 1 1 1v3a.9.9 0 0 1-1 1z" />
+        </svg>
+      );
+    case 'List':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 21.6 13.5">
+          <path d="M6.4 1.5h14.5a.7.7 0 0 0 .7-.7.7.7 0 0 0-.7-.7H6.4a.8.8 0 0 0-.8.7.8.8 0 0 0 .8.7zm0 6h14.5a.7.7 0 0 0 .7-.7.7.7 0 0 0-.7-.7H6.4a.8.8 0 0 0-.8.7.8.8 0 0 0 .8.7zm0 6h14.5a.7.7 0 0 0 .7-.7.7.7 0 0 0-.7-.7H6.4a.8.8 0 0 0-.8.7.8.8 0 0 0 .8.7zM.9 1.5h1a.8.8 0 0 0 .9-.7.8.8 0 0 0-.9-.8h-1a.8.8 0 0 0-.9.7.8.8 0 0 0 .9.8zm0 6h1a.8.8 0 0 0 .9-.7.8.8 0 0 0-.9-.8h-1a.8.8 0 0 0-.9.7.8.8 0 0 0 .9.8zm0 6h1a.8.8 0 0 0 .9-.7.8.8 0 0 0-.9-.7h-1a.8.8 0 0 0-.9.7.8.8 0 0 0 .9.7z" />
+        </svg>
+      );
+    case 'NumberedList':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 23.7 16">
+          <path d="M23.7 2a.8.8 0 0 1-.8.8H6.6a.8.8 0 0 1-.7-.8.7.7 0 0 1 .7-.7h16.3a.7.7 0 0 1 .8.7zM6.6 8.7h16.3a.7.7 0 0 0 .8-.7.8.8 0 0 0-.8-.8H6.6a.8.8 0 0 0-.7.8.7.7 0 0 0 .7.7zm0 5.9h16.3a.7.7 0 0 0 .8-.7.7.7 0 0 0-.8-.7H6.6a.7.7 0 0 0-.7.7.7.7 0 0 0 .7.7zM1.5.5V4h.6V0h-.5L.7.5v.4l.8-.4zM.9 9.6l.3-.3c.9-.9 1.4-1.5 1.4-2.2a1.2 1.2 0 0 0-1.3-1.2h-.1a1.4 1.4 0 0 0-1.2.6l.3.4a1.2 1.2 0 0 1 .9-.5.6.6 0 0 1 .8.6v.2c0 .6-.4 1.1-1.5 2.1l-.4.4v.3h2.6v-.4zm.9 4.1a1 1 0 0 0 .7-.9 1 1 0 0 0-1.1-1 2 2 0 0 0-1.1.3v.4l.8-.2c.5 0 .8.2.8.6s-.5.7-.9.7H.7v.4H1c.6 0 1.1.2 1.1.8a.8.8 0 0 1-.9.8l-.9-.3-.2.4a2 2 0 0 0 1.1.3c1 0 1.5-.6 1.5-1.2a1.2 1.2 0 0 0-.9-1.1z" />
+        </svg>
+      );
+    case 'CheckList':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 14.4 16">
+          <path d="M13.9 5.5a.5.5 0 0 1 .5.5v9a1.1 1.1 0 0 1-1.1 1H1a1.1 1.1 0 0 1-1-1V2.6a1.1 1.1 0 0 1 1-1h7.1a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5H1V15h12.3V6a.6.6 0 0 1 .6-.5zM3.6 8.3a.5.5 0 0 0 0 .7l2.5 2.5a.8.8 0 0 0 1.1 0h.1l7-10.7c.1-.2.1-.6-.2-.7a.5.5 0 0 0-.7.1L6.6 10.6 4.3 8.3a.5.5 0 0 0-.7 0z" />
+        </svg>
+      );
+    case 'Link':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 16 16">
+          <path d="M4.6 11.4l.4.2h.2v-.2l6.1-6.1a.4.4 0 0 0 .1-.3.5.5 0 0 0-.5-.5h-.3l-6 6.2a.6.6 0 0 0-.1.4c0 .1 0 .3.1.3zm2.8-1a2 2 0 0 1 0 1.1 4.1 4.1 0 0 1-.5.9l-2.1 1.9a1.9 1.9 0 0 1-1.5.7 2 2 0 0 1-1.6-.7 1.9 1.9 0 0 1-.7-1.5 2 2 0 0 1 .7-1.6l1.9-2.1a2 2 0 0 1 2.2-.5l.8-.8a3.2 3.2 0 0 0-1.4-.3 3.3 3.3 0 0 0-2.3.9L1 10.5A3.2 3.2 0 0 0 .9 15H1a2.9 2.9 0 0 0 2.3 1 3.2 3.2 0 0 0 2.3-1l2-1.9a4.6 4.6 0 0 0 .9-1.7 2.9 2.9 0 0 0-.3-1.8zM15 1a2.5 2.5 0 0 0-1-.8 3.1 3.1 0 0 0-3.5.8L8.4 2.9a3.1 3.1 0 0 0-.9 1.8 3.2 3.2 0 0 0 .3 1.9l.8-.8a2 2 0 0 1 0-1.1 2.2 2.2 0 0 1 .5-1.1l2.1-1.9.3-.3.4-.2.4-.2h.5a1.9 1.9 0 0 1 1.5.7 2 2 0 0 1 .7 1.6 1.9 1.9 0 0 1-.7 1.5l-2 2.1-.7.4a1.5 1.5 0 0 1-.9.2h-.4l-.8.8H12l1-.7 2-2.1A3 3 0 0 0 15 1z" />
+        </svg>
+      );
+    case 'Image':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 19 16">
+          <path d="M17.8 0H1.2A1.2 1.2 0 0 0 0 1.2v13.6A1.2 1.2 0 0 0 1.2 16h16.6a1.2 1.2 0 0 0 1.2-1.2V1.2a1.4 1.4 0 0 0-.2-.6.8.8 0 0 0-.4-.4zm0 14.8H1.2v-3.5l4.7-4.6 5 4.9.3.2.5-.2 2.1-1.9 3.9 4h.1v1.1zm0-2.8l-3.5-3.5-.4-.2h-.4l-2.2 2-4.9-4.8-.4-.2c-.2 0-.4 0-.5.2L1.2 9.7V1.2h16.6V12zm-4.2-6.1h.6a1.1 1.1 0 0 0 .6-1.1 1.2 1.2 0 0 0-1.2-1.1 1.3 1.3 0 0 0-1.2 1.2 1.2 1.2 0 0 0 .4.8 1.1 1.1 0 0 0 .8.3z" />
+        </svg>
+      );
+    case 'Table':
+      return (
+        <svg xmlns="http://www.w3.org/2000/svg" height="13" viewBox="0 0 20.3 16">
+          <path d="M19.1 16H1.2A1.2 1.2 0 0 1 0 14.8V1.2A1.2 1.2 0 0 1 1.2 0h17.9a1.2 1.2 0 0 1 1.2 1.2v13.6a1.2 1.2 0 0 1-1.2 1.2zm-5.2-4.3v3.2h5.3v-3.2zm-6.4 0v3.2h5.3v-3.2zm-6.4 0v3.2h5.3v-3.2zm12.8-4.2v3.2h5.3V7.5zm-6.4 0v3.2h5.3V7.5zm-6.4 0v3.2h5.3V7.5zm12.8-4.3v3.2h5.3V3.2zm-6.4 0v3.2h5.3V3.2zm-6.4 0v3.2h5.3V3.2z" />
+        </svg>
+      );
+  }
+
+
+};
+
+EditorIcon.propTypes = {
+  icon: PropTypes.string.isRequired,
+};
+
+export default EditorIcon;

+ 61 - 0
src/client/js/services/AdminHomeContainer.js

@@ -0,0 +1,61 @@
+import { Container } from 'unstated';
+
+import loggerFactory from '@alias/logger';
+
+import { toastError } from '../util/apiNotification';
+
+// eslint-disable-next-line no-unused-vars
+const logger = loggerFactory('growi:services:AdminHomeContainer');
+
+/**
+ * Service container for admin home page (AdminHome.jsx)
+ * @extends {Container} unstated Container
+ */
+export default class AdminHomeContainer extends Container {
+
+  constructor(appContainer) {
+    super();
+
+    this.appContainer = appContainer;
+
+    this.state = {
+      retrieveError: null,
+      growiVersion: '',
+      nodeVersion: '',
+      npmVersion: '',
+      yarnVersion: '',
+      installedPlugins: [],
+    };
+
+  }
+
+  /**
+   * Workaround for the mangling in production build to break constructor.name
+   */
+  static getClassName() {
+    return 'AdminHomeContainer';
+  }
+
+  /**
+   * retrieve admin home data
+   */
+  async retrieveAdminHomeData() {
+    try {
+      const response = await this.appContainer.apiv3.get('/admin-home/');
+      const { adminHomeParams } = response.data;
+
+      this.setState({
+        growiVersion: adminHomeParams.growiVersion,
+        nodeVersion: adminHomeParams.nodeVersion,
+        npmVersion: adminHomeParams.npmVersion,
+        yarnVersion: adminHomeParams.yarnVersion,
+        installedPlugins: adminHomeParams.installedPlugins,
+      });
+    }
+    catch (err) {
+      logger.error(err);
+      toastError(new Error('Failed to fetch data'));
+    }
+  }
+
+}

+ 3 - 0
src/client/styles/agile-admin/inverse/colors/_apply-colors-dark.scss

@@ -150,6 +150,9 @@ legend {
     border-color: $border;
   }
 }
+.editor-container .navbar-editor svg {
+  fill: $bodytext;
+}
 
 /*
  * GROWI admin page #themeOptions

+ 2 - 1
src/client/styles/scss/_handsontable.scss

@@ -42,7 +42,8 @@
   }
 
   .data-import-form {
-    background-color: #f8f8f8;
+    color: $headingtext;
+    background-color: $navbar-default-bg;
 
     .btn + .btn {
       margin-left: 5px;

+ 8 - 2
src/server/models/config.js

@@ -84,8 +84,14 @@ module.exports = function(crowi) {
       'mail:smtpUser'     : undefined,
       'mail:smtpPassword' : undefined,
 
-      'google:clientId'     : undefined,
-      'google:clientSecret' : undefined,
+      'security:passport-google:clientId'     : undefined,
+      'security:passport-google:clientSecret' : undefined,
+
+      'security:passport-github:clientId': undefined,
+      'security:passport-github:clientSecret': undefined,
+
+      'security:passport-twitter:clientId': undefined,
+      'security:passport-twitter:clientSecret': undefined,
 
       'plugin:isEnabledPlugins' : true,
 

+ 13 - 9
src/server/plugins/plugin-utils.js

@@ -1,6 +1,7 @@
 const path = require('path');
 const fs = require('graceful-fs');
 const logger = require('@alias/logger')('growi:plugins:plugin-utils');
+const packageInstalledVersionSync = require('package-installed-version-sync');
 
 const PluginUtilsV2 = require('./plugin-utils-v2');
 
@@ -48,8 +49,8 @@ class PluginUtils {
    *
    * @returns array of objects
    *   [
-   *     { name: 'growi-plugin-...', version: '1.0.0' },
-   *     { name: 'growi-plugin-...', version: '1.0.0' },
+   *     { name: 'growi-plugin-...', requiredVersion: '^1.0.0', installedVersion: '1.0.0' },
+   *     { name: 'growi-plugin-...', requiredVersion: '^1.0.0', installedVersion: '1.0.0' },
    *     ...
    *   ]
    *
@@ -68,14 +69,17 @@ class PluginUtils {
     const json = JSON.parse(content);
     const deps = json.dependencies || {};
 
-    const objs = {};
-    Object.keys(deps).forEach((name) => {
-      if (/^(crowi|growi)-plugin-/.test(name)) {
-        objs[name] = deps[name];
-      }
+    const pluginNames = Object.keys(deps).filter((name) => {
+      return /^(crowi|growi)-plugin-/.test(name);
     });
 
-    return objs;
+    return pluginNames.map((name) => {
+      return {
+        name,
+        requiredVersion: deps[name],
+        installedVersion: packageInstalledVersionSync(name),
+      };
+    });
   }
 
   /**
@@ -87,7 +91,7 @@ class PluginUtils {
    */
   listPluginNames(rootDir) {
     const plugins = this.listPlugins(rootDir);
-    return Object.keys(plugins);
+    return plugins.map((plugin) => { return plugin.name });
   }
 
 }

+ 1 - 5
src/server/routes/admin.js

@@ -20,12 +20,10 @@ module.exports = function(crowi, app) {
   } = crowi;
 
   const recommendedWhitelist = require('@commons/service/xss/recommended-whitelist');
-  const PluginUtils = require('../plugins/plugin-utils');
   const ApiResponse = require('../util/apiResponse');
   const importer = require('../util/importer')(crowi);
 
   const searchEvent = crowi.event('search');
-  const pluginUtils = new PluginUtils();
 
   const MAX_PAGE_LIST = 50;
   const actions = {};
@@ -99,9 +97,7 @@ module.exports = function(crowi, app) {
   });
 
   actions.index = function(req, res) {
-    return res.render('admin/index', {
-      plugins: pluginUtils.listPlugins(crowi.rootDir),
-    });
+    return res.render('admin/index');
   };
 
   // app.get('/admin/app'                  , admin.app.index);

+ 77 - 0
src/server/routes/apiv3/admin-home.js

@@ -0,0 +1,77 @@
+const express = require('express');
+const PluginUtils = require('../../plugins/plugin-utils');
+
+const pluginUtils = new PluginUtils();
+
+const router = express.Router();
+
+/**
+ * @swagger
+ *  tags:
+ *    name: adminHome
+ */
+
+/**
+ * @swagger
+ *
+ *  components:
+ *    schemas:
+ *      SystemInformationParams:
+ *        type: object
+ *        properties:
+ *          growiVersion:
+ *            type: string
+ *            description: version of growi
+ *          nodeVersion:
+ *            type: string
+ *            description: version of node
+ *          npmVersion:
+ *            type: string
+ *            description: version of npm
+ *          yarnVersion:
+ *            type: string
+ *            description: version of yarn
+ *      InstalledPluginsParams:
+ *        type: object
+ *        properties:
+ *          installedPlugins:
+ *            type: object
+ *            description: installed plugins
+ */
+
+module.exports = (crowi) => {
+  const loginRequiredStrictly = require('../../middleware/login-required')(crowi);
+  const adminRequired = require('../../middleware/admin-required')(crowi);
+
+  /**
+   * @swagger
+   *
+   *    /admin-home/:
+   *      get:
+   *        tags: [adminHome]
+   *        description: Get adminHome parameters
+   *        responses:
+   *          200:
+   *            description: params of adminHome
+   *            content:
+   *              application/json:
+   *                schema:
+   *                  properties:
+   *                    adminHomeParams:
+   *                      type: object
+   *                      description: adminHome params
+   */
+  router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
+    const adminHomeParams = {
+      growiVersion: crowi.version,
+      nodeVersion: crowi.runtimeVersions.versions.node ? crowi.runtimeVersions.versions.node.version.version : '-',
+      npmVersion: crowi.runtimeVersions.versions.npm ? crowi.runtimeVersions.versions.npm.version.version : '-',
+      yarnVersion: crowi.runtimeVersions.versions.yarn ? crowi.runtimeVersions.versions.yarn.version.version : '-',
+      installedPlugins: pluginUtils.listPlugins(crowi.rootDir),
+    };
+
+    return res.apiv3({ adminHomeParams });
+  });
+
+  return router;
+};

+ 2 - 2
src/server/routes/apiv3/customize-setting.js

@@ -116,7 +116,7 @@ module.exports = (crowi) => {
     ],
     highlight: [
       body('highlightJsStyle').isString().isIn([
-        'github', 'github-gist', 'atom-one-light', 'xcode', 'vs', 'atom-one-dark', 'hybrid', 'monokai', 'tororrow-night', 'vs2015',
+        'github', 'github-gist', 'atom-one-light', 'xcode', 'vs', 'atom-one-dark', 'hybrid', 'monokai', 'tomorrow-night', 'vs2015',
       ]),
       body('highlightJsStyleBorder').isBoolean(),
     ],
@@ -136,7 +136,7 @@ module.exports = (crowi) => {
    *        tags: [CustomizeSetting, apiv3]
    *        operationId: getCustomizeSetting
    *        summary: /_api/v3/customize-setting
-   *        description: Get customize paramators
+   *        description: Get customize parameters
    *        responses:
    *          200:
    *            description: params of customize

+ 2 - 0
src/server/routes/apiv3/index.js

@@ -13,6 +13,8 @@ module.exports = (crowi) => {
 
   router.use('/healthcheck', require('./healthcheck')(crowi));
 
+  router.use('/admin-home', require('./admin-home')(crowi));
+
   router.use('/markdown-setting', require('./markdown-setting')(crowi));
 
   router.use('/app-settings', require('./app-settings')(crowi));

+ 1 - 1
src/server/routes/apiv3/markdown-setting.js

@@ -97,7 +97,7 @@ module.exports = (crowi) => {
    *        tags: [MarkDownSetting, apiv3]
    *        operationId: getMarkdownSetting
    *        summary: /_api/v3/markdown-setting
-   *        description: Get markdown paramators
+   *        description: Get markdown parameters
    *        responses:
    *          200:
    *            description: params of markdown

+ 10 - 0
src/server/routes/login-passport.js

@@ -258,6 +258,16 @@ module.exports = function(crowi, app) {
       username: response.displayName,
       name: `${response.name.givenName} ${response.name.familyName}`,
     };
+
+    // Emails are not empty if it exists
+    // See https://github.com/passport/express-4.x-facebook-example/blob/dfce5495d0313174a1b5039bab2c2dcda7e0eb61/views/profile.ejs
+    // Both Facebook and Google use OAuth 2.0, the code is similar
+    // See https://github.com/jaredhanson/passport-google-oauth2/blob/723e8f3e8e711275f89e0163e2c77cfebae33f25/README.md#examples
+    if (response.emails != null) {
+      userInfo.email = response.emails[0].value;
+      userInfo.username = userInfo.email.slice(0, userInfo.email.indexOf('@'));
+    }
+
     const externalAccount = await getOrCreateUser(req, res, userInfo, providerId);
     if (!externalAccount) {
       return loginFailure(req, res, next);

+ 1 - 47
src/server/views/admin/index.html

@@ -25,53 +25,7 @@
       {% include './widget/menu.html' %}
     </div>
     <div class="col-md-9">
-      <p> {{ t("admin_top.wiki_administrator") }}<br>
-      {{ t("admin_top.assign_administrator") }}
-      </p>
-
-      <legend>
-        <h2>{{ t('admin_top.System Information') }}</h2>
-      </legend>
-      <table class="table table-bordered">
-        <tr>
-          <th class="col-sm-4">GROWI</th>
-          <td>{{ growiVersion() }}</td>
-        </tr>
-        <tr>
-          <th>node.js</th>
-          <td>{{ nodeVersion() }}</td>
-        </tr>
-        <tr>
-          <th>npm</th>
-          <td>{{ npmVersion() }}</td>
-        </tr>
-        <tr>
-          <th>yarn</th>
-          <td>{{ yarnVersion() }}</td>
-        </tr>
-      </table>
-
-      <legend>
-        <h2>{{ t('admin_top.List of installed plugins') }}</h2>
-      </legend>
-      <table class="table table-bordered">
-        <th class="text-center">
-          {{ t('admin_top.Package name') }}
-        </th>
-        <th class="text-center">
-          {{ t('admin_top.Specified version') }}
-        </th>
-        <th class="text-center">
-          {{ t('admin_top.Installed version') }}
-        </th>
-        {% for pluginName in Object.keys(plugins) %}
-        <tr>
-          <td>{{ pluginName }}</td>
-          <td class="text-center">{{ plugins[pluginName] }}</td>
-          <td class="text-center"><span class="tbd">(TBD)</span></td>
-        </tr>
-        {% endfor %}
-      </table>
+      <div id="admin-home"></div>
     </div>
   </div>
 

+ 23 - 9
yarn.lock

@@ -1534,6 +1534,11 @@
   resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
   integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
 
+"@yarnpkg/lockfile@^1.1.0":
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
+  integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
+
 JSONStream@^1.3.5:
   version "1.3.5"
   resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
@@ -5288,6 +5293,14 @@ find-cache-dir@^3.0.0:
     make-dir "^3.0.0"
     pkg-dir "^4.1.0"
 
+find-up@4.1.0, find-up@^4.0.0:
+  version "4.1.0"
+  resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+  integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+  dependencies:
+    locate-path "^5.0.0"
+    path-exists "^4.0.0"
+
 find-up@^1.0.0:
   version "1.1.2"
   resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
@@ -5307,14 +5320,6 @@ find-up@^3.0.0:
   dependencies:
     locate-path "^3.0.0"
 
-find-up@^4.0.0:
-  version "4.1.0"
-  resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
-  integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
-  dependencies:
-    locate-path "^5.0.0"
-    path-exists "^4.0.0"
-
 findup-sync@3.0.0:
   version "3.0.0"
   resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
@@ -9553,6 +9558,15 @@ p-try@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
 
+package-installed-version-sync@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/package-installed-version-sync/-/package-installed-version-sync-2.1.0.tgz#db8d2cbee32bc91a36e100da9bda6743f956ac93"
+  integrity sha512-rhREjEXIJ0IurYS23PGmlL1T+6/wJL9Oev2WYztN+MYze6xpsFxUL3DaixlZglpHoYCPxu3tdCUO/AMoIVrCVg==
+  dependencies:
+    "@yarnpkg/lockfile" "^1.1.0"
+    find-up "4.1.0"
+    semver "^6.2.0"
+
 pako@1.0.3:
   version "1.0.3"
   resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.3.tgz#5f515b0c6722e1982920ae8005eacb0b7ca73ccf"
@@ -11640,7 +11654,7 @@ semver@^6.1.1:
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.2.tgz#079960381376a3db62eb2edc8a3bfb10c7cfe318"
   integrity sha512-z4PqiCpomGtWj8633oeAdXm1Kn1W++3T8epkZYnwiVgIYIJ0QHszhInYSJTYxebByQH7KVCEAn8R9duzZW2PhQ==
 
-semver@^6.3.0:
+semver@^6.2.0, semver@^6.3.0:
   version "6.3.0"
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
   integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==