Browse Source

Merge branch 'app_external' of github.com:tracim/design_v2

Skylsmoi 7 years ago
parent
commit
939167b9bd
58 changed files with 692 additions and 734 deletions
  1. 29 1
      dist/index.html
  2. 27 0
      dist/plugin/pageHtml.plugin.js
  3. 2 0
      jsonserver/server.js
  4. 46 8
      jsonserver/static_db.json
  5. 3 2
      package.json
  6. 13 1
      src/action-creator.async.js
  7. 3 0
      src/action-creator.sync.js
  8. 1 1
      src/component/Header/Logo.jsx
  9. 1 1
      src/component/Header/MenuActionListItem/DropdownLang.jsx
  10. 1 1
      src/component/Header/MenuActionListItem/Help.jsx
  11. 1 1
      src/component/Header/MenuActionListItem/MenuProfil.jsx
  12. 1 1
      src/component/Header/MenuActionListItem/Search.jsx
  13. 1 1
      src/component/Header/MenuLinkList.jsx
  14. 2 3
      src/component/Timeline.jsx
  15. 0 62
      src/component/Workspace/FileContentViewer.jsx
  16. 1 4
      src/component/Workspace/FileItem.jsx
  17. 0 16
      src/component/Workspace/FileType/PageHtml.jsx
  18. 4 2
      src/component/Workspace/Folder.jsx
  19. 1 1
      src/component/common/Card/Card.jsx
  20. 1 1
      src/component/common/Card/CardBody.jsx
  21. 1 1
      src/component/common/Card/CardHeader.jsx
  22. 1 1
      src/component/common/Input/Button.jsx
  23. 1 1
      src/component/common/Input/InputCheckbox.jsx
  24. 1 1
      src/component/common/Input/InputGroupText.jsx
  25. 9 19
      src/component/common/PopinFixed/PopinFixedContent.jsx
  26. 4 0
      src/component/common/PopinFixed/PopinFixedHeader.jsx
  27. 61 75
      src/container/AccountPage.jsx
  28. 2 4
      src/container/PrivateRoute.jsx
  29. 27 0
      src/container/ProgressBar.jsx
  30. 3 1
      src/container/Tracim.jsx
  31. 31 0
      src/container/UploadPopup.jsx
  32. 19 18
      src/container/WorkspaceContent.jsx
  33. 26 32
      src/css/AccountPage.styl
  34. 2 2
      src/css/Folder.styl
  35. 0 102
      src/css/Generic.styl
  36. 1 1
      src/css/Header.styl
  37. 0 277
      src/css/PagePreview.styl
  38. 126 0
      src/css/ProgressBar.styl
  39. 4 2
      src/css/Timeline.styl
  40. 29 0
      src/css/UploadPopup.styl
  41. 2 0
      src/css/Variable.styl
  42. 19 19
      src/css/index.styl
  43. 0 26
      src/helper.js
  44. 24 18
      src/plugin/ContentType/PageHtml/PageHtml.styl
  45. 17 0
      src/plugin/ContentType/PageHtml/PageHtmlComponent.jsx
  46. 54 0
      src/plugin/ContentType/PageHtml/PageHtmlContainer.jsx
  47. 12 0
      src/plugin/ContentType/PageHtml/index.js
  48. 15 0
      src/plugin/ContentType/PageHtml/pageHtml.js
  49. 0 0
      src/plugin/ContentType/Thread/Thread.jsx
  50. 18 5
      src/plugin/ContentType/Thread/Thread.styl
  51. 12 0
      src/plugin/ContentType/Thread/index.js
  52. 15 0
      src/plugin/ContentType/Thread/thread.js
  53. 6 0
      src/plugin/index.js
  54. 0 10
      src/reducer/fileType/index.js
  55. 0 10
      src/reducer/fileType/pageHtml.js
  56. 9 0
      src/reducer/plugin.js
  57. 2 1
      src/reducer/root.js
  58. 1 1
      webpack.config.js

+ 29 - 1
dist/index.html View File

24
     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
24
     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
25
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
25
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
26
     -->
26
     -->
27
+
28
+    <script src='./plugin/pageHtml.plugin.js'></script>
29
+
27
     <script src="./dev/jquery-3.2.1.js"></script>
30
     <script src="./dev/jquery-3.2.1.js"></script>
28
     <script src="./dev/popper-1.12.3.js"></script>
31
     <script src="./dev/popper-1.12.3.js"></script>
29
     <script src="./dev/bootstrap-4.0.0-beta.2.js"></script>
32
     <script src="./dev/bootstrap-4.0.0-beta.2.js"></script>
30
 
33
 
31
-    <script type="text/javascript">
34
+    <script type='text/javascript'>
35
+      GLOBAL_renderPlugin = data => {
36
+        if (data.file.type === 'PageHtml') {
37
+          pluginPageHtml.renderPlugin('pluginContainer', data)
38
+        }
39
+      }
40
+
41
+      GLOBAL_dispatchEvent = (data) => {
42
+        var event = new CustomEvent('pluginCustomEvent', {detail: data})
43
+        document.dispatchEvent(event)
44
+      }
45
+
46
+      GLOBAL_unmountPlugin = () => {
47
+        console.log('btn close clicked')
48
+        pluginPageHtml.hidePlugin('pluginContainer')
49
+      }
50
+
51
+      // only usefull if plugin doesn't handle fileContent himself
52
+      GLOBAL_handleRequireRedraw = () => {
53
+        var rez = pluginA.destroyPlugin('plugin')
54
+        if (rez) GLOBAL_drawPlugin('redraw')
55
+        else console.log('Erreur, failed at destroying plugin')
56
+      }
57
+    </script>
58
+
59
+    <script type='text/javascript'>
32
       if (window.matchMedia("(min-width:1200px)").matches) {
60
       if (window.matchMedia("(min-width:1200px)").matches) {
33
 
61
 
34
         var jsScript = document.createElement("script");
62
         var jsScript = document.createElement("script");

File diff suppressed because it is too large
+ 27 - 0
dist/plugin/pageHtml.plugin.js


+ 2 - 0
jsonserver/server.js View File

25
   else return res.jsonp('error')
25
   else return res.jsonp('error')
26
 })
26
 })
27
 
27
 
28
+server.get('/plugin/file_content', (req, res) => res.jsonp(jsonDb.file_content))
29
+
28
 server.get('/user/is_logged_in', (req, res) => res.jsonp(jsonDb.user_logged))
30
 server.get('/user/is_logged_in', (req, res) => res.jsonp(jsonDb.user_logged))
29
 
31
 
30
 server.get('/workspace/:id', (req, res) => res.jsonp(jsonDb.workspace_detail))
32
 server.get('/workspace/:id', (req, res) => res.jsonp(jsonDb.workspace_detail))

+ 46 - 8
jsonserver/static_db.json View File

9
       "email": "osef@algoo.fr"
9
       "email": "osef@algoo.fr"
10
     }
10
     }
11
   },
11
   },
12
+  "file_content": [{
13
+    "name": "PageHtml",
14
+    "componentLeft": "PageHtml",
15
+    "componentRight": "Timeline",
16
+    "customClass": "wsFilePageHtml",
17
+    "icon": "fa fa-file-word-o"
18
+  }, {
19
+    "name": "PageMarkdown",
20
+    "componentLeft": "PageMarkdown",
21
+    "componentRight": "undefined",
22
+    "customClass": "wsFilePageMarkdown",
23
+    "icon": "fa fa-file-code-o"
24
+  }, {
25
+    "name": "File",
26
+    "componentLeft": "File",
27
+    "componentRight": "undefined",
28
+    "customClass": "wsFileFile",
29
+    "icon": "fa fa-file-text-o"
30
+  }, {
31
+    "name": "Thread",
32
+    "componentLeft": "Thread",
33
+    "componentRight": "undefined",
34
+    "customClass": "wsFileThread",
35
+    "icon": "fa fa-comments-o"
36
+  }, {
37
+    "name": "Task",
38
+    "componentLeft": "Task",
39
+    "componentRight": "undefined",
40
+    "customClass": "wsFileTask",
41
+    "icon": "fa fa-list-ul"
42
+  }, {
43
+    "name": "Issue",
44
+    "componentLeft": "Issue",
45
+    "componentRight": "undefined",
46
+    "customClass": "wsFileIssue",
47
+    "icon": "fa fa-ticket"
48
+  }],
12
   "workspace_detail": {
49
   "workspace_detail": {
13
     "id": 1,
50
     "id": 1,
14
     "title": "Mission interne - développement",
51
     "title": "Mission interne - développement",
17
       {
54
       {
18
         "id": 1,
55
         "id": 1,
19
         "title": "La programmation fonctionnelle",
56
         "title": "La programmation fonctionnelle",
20
-        "type": "pageHtml",
57
+        "type": "PageHtml",
21
         "status": "validated",
58
         "status": "validated",
59
+        "version": "3",
22
         "text": "<h1>Mon titre nul</h1>Je suis le contenu de cette fameuse <b>page HTML</b><br /> sur la programmation fonctionnelle"
60
         "text": "<h1>Mon titre nul</h1>Je suis le contenu de cette fameuse <b>page HTML</b><br /> sur la programmation fonctionnelle"
23
       },
61
       },
24
       {
62
       {
25
         "id": 2,
63
         "id": 2,
26
         "title": "La prommation fonctionnelle est-elle vraiment utile ?",
64
         "title": "La prommation fonctionnelle est-elle vraiment utile ?",
27
-        "type": "thread",
65
+        "type": "Thread",
28
         "status": "current"
66
         "status": "current"
29
       },
67
       },
30
       {
68
       {
31
         "id": 6,
69
         "id": 6,
32
         "title": "Une photo moche",
70
         "title": "Une photo moche",
33
-        "type": "file",
71
+        "type": "File",
34
         "status": "current"
72
         "status": "current"
35
       },
73
       },
36
       {
74
       {
37
         "id": 10,
75
         "id": 10,
38
         "title": "le README.md d'un random repo github",
76
         "title": "le README.md d'un random repo github",
39
-        "type": "pageMarkdown",
77
+        "type": "PageMarkdown",
40
         "status": "current"
78
         "status": "current"
41
       },
79
       },
42
       {
80
       {
43
         "id": 7,
81
         "id": 7,
44
         "title": "Une liste de truc à faire que je ferai jamais",
82
         "title": "Une liste de truc à faire que je ferai jamais",
45
-        "type": "task",
83
+        "type": "Task",
46
         "status": "current"
84
         "status": "current"
47
       },
85
       },
48
       {
86
       {
49
         "id": 8,
87
         "id": 8,
50
         "title": "Ça, ça marche pas. Merci de le fix",
88
         "title": "Ça, ça marche pas. Merci de le fix",
51
-        "type": "issue",
89
+        "type": "Issue",
52
         "status": "current"
90
         "status": "current"
53
       },
91
       },
54
       {
92
       {
59
           {
97
           {
60
             "id": 4,
98
             "id": 4,
61
             "title": "des trucs de backend",
99
             "title": "des trucs de backend",
62
-            "type": "file",
100
+            "type": "File",
63
             "status": "outdated"
101
             "status": "outdated"
64
           },
102
           },
65
           {
103
           {
66
             "id": 5,
104
             "id": 5,
67
             "title": "on s'emmerde",
105
             "title": "on s'emmerde",
68
-            "type": "pageHtml",
106
+            "type": "PageHtml",
69
             "status": "outdated"
107
             "status": "outdated"
70
           }
108
           }
71
         ]
109
         ]

+ 3 - 2
package.json View File

15
   "license": "ISC",
15
   "license": "ISC",
16
   "dependencies": {
16
   "dependencies": {
17
     "babel-core": "^6.26.0",
17
     "babel-core": "^6.26.0",
18
-    "babel-eslint": "^8.0.1",
18
+    "babel-eslint": "^8.2.1",
19
     "babel-loader": "^7.1.2",
19
     "babel-loader": "^7.1.2",
20
     "babel-plugin-transform-class-properties": "^6.24.1",
20
     "babel-plugin-transform-class-properties": "^6.24.1",
21
     "babel-plugin-transform-object-assign": "^6.22.0",
21
     "babel-plugin-transform-object-assign": "^6.22.0",
34
     "redux": "^3.7.2",
34
     "redux": "^3.7.2",
35
     "redux-logger": "^3.0.6",
35
     "redux-logger": "^3.0.6",
36
     "redux-thunk": "^2.2.0",
36
     "redux-thunk": "^2.2.0",
37
-    "standard": "^10.0.3",
37
+    "standard": "^11.0.0",
38
     "standard-loader": "^6.0.1",
38
     "standard-loader": "^6.0.1",
39
     "style-loader": "^0.19.0",
39
     "style-loader": "^0.19.0",
40
     "stylus": "^0.54.5",
40
     "stylus": "^0.54.5",
41
     "stylus-loader": "^3.0.1",
41
     "stylus-loader": "^3.0.1",
42
+    "tracim_lib": "git://github.com/tracim/tracim_lib.git",
42
     "url-loader": "^0.6.2",
43
     "url-loader": "^0.6.2",
43
     "webpack": "^3.8.1",
44
     "webpack": "^3.8.1",
44
     "whatwg-fetch": "^2.0.3"
45
     "whatwg-fetch": "^2.0.3"

+ 13 - 1
src/action-creator.async.js View File

6
   updateUserConnected,
6
   updateUserConnected,
7
   updateUserData,
7
   updateUserData,
8
   WORKSPACE,
8
   WORKSPACE,
9
-  updateWorkspaceData
9
+  updateWorkspaceData,
10
+  PLUGIN_LIST,
11
+  setPluginList
10
 } from './action-creator.sync.js'
12
 } from './action-creator.sync.js'
11
 
13
 
12
 /*
14
 /*
114
   })
116
   })
115
   if (fetchGetWorkspaceContent.status === 200) dispatch(updateWorkspaceData(fetchGetWorkspaceContent.json))
117
   if (fetchGetWorkspaceContent.status === 200) dispatch(updateWorkspaceData(fetchGetWorkspaceContent.json))
116
 }
118
 }
119
+
120
+export const getPluginList = () => async dispatch => {
121
+  const fetchGetPluginList = await fetchWrapper({
122
+    url: `http://localhost:3001/plugin/file_content`,
123
+    param: {...FETCH_CONFIG, method: 'GET'},
124
+    actionName: PLUGIN_LIST,
125
+    dispatch
126
+  })
127
+  if (fetchGetPluginList.status === 200) dispatch(setPluginList(fetchGetPluginList.json))
128
+}

+ 3 - 0
src/action-creator.sync.js View File

11
 export const FILE_CONTENT = 'FileContent'
11
 export const FILE_CONTENT = 'FileContent'
12
 export const setActiveFileContent = file => ({ type: `Set/${FILE_CONTENT}/Active`, file })
12
 export const setActiveFileContent = file => ({ type: `Set/${FILE_CONTENT}/Active`, file })
13
 export const hideActiveFileContent = () => ({ type: `Set/${FILE_CONTENT}/Hide` })
13
 export const hideActiveFileContent = () => ({ type: `Set/${FILE_CONTENT}/Hide` })
14
+
15
+export const PLUGIN_LIST = 'Plugin/List'
16
+export const setPluginList = pluginList => ({ type: `Set/${PLUGIN_LIST}`, pluginList })

+ 1 - 1
src/component/Header/Logo.jsx View File

10
 }
10
 }
11
 export default Logo
11
 export default Logo
12
 
12
 
13
-Logo.PropTypes = {
13
+Logo.propTypes = {
14
   logoSrc: PropTypes.string.isRequired,
14
   logoSrc: PropTypes.string.isRequired,
15
   onClickImg: PropTypes.func.isRequired
15
   onClickImg: PropTypes.func.isRequired
16
 }
16
 }

+ 1 - 1
src/component/Header/MenuActionListItem/DropdownLang.jsx View File

30
 }
30
 }
31
 export default DropdownLang
31
 export default DropdownLang
32
 
32
 
33
-DropdownLang.PropTypes = {
33
+DropdownLang.propTypes = {
34
   langList: PropTypes.array.isRequired,
34
   langList: PropTypes.array.isRequired,
35
   onChangeLang: PropTypes.func.isRequired
35
   onChangeLang: PropTypes.func.isRequired
36
 }
36
 }

+ 1 - 1
src/component/Header/MenuActionListItem/Help.jsx View File

16
 }
16
 }
17
 export default Help
17
 export default Help
18
 
18
 
19
-Help.PropTypes = {
19
+Help.propTypes = {
20
   onClickHelp: PropTypes.func.isRequired
20
   onClickHelp: PropTypes.func.isRequired
21
 }
21
 }

+ 1 - 1
src/component/Header/MenuActionListItem/MenuProfil.jsx View File

24
 }
24
 }
25
 export default MenuProfil
25
 export default MenuProfil
26
 
26
 
27
-MenuProfil.PropTypes = {
27
+MenuProfil.propTypes = {
28
   user: PropTypes.object.isRequired,
28
   user: PropTypes.object.isRequired,
29
   onClickMyProfil: PropTypes.func.isRequired,
29
   onClickMyProfil: PropTypes.func.isRequired,
30
   onClickLogout: PropTypes.func.isRequired
30
   onClickLogout: PropTypes.func.isRequired

+ 1 - 1
src/component/Header/MenuActionListItem/Search.jsx View File

25
 }
25
 }
26
 export default Search
26
 export default Search
27
 
27
 
28
-Search.PropTypes = {
28
+Search.propTypes = {
29
   onChangeInput: PropTypes.func.isRequired,
29
   onChangeInput: PropTypes.func.isRequired,
30
   onClickSubmit: PropTypes.func.isRequired
30
   onClickSubmit: PropTypes.func.isRequired
31
 }
31
 }

+ 1 - 1
src/component/Header/MenuLinkList.jsx View File

18
 }
18
 }
19
 export default MenuLinkList
19
 export default MenuLinkList
20
 
20
 
21
-MenuLinkList.PropTypes = {
21
+MenuLinkList.propTypes = {
22
   onClickFeature: PropTypes.func.isRequired,
22
   onClickFeature: PropTypes.func.isRequired,
23
   onClickExplore: PropTypes.func.isRequired,
23
   onClickExplore: PropTypes.func.isRequired,
24
   onClickAbout: PropTypes.func.isRequired
24
   onClickAbout: PropTypes.func.isRequired

+ 2 - 3
src/component/Timeline.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
 import classnames from 'classnames'
2
 import classnames from 'classnames'
3
 import imgProfil from '../img/imgProfil.png'
3
 import imgProfil from '../img/imgProfil.png'
4
-import imgProfilReverse from '../img/imgProfil-reverse.png'
5
 
4
 
6
 const Timeline = props => {
5
 const Timeline = props => {
7
   return (
6
   return (
28
 
27
 
29
         <li className={classnames(`${props.customClass}__messagelist__item`, 'timeline__messagelist__item received')}>
28
         <li className={classnames(`${props.customClass}__messagelist__item`, 'timeline__messagelist__item received')}>
30
           <div className={classnames(`${props.customClass}__messagelist__item__avatar`, 'timeline__messagelist__item__avatar')}>
29
           <div className={classnames(`${props.customClass}__messagelist__item__avatar`, 'timeline__messagelist__item__avatar')}>
31
-            <img src={imgProfilReverse} alt='avatar' />
30
+            <img src={imgProfil} alt='avatar' />
32
           </div>
31
           </div>
33
           <div
32
           <div
34
             className={classnames(`${props.customClass}__messagelist__item__createhour`, 'timeline__messagelist__item__createhour')}>
33
             className={classnames(`${props.customClass}__messagelist__item__createhour`, 'timeline__messagelist__item__createhour')}>
70
 
69
 
71
         <li className={classnames(`${props.customClass}__messagelist__item`, 'timeline__messagelist__item received')}>
70
         <li className={classnames(`${props.customClass}__messagelist__item`, 'timeline__messagelist__item received')}>
72
           <div className={classnames(`${props.customClass}__messagelist__item__avatar`, 'timeline__messagelist__item__avatar')}>
71
           <div className={classnames(`${props.customClass}__messagelist__item__avatar`, 'timeline__messagelist__item__avatar')}>
73
-            <img src={imgProfilReverse} alt='avatar' />
72
+            <img src={imgProfil} alt='avatar' />
74
           </div>
73
           </div>
75
           <div
74
           <div
76
             className={classnames(`${props.customClass}__messagelist__item__createhour`, 'timeline__messagelist__item__createhour')}>
75
             className={classnames(`${props.customClass}__messagelist__item__createhour`, 'timeline__messagelist__item__createhour')}>

+ 0 - 62
src/component/Workspace/FileContentViewer.jsx View File

1
-import React from 'react'
2
-import PropTypes from 'prop-types'
3
-import PopinFixed from '../common/PopinFixed/PopinFixed'
4
-import PopinFixedHeader from '../common/PopinFixed/PopinFixedHeader.jsx'
5
-import PopinFixedOption from '../common/PopinFixed/PopinFixedOption.jsx'
6
-import PopinFixedContent from '../common/PopinFixed/PopinFixedContent.jsx'
7
-import PageHtml from './FileType/PageHtml.jsx'
8
-import Thread from './FileType/Thread.jsx'
9
-import Preview from './FileType/File.jsx'
10
-import Timeline from '../Timeline.jsx'
11
-import { FILE_TYPE } from '../../helper.js'
12
-
13
-const FileContentViewer = props => {
14
-  const { customClass, icon } = FILE_TYPE.find(f => f.name === props.file.type) || {customClass: '', icon: ''}
15
-
16
-  const [leftPart, rightPart] = (() => {
17
-    switch (props.file.type) {
18
-      case FILE_TYPE[0].name: // pageHtml
19
-        return [
20
-          <PageHtml version={props.file.version} text={props.file.text} />,
21
-          <Timeline customClass={`${customClass}__contentpage`} />
22
-        ]
23
-      case FILE_TYPE[2].name: // file (preview)
24
-        return [
25
-          <Preview />,
26
-          <Timeline customClass={`${customClass}__contentpage`} />
27
-        ]
28
-      case FILE_TYPE[3].name: // thread
29
-        return [
30
-          <Thread />
31
-        ]
32
-    }
33
-  })()
34
-
35
-  return (
36
-    <PopinFixed customClass={`${customClass}`}>
37
-      <PopinFixedHeader
38
-        customClass={`${customClass}`}
39
-        icon={icon}
40
-        name={props.file.title}
41
-        onClickCloseBtn={props.onClose}
42
-      />
43
-
44
-      <PopinFixedOption customClass={`${customClass}`} />
45
-
46
-      <PopinFixedContent customClass={`${customClass}__contentpage`}>
47
-        { leftPart }
48
-        { rightPart }
49
-      </PopinFixedContent>
50
-    </PopinFixed>
51
-  )
52
-}
53
-
54
-export default FileContentViewer
55
-
56
-FileContentViewer.PropTypes = {
57
-  file: PropTypes.shape({
58
-    type: PropTypes.oneOf(FILE_TYPE.map(f => f.name)).isRequired,
59
-    title: PropTypes.string.isRequired
60
-  }).isRequired,
61
-  onClose: PropTypes.func.isRequired
62
-}

+ 1 - 4
src/component/Workspace/FileItem.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
 import PropTypes from 'prop-types'
2
 import PropTypes from 'prop-types'
3
 import classnames from 'classnames'
3
 import classnames from 'classnames'
4
-import { FILE_TYPE } from '../../helper.js'
5
 
4
 
6
 const FileItem = props => {
5
 const FileItem = props => {
7
-  const iconType = (FILE_TYPE.find(f => f.name === props.type) || {icon: ''}).icon
8
-
9
   const iconStatus = (() => {
6
   const iconStatus = (() => {
10
     switch (props.status) {
7
     switch (props.status) {
11
       case 'current':
8
       case 'current':
23
     <div className={classnames('file', 'align-items-center', props.customClass)} onClick={props.onClickItem}>
20
     <div className={classnames('file', 'align-items-center', props.customClass)} onClick={props.onClickItem}>
24
       <div className='col-2 col-sm-2 col-md-2 col-lg-2 col-xl-1'>
21
       <div className='col-2 col-sm-2 col-md-2 col-lg-2 col-xl-1'>
25
         <div className='file__type'>
22
         <div className='file__type'>
26
-          <i className={iconType} />
23
+          <i className={props.icon} />
27
         </div>
24
         </div>
28
       </div>
25
       </div>
29
       <div className='col-8 col-sm-8 col-md-8 col-lg-8 col-xl-10'>
26
       <div className='col-8 col-sm-8 col-md-8 col-lg-8 col-xl-10'>

+ 0 - 16
src/component/Workspace/FileType/PageHtml.jsx View File

1
-import React from 'react'
2
-
3
-const PageHtml = props => {
4
-  return (
5
-    <div className='wsFilePageHtml__contentpage__textnote'>
6
-      <div className='wsFilePageHtml__contentpage__textnote__latestversion'>
7
-        { props.version }
8
-      </div>
9
-      <div className='wsFilePageHtml__contentpage__textnote__text'>
10
-        { props.text }
11
-      </div>
12
-    </div>
13
-  )
14
-}
15
-
16
-export default PageHtml

+ 4 - 2
src/component/Workspace/Folder.jsx View File

21
   }
21
   }
22
 
22
 
23
   render () {
23
   render () {
24
-    const { title, content } = this.props.folderData
24
+    const { plugin, folderData: { title, content } } = this.props
25
     return (
25
     return (
26
       <div className={classnames('folder', {'active': this.state.open})}>
26
       <div className={classnames('folder', {'active': this.state.open})}>
27
         <div className='folder__header' onClick={this.handleClickToggleFolder}>
27
         <div className='folder__header' onClick={this.handleClickToggleFolder}>
57
           { content.map(c => c.type === 'folder'
57
           { content.map(c => c.type === 'folder'
58
             ? <Folder folderData={c} key={c.id} />
58
             ? <Folder folderData={c} key={c.id} />
59
             : <FileItem
59
             : <FileItem
60
+              icon={(plugin[c.type] || {icon: ''}).icon}
60
               name={c.title}
61
               name={c.title}
61
               type={c.type}
62
               type={c.type}
62
               status={c.status}
63
               status={c.status}
76
   folderData: PropTypes.shape({
77
   folderData: PropTypes.shape({
77
     title: PropTypes.string.isRequired,
78
     title: PropTypes.string.isRequired,
78
     content: PropTypes.array
79
     content: PropTypes.array
79
-  })
80
+  }),
81
+  plugin: PropTypes.object
80
 }
82
 }

+ 1 - 1
src/component/common/Card/Card.jsx View File

22
       children[1].type !== CardBody
22
       children[1].type !== CardBody
23
       // children.some(p => p.type !== CardHeader && p.type !== CardBody)
23
       // children.some(p => p.type !== CardHeader && p.type !== CardBody)
24
     ) {
24
     ) {
25
-      return new Error(`PropType Error: childrens of ${componentName} must be: 1 CardHeader and 1 CardBody.`)
25
+      return new Error(`PropType Error: children of ${componentName} must be: 1 CardHeader and 1 CardBody.`)
26
     }
26
     }
27
   }).isRequired,
27
   }).isRequired,
28
   customClass: PropTypes.string
28
   customClass: PropTypes.string

+ 1 - 1
src/component/common/Card/CardBody.jsx View File

14
 
14
 
15
 export default CardBody
15
 export default CardBody
16
 
16
 
17
-CardBody.PropTypes = {
17
+CardBody.propTypes = {
18
   children: PropTypes.element.isRequired,
18
   children: PropTypes.element.isRequired,
19
   formClass: PropTypes.string
19
   formClass: PropTypes.string
20
 }
20
 }

+ 1 - 1
src/component/common/Card/CardHeader.jsx View File

12
 
12
 
13
 export default CardHeader
13
 export default CardHeader
14
 
14
 
15
-CardHeader.PropTypes = {
15
+CardHeader.propTypes = {
16
   children: PropTypes.element.isRequired,
16
   children: PropTypes.element.isRequired,
17
   customClass: PropTypes.string
17
   customClass: PropTypes.string
18
 }
18
 }

+ 1 - 1
src/component/common/Input/Button.jsx View File

16
 
16
 
17
 export default Button
17
 export default Button
18
 
18
 
19
-Button.PropTypes = {
19
+Button.propTypes = {
20
   htmlType: PropTypes.oneOf(['button', 'submit', 'reset']).isRequired,
20
   htmlType: PropTypes.oneOf(['button', 'submit', 'reset']).isRequired,
21
   bootstrapType: PropTypes.oneOf(
21
   bootstrapType: PropTypes.oneOf(
22
     ['primary', 'default', 'default', 'success', 'danger', 'warning', 'info', 'light', 'dark']
22
     ['primary', 'default', 'default', 'success', 'danger', 'warning', 'info', 'light', 'dark']

+ 1 - 1
src/component/common/Input/InputCheckbox.jsx View File

21
 
21
 
22
 export default InputGroupText
22
 export default InputGroupText
23
 
23
 
24
-InputGroupText.PropTypes = {
24
+InputGroupText.propTypes = {
25
   parentClassName: PropTypes.string.isRequired,
25
   parentClassName: PropTypes.string.isRequired,
26
   checked: PropTypes.bool.isRequired,
26
   checked: PropTypes.bool.isRequired,
27
   onChange: PropTypes.func.isRequired,
27
   onChange: PropTypes.func.isRequired,

+ 1 - 1
src/component/common/Input/InputGroupText.jsx View File

24
 
24
 
25
 export default InputGroupText
25
 export default InputGroupText
26
 
26
 
27
-InputGroupText.PropTypes = {
27
+InputGroupText.propTypes = {
28
   parentClassName: PropTypes.string.isRequired,
28
   parentClassName: PropTypes.string.isRequired,
29
   value: PropTypes.string.isRequired,
29
   value: PropTypes.string.isRequired,
30
   type: PropTypes.oneOf(['text', 'email', 'password', 'tel']).isRequired,
30
   type: PropTypes.oneOf(['text', 'email', 'password', 'tel']).isRequired,

+ 9 - 19
src/component/common/PopinFixed/PopinFixedContent.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
 import classnames from 'classnames'
2
 import classnames from 'classnames'
3
 import PropTypes from 'prop-types'
3
 import PropTypes from 'prop-types'
4
-import PageHtml from '../../Workspace/FileType/PageHtml.jsx'
5
-import Thread from '../../Workspace/FileType/Thread.jsx'
6
-import Timeline from '../../Timeline.jsx'
7
 
4
 
8
 const PopinFixedContent = props => {
5
 const PopinFixedContent = props => {
9
   return props.children.length === 2
6
   return props.children.length === 2
10
     ? (
7
     ? (
11
-      <div className={classnames('wsFileGeneric__contentpage', `${props.customClass}`)}>
12
-        {props.children[0]}
8
+      <div className={classnames('wsFileGeneric__content', `${props.customClass}__content`)}>
9
+        <div className={classnames('wsFileGeneric__content__left', `${props.customClass}__content__left`)}>
10
+          {props.children[0]}
11
+        </div>
13
 
12
 
14
-        <div className={classnames('wsFileGeneric__wrapper', `${props.customClass}__wrapper`)}>
13
+        <div className={classnames('wsFileGeneric__content__right', `${props.customClass}__content__right`)}>
15
           {props.children[1]}
14
           {props.children[1]}
16
         </div>
15
         </div>
17
       </div>
16
       </div>
18
     )
17
     )
19
     : (
18
     : (
20
-      <div className={classnames('wsFileGeneric__contentpage', `${props.customClass}`)}>
19
+      <div className={classnames('wsFileGeneric__content', `${props.customClass}__content`)}>
21
         { props.children }
20
         { props.children }
22
       </div>
21
       </div>
23
     )
22
     )
27
 
26
 
28
 PopinFixedContent.propTypes = {
27
 PopinFixedContent.propTypes = {
29
   customClass: PropTypes.string,
28
   customClass: PropTypes.string,
30
-  // from http://www.mattzabriskie.com/blog/react-validating-children
31
-  children: PropTypes.arrayOf((children, key, componentName /* , location, propFullName */) => {
32
-    if (
33
-      (Array.isArray(children.length) && (
34
-        children.length > 2 ||
35
-        (children.length === 2 && children.some(c => ![PageHtml, Thread, Timeline].includes(c.type)))
36
-      )) ||
37
-      (children.type === Timeline)
38
-    ) {
39
-      return new Error(`PropType Error: childrens of ${componentName} must be one of [PageHtml, Thread, Timeline, undefined].`)
40
-    }
41
-  }).isRequired
29
+  children: PropTypes.arrayOf((children, key, componentName /* , location, propFullName */) =>
30
+    children.length !== 2 && new Error(`PropType Error: ${componentName} must have 2 children.`)
31
+  ).isRequired
42
 }
32
 }

+ 4 - 0
src/component/common/PopinFixed/PopinFixedHeader.jsx View File

13
         {props.name}
13
         {props.name}
14
       </div>
14
       </div>
15
 
15
 
16
+      <div className={classnames('editiontitle mr-auto', `${props.customClass}__header__editionmode`)}>
17
+        <input className='editiontitle__input form-control' placeholder='Titre du fichier' />
18
+      </div>
19
+
16
       <div className={classnames('wsFileGeneric__header__edittitle', `${props.customClass}__header__changetitle`)}>
20
       <div className={classnames('wsFileGeneric__header__edittitle', `${props.customClass}__header__changetitle`)}>
17
         <i className='fa fa-pencil' />
21
         <i className='fa fa-pencil' />
18
       </div>
22
       </div>

+ 61 - 75
src/container/AccountPage.jsx View File

1
 import React, { Component } from 'react'
1
 import React, { Component } from 'react'
2
 import imgProfil from '../img/imgProfil.png'
2
 import imgProfil from '../img/imgProfil.png'
3
-import BtnSwitch from '../component/common/Input/BtnSwitch.jsx'
3
+import { BtnSwitch } from 'tracim_lib'
4
 
4
 
5
 class AccountPage extends Component {
5
 class AccountPage extends Component {
6
   render () {
6
   render () {
69
             <div className='account__userpreference__setting'>
69
             <div className='account__userpreference__setting'>
70
 
70
 
71
               <div className='account__userpreference__setting__personaldata d-none'>
71
               <div className='account__userpreference__setting__personaldata d-none'>
72
-                <div className='account__userpreference__setting__personaldata__title subTitle ml-2 ml-sm-0'>
72
+                <div className='personaldata__title subTitle ml-2 ml-sm-0'>
73
                   Mes informations personnelles
73
                   Mes informations personnelles
74
                 </div>
74
                 </div>
75
 
75
 
76
-                <div className='account__userpreference__setting__personaldata__text ml-2 ml-sm-0'>
76
+                <div className='personaldata__text ml-2 ml-sm-0'>
77
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
77
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
78
                   Ut consectetur dolor et sunt nisi officia ut magna.
78
                   Ut consectetur dolor et sunt nisi officia ut magna.
79
                 </div>
79
                 </div>
80
 
80
 
81
-                <div className='account__userpreference__setting__personaldata__changeinfo'>
82
-                  <div className='account__userpreference__setting__personaldata__changeinfo__infotitle'>
81
+                <div className='personaldata__form'>
82
+                  <div className='personaldata__form__title'>
83
                     Changer le mot de passe :
83
                     Changer le mot de passe :
84
                   </div>
84
                   </div>
85
-                  <input className='account__userpreference__setting__personaldata__changeinfo__txtinput form-control' type='password' placeholder='Ancien mot de passe' />
86
-                  <input className='account__userpreference__setting__personaldata__changeinfo__txtinput form-control' type='password' placeholder='Nouveau mot de passe' />
87
-                  <div className='account__userpreference__setting__personaldata__changeinfo__button btn btn-primary'>
85
+                  <input className='personaldata__form__txtinput form-control' type='password' placeholder='Ancien mot de passe' />
86
+                  <input className='personaldata__form__txtinput form-control' type='password' placeholder='Nouveau mot de passe' />
87
+                  <div className='personaldata__form__button btn btn-primary'>
88
                     Envoyer
88
                     Envoyer
89
                   </div>
89
                   </div>
90
                 </div>
90
                 </div>
91
 
91
 
92
-                <div className='account__userpreference__setting__personaldata__changeinfo'>
93
-                  <div className='account__userpreference__setting__personaldata__changeinfo__infotitle'>
92
+                <div className='personaldata__form'>
93
+                  <div className='personaldata__form__title'>
94
                     Changer d'adresse mail :
94
                     Changer d'adresse mail :
95
                   </div>
95
                   </div>
96
-                  <input className='account__userpreference__setting__personaldata__changeinfo__txtinput form-control' type='email' placeholder='Ancienne adresse mail' />
97
-                  <input className='account__userpreference__setting__personaldata__changeinfo__txtinput form-control' type='email' placeholder='Nouvelle adresse mail' />
98
-                  <div className='account__userpreference__setting__personaldata__changeinfo__button btn btn-primary'>
96
+                  <input className='personaldata__form__txtinput form-control' type='email' placeholder='Ancienne adresse mail' />
97
+                  <input className='personaldata__form__txtinput form-control' type='email' placeholder='Nouvelle adresse mail' />
98
+                  <div className='personaldata__form__button btn btn-primary'>
99
                     Envoyer
99
                     Envoyer
100
                   </div>
100
                   </div>
101
                 </div>
101
                 </div>
103
 
103
 
104
               <div className='account__userpreference__setting__calendar d-none'>
104
               <div className='account__userpreference__setting__calendar d-none'>
105
 
105
 
106
-                <div className='account__userpreference__setting__calendar__title subTitle ml-2 ml-sm-0'>
106
+                <div className='calendar__title subTitle ml-2 ml-sm-0'>
107
                   Calendrier
107
                   Calendrier
108
                 </div>
108
                 </div>
109
 
109
 
110
-                <div className='account__userpreference__setting__calendar__text ml-2 ml-sm-0'>
110
+                <div className='calendar__text ml-2 ml-sm-0'>
111
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
111
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
112
                   Ut consectetur dolor et sunt nisi officia ut magna.
112
                   Ut consectetur dolor et sunt nisi officia ut magna.
113
                 </div>
113
                 </div>
114
 
114
 
115
-                <div className='account__userpreference__setting__calendar__infotitle'>
115
+                <div className='calendar__title ml-2 ml-sm-0'>
116
                   Accèder à votre Calendrier personnel
116
                   Accèder à votre Calendrier personnel
117
                 </div>
117
                 </div>
118
-                <div className='account__userpreference__setting__calendar__link'>
118
+                <div className='calendar__link ml-2 ml-sm-0'>
119
                   http://algoo.trac.im/caldav/user/262.ics/
119
                   http://algoo.trac.im/caldav/user/262.ics/
120
                 </div>
120
                 </div>
121
 
121
 
122
-                <div className='account__userpreference__setting__calendar__infotitle'>
122
+                <div className='calendar__title ml-2 ml-sm-0'>
123
                   Changer de Fuseau Horaire :
123
                   Changer de Fuseau Horaire :
124
                 </div>
124
                 </div>
125
 
125
 
126
-                <div className='account__userpreference__setting__calendar__timezone dropdown'>
127
-                  <button className='account__userpreference__setting__calendar__timezone__btn btn dropdown-toggle' type='button' id='dropdownMenuButton' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
126
+                <div className='calendar__timezone ml-2 ml-sm-0 dropdown'>
127
+                  <button className='calendar__timezone__btn btn dropdown-toggle' type='button' id='dropdownMenuButton' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
128
                     Fuseau Horaire
128
                     Fuseau Horaire
129
                   </button>
129
                   </button>
130
-                  <div className='account__userpreference__setting__calendar__timezone__submenu dropdown-menu'>
131
-                    <div className='account__userpreference__setting__calendar__timezone__submenu__item dropdown-item'> Paris GMT +1
130
+                  <div className='calendar__timezone__submenu dropdown-menu'>
131
+                    <div className='calendar__timezone__submenu__item dropdown-item'> Paris GMT +1
132
                     </div>
132
                     </div>
133
-                    <div className='account__userpreference__setting__calendar__timezone__submenu__item dropdown-item dropdown-item'> Londres GMT +0
133
+                    <div className='calendar__timezone__submenu__item dropdown-item dropdown-item'> Londres GMT +0
134
                     </div>
134
                     </div>
135
                   </div>
135
                   </div>
136
                 </div>
136
                 </div>
138
 
138
 
139
               <div className='account__userpreference__setting__notification'>
139
               <div className='account__userpreference__setting__notification'>
140
 
140
 
141
-                <div className='account__userpreference__setting__notification__title subTitle ml-2 ml-sm-0'>
141
+                <div className='notification__title subTitle ml-2 ml-sm-0'>
142
                   Mes Espaces de Travail
142
                   Mes Espaces de Travail
143
                 </div>
143
                 </div>
144
 
144
 
145
-                <div className='account__userpreference__setting__notification__text ml-2 ml-sm-0'>
145
+                <div className='notification__text ml-2 ml-sm-0'>
146
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
146
                   Ut consectetur dolor et sunt nisi officia ut magna. Ut consectetur dolor et sunt nisi officia ut magna.
147
                   Ut consectetur dolor et sunt nisi officia ut magna.
147
                   Ut consectetur dolor et sunt nisi officia ut magna.
148
                 </div>
148
                 </div>
149
 
149
 
150
-                <div className='account__userpreference__setting__notification__tableau'>
150
+                <div className='notification__table'>
151
                   <table className='table'>
151
                   <table className='table'>
152
                     <thead>
152
                     <thead>
153
                       <tr>
153
                       <tr>
159
                     <tbody>
159
                     <tbody>
160
                       <tr>
160
                       <tr>
161
                         <td>
161
                         <td>
162
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
162
+                          <div className='notification__table__wksname'>
163
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
163
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
164
                           </div>
164
                           </div>
165
                         </td>
165
                         </td>
166
                         <td>
166
                         <td>
167
-                          <div className='account__userpreference__setting__notification__tableau__role'>
168
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
167
+                          <div className='notification__table__role'>
168
+                            <div className='notification__table__role__icon'>
169
                               <i className='fa fa-graduation-cap' />
169
                               <i className='fa fa-graduation-cap' />
170
                             </div>
170
                             </div>
171
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
171
+                            <div className='notification__table__role__text d-none d-sm-flex'>
172
                               Gestionnaire de Contenu
172
                               Gestionnaire de Contenu
173
                             </div>
173
                             </div>
174
                           </div>
174
                           </div>
175
                         </td>
175
                         </td>
176
                         <td>
176
                         <td>
177
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
178
-                            <BtnSwitch />
179
-                          </div>
177
+                          <BtnSwitch />
180
                         </td>
178
                         </td>
181
                       </tr>
179
                       </tr>
182
                       <tr>
180
                       <tr>
183
                         <td>
181
                         <td>
184
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
182
+                          <div className='notification__table__wksname'>
185
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
183
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
186
                           </div>
184
                           </div>
187
                         </td>
185
                         </td>
188
                         <td>
186
                         <td>
189
-                          <div className='account__userpreference__setting__notification__tableau__role'>
190
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
187
+                          <div className='notification__table__role'>
188
+                            <div className='notification__table__role__icon'>
191
                               <i className='fa fa-eye' />
189
                               <i className='fa fa-eye' />
192
                             </div>
190
                             </div>
193
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
191
+                            <div className='notification__table__role__text d-none d-sm-flex'>
194
                               Lecteur
192
                               Lecteur
195
                             </div>
193
                             </div>
196
                           </div>
194
                           </div>
197
                         </td>
195
                         </td>
198
                         <td>
196
                         <td>
199
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
200
-                            <BtnSwitch />
201
-                          </div>
197
+                          <BtnSwitch />
202
                         </td>
198
                         </td>
203
                       </tr>
199
                       </tr>
204
                       <tr>
200
                       <tr>
205
                         <td>
201
                         <td>
206
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
202
+                          <div className='notification__table__wksname'>
207
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
203
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
208
                           </div>
204
                           </div>
209
                         </td>
205
                         </td>
210
                         <td>
206
                         <td>
211
-                          <div className='account__userpreference__setting__notification__tableau__role'>
212
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
207
+                          <div className='notification__table__role'>
208
+                            <div className='notification__table__role__icon'>
213
                               <i className='fa fa-pencil' />
209
                               <i className='fa fa-pencil' />
214
                             </div>
210
                             </div>
215
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
211
+                            <div className='notification__table__role__text d-none d-sm-flex'>
216
                               Contributeur
212
                               Contributeur
217
                             </div>
213
                             </div>
218
                           </div>
214
                           </div>
219
                         </td>
215
                         </td>
220
                         <td>
216
                         <td>
221
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
222
-                            <BtnSwitch />
223
-                          </div>
217
+                          <BtnSwitch />
224
                         </td>
218
                         </td>
225
                       </tr>
219
                       </tr>
226
                       <tr>
220
                       <tr>
227
                         <td>
221
                         <td>
228
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
222
+                          <div className='notification__table__wksname'>
229
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
223
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
230
                           </div>
224
                           </div>
231
                         </td>
225
                         </td>
232
                         <td>
226
                         <td>
233
-                          <div className='account__userpreference__setting__notification__tableau__role'>
234
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
227
+                          <div className='notification__table__role'>
228
+                            <div className='notification__table__role__icon'>
235
                               <i className='fa fa-gavel' />
229
                               <i className='fa fa-gavel' />
236
                             </div>
230
                             </div>
237
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
231
+                            <div className='notification__table__role__text d-none d-sm-flex'>
238
                               Responsable
232
                               Responsable
239
                             </div>
233
                             </div>
240
                           </div>
234
                           </div>
241
                         </td>
235
                         </td>
242
                         <td>
236
                         <td>
243
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
244
-                            <BtnSwitch />
245
-                          </div>
237
+                          <BtnSwitch />
246
                         </td>
238
                         </td>
247
                       </tr>
239
                       </tr>
248
                       <tr>
240
                       <tr>
249
                         <td>
241
                         <td>
250
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
242
+                          <div className='notification__table__wksname'>
251
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
243
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
252
                           </div>
244
                           </div>
253
                         </td>
245
                         </td>
254
                         <td>
246
                         <td>
255
-                          <div className='account__userpreference__setting__notification__tableau__role'>
256
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
247
+                          <div className='notification__table__role'>
248
+                            <div className='notification__table__role__icon'>
257
                               <i className='fa fa-graduation-cap' />
249
                               <i className='fa fa-graduation-cap' />
258
                             </div>
250
                             </div>
259
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
251
+                            <div className='notification__table__role__text d-none d-sm-flex'>
260
                               Gestionnaire de Contenu
252
                               Gestionnaire de Contenu
261
                             </div>
253
                             </div>
262
                           </div>
254
                           </div>
263
                         </td>
255
                         </td>
264
                         <td>
256
                         <td>
265
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
266
-                            <BtnSwitch />
267
-                          </div>
257
+                          <BtnSwitch />
268
                         </td>
258
                         </td>
269
                       </tr>
259
                       </tr>
270
                       <tr>
260
                       <tr>
271
                         <td>
261
                         <td>
272
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
262
+                          <div className='notification__table__wksname'>
273
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
263
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
274
                           </div>
264
                           </div>
275
                         </td>
265
                         </td>
276
                         <td>
266
                         <td>
277
-                          <div className='account__userpreference__setting__notification__tableau__role'>
278
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
267
+                          <div className='notification__table__role'>
268
+                            <div className='notification__table__role__icon'>
279
                               <i className='fa fa-graduation-cap' />
269
                               <i className='fa fa-graduation-cap' />
280
                             </div>
270
                             </div>
281
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
271
+                            <div className='notification__table__role__text d-none d-sm-flex'>
282
                               Gestionnaire de Contenu
272
                               Gestionnaire de Contenu
283
                             </div>
273
                             </div>
284
                           </div>
274
                           </div>
285
                         </td>
275
                         </td>
286
                         <td>
276
                         <td>
287
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
288
-                            <BtnSwitch />
289
-                          </div>
277
+                          <BtnSwitch />
290
                         </td>
278
                         </td>
291
                       </tr>
279
                       </tr>
292
                       <tr>
280
                       <tr>
293
                         <td>
281
                         <td>
294
-                          <div className='account__userpreference__setting__notification__tableau__wksname'>
282
+                          <div className='notification__table__wksname'>
295
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
283
                             Nouvelle ligne directrice du nouveau design de Tracim v2 en date du 10 Octobre 2017
296
                           </div>
284
                           </div>
297
                         </td>
285
                         </td>
298
                         <td>
286
                         <td>
299
-                          <div className='account__userpreference__setting__notification__tableau__role'>
300
-                            <div className='account__userpreference__setting__notification__tableau__role__icon'>
287
+                          <div className='notification__table__role'>
288
+                            <div className='notification__table__role__icon'>
301
                               <i className='fa fa-graduation-cap' />
289
                               <i className='fa fa-graduation-cap' />
302
                             </div>
290
                             </div>
303
-                            <div className='account__userpreference__setting__notification__tableau__role__text'>
291
+                            <div className='notification__table__role__text d-none d-sm-flex'>
304
                               Gestionnaire de Contenu
292
                               Gestionnaire de Contenu
305
                             </div>
293
                             </div>
306
                           </div>
294
                           </div>
307
                         </td>
295
                         </td>
308
                         <td>
296
                         <td>
309
-                          <div className='account__userpreference__setting__notification__tableau__btnswitch'>
310
-                            <BtnSwitch />
311
-                          </div>
297
+                          <BtnSwitch />
312
                         </td>
298
                         </td>
313
                       </tr>
299
                       </tr>
314
                     </tbody>
300
                     </tbody>

+ 2 - 4
src/container/PrivateRoute.jsx View File

17
 const mapStateToProps = ({ user }) => ({ user })
17
 const mapStateToProps = ({ user }) => ({ user })
18
 export default withRouter(connect(mapStateToProps)(PrivateRoute))
18
 export default withRouter(connect(mapStateToProps)(PrivateRoute))
19
 
19
 
20
-PrivateRoute.PropTypes = {
21
-  component: PropTypes.shape({
22
-    Component: PropTypes.object.isRequired
23
-  }),
20
+PrivateRoute.propTypes = {
21
+  component: PropTypes.func.isRequired,
24
   user: PropTypes.shape({ // user is get with redux connect
22
   user: PropTypes.shape({ // user is get with redux connect
25
     isLoggedIn: PropTypes.bool.isRequired
23
     isLoggedIn: PropTypes.bool.isRequired
26
   })
24
   })

+ 27 - 0
src/container/ProgressBar.jsx View File

1
+import React, { Component } from 'react'
2
+
3
+class ProgressBar extends Component {
4
+  render () {
5
+    return (
6
+      <div className='container-fluid'>
7
+        <div className='row'>
8
+          <div className='col-md-3 col-sm-6'>
9
+            <div className='progress blue'>
10
+              <span className='progress-left'>
11
+                <span className='progress-bar' />
12
+              </span>
13
+              <span className='progress-right'>
14
+                <span className='progress-bar' />
15
+              </span>
16
+              <div className='progress-value'>
17
+                90%
18
+              </div>
19
+            </div>
20
+          </div>
21
+        </div>
22
+      </div>
23
+    )
24
+  }
25
+}
26
+
27
+export default ProgressBar

+ 3 - 1
src/container/Tracim.jsx View File

45
 
45
 
46
               <SidebarWrapper locationPath={location.pathname}>
46
               <SidebarWrapper locationPath={location.pathname}>
47
 
47
 
48
-                <PrivateRoute exact path='/' component={AccountPage} />
48
+                <PrivateRoute exact path='/' component={WorkspaceContent} />
49
+                <PrivateRoute exact path='/account' component={AccountPage} />
50
+                <PrivateRoute exact path='/dashboard' component={Dashboard} />
49
 
51
 
50
               </SidebarWrapper>
52
               </SidebarWrapper>
51
 
53
 

+ 31 - 0
src/container/UploadPopup.jsx View File

1
+import React, { Component } from 'react'
2
+import ProgressBar from './ProgressBar.jsx'
3
+
4
+class UploadPopup extends Component {
5
+  render () {
6
+    return (
7
+      <div className='uploadpopup'>
8
+        <div className='uploadpopup__wrapper card'>
9
+          <div className='card-body'>
10
+
11
+            <div className='uploadpopup__closepopup'>
12
+              <i className='fa fa-times' />
13
+            </div>
14
+
15
+            <div className='uploadpopup__progress'>
16
+              <div className='uploadpopup__progress__bar'>
17
+                <ProgressBar />
18
+              </div>
19
+
20
+              <div className='uploadpopup__progress__filename'>
21
+                Nom du Fichier
22
+              </div>
23
+            </div>
24
+          </div>
25
+        </div>
26
+      </div>
27
+    )
28
+  }
29
+}
30
+
31
+export default UploadPopup

+ 19 - 18
src/container/WorkspaceContent.jsx View File

7
 import PageTitle from '../component/common/layout/PageTitle.jsx'
7
 import PageTitle from '../component/common/layout/PageTitle.jsx'
8
 import PageContent from '../component/common/layout/PageContent.jsx'
8
 import PageContent from '../component/common/layout/PageContent.jsx'
9
 import DropdownCreateButton from '../component/common/Input/DropdownCreateButton.jsx'
9
 import DropdownCreateButton from '../component/common/Input/DropdownCreateButton.jsx'
10
-import FileContentViewer from '../component/Workspace/FileContentViewer.jsx'
11
-import { getWorkspaceContent } from '../action-creator.async.js'
12
-import { setActiveFileContent, hideActiveFileContent } from '../action-creator.sync.js'
10
+import {
11
+  getPluginList,
12
+  getWorkspaceContent
13
+} from '../action-creator.async.js'
14
+// import pluginDatabase from '../plugin/index.js'
13
 
15
 
14
 class WorkspaceContent extends React.Component {
16
 class WorkspaceContent extends React.Component {
15
   constructor (props) {
17
   constructor (props) {
21
 
23
 
22
   componentDidMount () {
24
   componentDidMount () {
23
     this.props.dispatch(getWorkspaceContent(/* this.props.workspace.id */1))
25
     this.props.dispatch(getWorkspaceContent(/* this.props.workspace.id */1))
26
+    this.props.dispatch(getPluginList())
24
   }
27
   }
25
 
28
 
26
   handleClickFileItem = file => {
29
   handleClickFileItem = file => {
27
-    this.props.dispatch(setActiveFileContent(file))
28
-  }
29
-
30
-  handleClickCloseBtn = () => {
31
-    this.props.dispatch(hideActiveFileContent())
30
+    GLOBAL_renderPlugin({
31
+      file,
32
+      pluginData: this.props.plugin[file.type]
33
+    })
32
   }
34
   }
33
 
35
 
34
   render () {
36
   render () {
35
-    const { workspace, activeFileContent } = this.props
37
+    const { workspace, plugin } = this.props
38
+
39
+    // const PluginContainer = (pluginDatabase.find(p => p.name === activeFileContent.type) || {container: '<div>unknow</div>'}).container
36
 
40
 
37
     return (
41
     return (
38
       <PageWrapper customeClass='workspace'>
42
       <PageWrapper customeClass='workspace'>
45
         </PageTitle>
49
         </PageTitle>
46
 
50
 
47
         <PageContent parentClass='workspace__content'>
51
         <PageContent parentClass='workspace__content'>
48
-
49
           <div className='workspace__content__fileandfolder folder__content active'>
52
           <div className='workspace__content__fileandfolder folder__content active'>
50
             <FileItemHeader />
53
             <FileItemHeader />
51
 
54
 
52
             { workspace.content.map(c => c.type === 'folder'
55
             { workspace.content.map(c => c.type === 'folder'
53
-              ? <Folder folderData={c} key={c.id} />
56
+              ? <Folder plugin={plugin} folderData={c} key={c.id} />
54
               : (
57
               : (
55
                 <FileItem
58
                 <FileItem
56
                   name={c.title}
59
                   name={c.title}
57
                   type={c.type}
60
                   type={c.type}
61
+                  icon={(plugin[c.type] || {icon: ''}).icon}
58
                   status={c.status}
62
                   status={c.status}
59
                   onClickItem={() => this.handleClickFileItem(c)}
63
                   onClickItem={() => this.handleClickFileItem(c)}
60
                   key={c.id}
64
                   key={c.id}
65
 
69
 
66
           <DropdownCreateButton customClass='workspace__content__button mb-5' />
70
           <DropdownCreateButton customClass='workspace__content__button mb-5' />
67
 
71
 
68
-          { activeFileContent.display &&
69
-            <FileContentViewer
70
-              file={activeFileContent}
71
-              onClose={this.handleClickCloseBtn}
72
-            />
73
-          }
72
+          <div id='pluginContainer'>
73
+            {/* activeFileContent.display && <PluginContainer /> */}
74
+          </div>
74
         </PageContent>
75
         </PageContent>
75
 
76
 
76
       </PageWrapper>
77
       </PageWrapper>
78
   }
79
   }
79
 }
80
 }
80
 
81
 
81
-const mapStateToProps = ({ workspace, activeFileContent }) => ({ workspace, activeFileContent })
82
+const mapStateToProps = ({ workspace, activeFileContent, plugin }) => ({ workspace, activeFileContent, plugin })
82
 export default connect(mapStateToProps)(WorkspaceContent)
83
 export default connect(mapStateToProps)(WorkspaceContent)

+ 26 - 32
src/css/AccountPage.styl View File

5
   margin 15px 0
5
   margin 15px 0
6
   font-size 18px
6
   font-size 18px
7
 
7
 
8
+.table td
9
+  vertical-align middle
10
+
11
+.table tr:nth-child(even)
12
+  background-color grey-hover
13
+
8
 .account
14
 .account
15
+  width 100%
9
   &__userinformation
16
   &__userinformation
10
     display flex
17
     display flex
11
     justify-content center
18
     justify-content center
56
           font-size 20px
63
           font-size 20px
57
           cursor pointer
64
           cursor pointer
58
         &__disabled
65
         &__disabled
59
-          padding 25px 20px 20px 20px
66
+          padding 25px 20px 20px 16px
60
           color grey
67
           color grey
61
           font-size 18px
68
           font-size 18px
62
         &__item
69
         &__item
63
           margin-top 10px
70
           margin-top 10px
64
-          padding-left 5px
65
           font-weight 500
71
           font-weight 500
66
           font-size 18px
72
           font-size 18px
67
           cursor pointer
73
           cursor pointer
73
       padding 20px
79
       padding 20px
74
       width 80%
80
       width 80%
75
       background-color off-white
81
       background-color off-white
76
-      &__personaldata
82
+      .personaldata
77
         &__text
83
         &__text
78
           settingText()
84
           settingText()
79
-        &__changeinfo
85
+        &__form
80
           margin 25px 0
86
           margin 25px 0
81
-          &__infotitle
87
+          &__title
82
             margin-bottom 15px
88
             margin-bottom 15px
83
             font-size 18px
89
             font-size 18px
84
           &__txtinput
90
           &__txtinput
85
             display inline-flex
91
             display inline-flex
86
-            display ms-inline-flex
87
             width auto
92
             width auto
88
             margin 0 15px 15px 0
93
             margin 0 15px 15px 0
89
             border 1px solid blue
94
             border 1px solid blue
90
-            border-radius 10px
95
+            border-radius 5px
91
             padding 8px 15px
96
             padding 8px 15px
92
           &__button
97
           &__button
93
             vertical-align top
98
             vertical-align top
94
             border 1px solid blue
99
             border 1px solid blue
95
-            border-radius 10px
100
+            border-radius 5px
96
             padding 8px 25px
101
             padding 8px 25px
97
-            background-color transparent
98
-            color blue
99
             cursor pointer
102
             cursor pointer
100
-            &:hover, &:focus
101
-              background-color blue
102
-              color white
103
-      &__calendar
104
-        &__title
105
-          settingTitle()
103
+      .calendar
106
         &__text
104
         &__text
107
           settingText()
105
           settingText()
108
-        &__infotitle
106
+        &__title
109
           margin 15px 0
107
           margin 15px 0
110
           font-size 18px
108
           font-size 18px
111
         &__link
109
         &__link
112
           display inline-block
110
           display inline-block
113
           border 1px solid grey
111
           border 1px solid grey
114
-          border-radius 10px
112
+          border-radius 5px
115
           padding 10px 25px
113
           padding 10px 25px
116
         &__timezone
114
         &__timezone
117
           margin 15px 0 30px 0
115
           margin 15px 0 30px 0
118
           &__btn
116
           &__btn
119
             border 1px solid blue
117
             border 1px solid blue
120
-            border-radius 10px
118
+            border-radius 5px
121
             padding 10px 35px
119
             padding 10px 35px
122
             color blue
120
             color blue
123
             background-color transparent
121
             background-color transparent
134
               &:hover, &:focus
132
               &:hover, &:focus
135
                 background-color blue
133
                 background-color blue
136
                 color white
134
                 color white
137
-      &__notification
138
-        &__title
139
-          settingTitle()
135
+      .notification
140
         &__text
136
         &__text
141
           settingText()
137
           settingText()
142
           margin-bottom 30px
138
           margin-bottom 30px
143
-        &__tableau
139
+        &__table
144
           border 1px solid lightGrey
140
           border 1px solid lightGrey
145
           &__role
141
           &__role
146
             display flex
142
             display flex
148
             &__icon
144
             &__icon
149
               margin-right 10px
145
               margin-right 10px
150
 
146
 
151
-.account__userpreference__setting__notification__table__line:nth-last-child(1)
152
-  border-bottom 0
153
-
154
-
155
 /***** MEDIAQUERIES *****/
147
 /***** MEDIAQUERIES *****/
156
 
148
 
157
-
158
 /**** MEDIA 576px & 1199px ****/
149
 /**** MEDIA 576px & 1199px ****/
159
 
150
 
160
 // Regroup the common rules
151
 // Regroup the common rules
260
         border-radius 0
251
         border-radius 0
261
         padding 10px 0
252
         padding 10px 0
262
         width 100%
253
         width 100%
263
-        &__calendar
254
+        .personaldata
255
+          &__form
256
+            margin-left 10px
257
+        .calendar
264
           &__link
258
           &__link
265
             padding 10px 15px
259
             padding 10px 15px
266
-        &__notification
267
-          &__tableau
260
+        .notification
261
+          &__table
268
             &__wksname
262
             &__wksname
269
               text-overflow ellipsis
263
               text-overflow ellipsis
270
               white-space nowrap
264
               white-space nowrap
271
               overflow hidden
265
               overflow hidden
272
-              width 100px
266
+              width 310px
273
               &:focus
267
               &:focus
274
                 overflow visible
268
                 overflow visible
275
                 width auto
269
                 width auto

+ 2 - 2
src/css/Folder.styl View File

53
     &:hover
53
     &:hover
54
       background-color folder-hover
54
       background-color folder-hover
55
       .folder__header__triangleborder__triangle
55
       .folder__header__triangleborder__triangle
56
-        border-color hover-folder transparent transparent transparent
56
+        border-color folder-hover transparent transparent transparent
57
     &__triangleborder
57
     &__triangleborder
58
       display none
58
       display none
59
       position absolute
59
       position absolute
60
-      top 62px
60
+      top 61px
61
       left -1px
61
       left -1px
62
       border-style solid
62
       border-style solid
63
       border-width 25px 30px 0 30px
63
       border-width 25px 30px 0 30px

+ 0 - 102
src/css/Generic.styl View File

161
       border 1px solid grey
161
       border 1px solid grey
162
       border-radius 10px
162
       border-radius 10px
163
       padding 15px 25px
163
       padding 15px 25px
164
-
165
-/********************/
166
-
167
-/*** PAGE FILE, THREAD, HTML, MARKDOWN, ISSUE ***/
168
-
169
-.wsFileGeneric
170
-  position fixed
171
-  top 85px
172
-  right 0
173
-  border 1px solid grey
174
-  height 100%
175
-  background-color lightGrey
176
-  box-shadow shadow-page
177
-  visibility hidden
178
-  z-index 1
179
-  &.visible
180
-    visibility visible
181
-  &__header
182
-    display flex
183
-    align-items center
184
-    padding 15px
185
-    height 64px
186
-    &__icon
187
-      margin-right 15px
188
-      font-size 22px
189
-      color white
190
-    &__title
191
-      margin-right 15px
192
-      color white
193
-      text-overflow ellipsis
194
-      overflow hidden
195
-      white-space nowrap
196
-    &__edittitle
197
-      margin 0 15px
198
-      color white
199
-      font-size 20px
200
-      cursor pointer
201
-      &:hover , &:focus
202
-        border 1px solid off-white
203
-        padding 0 10px
204
-        border-radius 5px
205
-    &__close
206
-      border 1px solid white
207
-      border-radius 5px
208
-      padding 2px 5px
209
-      cursor pointer
210
-      & > i
211
-        color white
212
-        font-size 20px
213
-  &__option
214
-    border-bottom 1px solid grey
215
-    padding 10px
216
-    height 58px
217
-    background-color off-white
218
-    & > i
219
-      vertical-align middle
220
-      margin-right 15px
221
-      font-size 25px
222
-      cursor pointer
223
-    &__menu
224
-      display flex
225
-      align-items center
226
-      &__status
227
-        margin-right 20px
228
-        .current
229
-          color blue
230
-        .check
231
-          color green
232
-        .invalid
233
-          color red
234
-        .ban
235
-          color grey
236
-        &__dropdownbtn
237
-          border 1px solid grey
238
-          width 150px
239
-          background-color transparent
240
-          cursor pointer
241
-          &::after
242
-            color fontColor
243
-          &:hover
244
-            background-color transparent
245
-          &__icon
246
-            display inline-block
247
-            margin 0 15px
248
-        &__submenu
249
-          &__item
250
-            display flex
251
-            justify-content space-between
252
-            margin 5px 0
253
-            cursor pointer
254
-            &:active
255
-              background-color transparent
256
-      &__action
257
-        margin 5px 10px 0 0
258
-        font-size 18px
259
-        cursor pointer
260
-        &:hover , &:focus
261
-          font-size 22px
262
-          color blue
263
-  &__wrapper
264
-    display flex
265
-    flex-direction column

+ 1 - 1
src/css/Header.styl View File

86
               margin-right 10px
86
               margin-right 10px
87
               color darkGrey
87
               color darkGrey
88
           .profilgroup__sub
88
           .profilgroup__sub
89
-            color dark-grey
89
+            color darkGrey
90
             cursor pointer
90
             cursor pointer
91
             &:focus
91
             &:focus
92
               box-shadow none
92
               box-shadow none

+ 0 - 277
src/css/PagePreview.styl View File

1
-.wsFilePreview
2
-  width 1200px
3
-  height calc(100% - 85px)
4
-  &__header
5
-    background-color previewColor
6
-    .fa-file-image-o
7
-      color white
8
-  &__option
9
-    &__menu
10
-      display flex
11
-      &__addversion
12
-        padding 8px 15px
13
-        border 1px solid previewColor
14
-        border-radius 5px
15
-        background-color transparent
16
-        color previewColor
17
-        cursor pointer
18
-        & > i
19
-          margin-left 10px
20
-        &:hover
21
-          background-color previewColor
22
-          border none
23
-          color white
24
-  &__contentpage
25
-    display flex
26
-    height 100%
27
-    &__visualizer
28
-      position relative
29
-      margin 10px
30
-      border-radius 10px
31
-      width 70%
32
-      height calc(100% - 150px)
33
-      background-color off-white
34
-      &__sidebar
35
-        position absolute
36
-        top 0
37
-        right 0
38
-        width 50px
39
-        height 100%
40
-        transition width 1s ease
41
-        &__visiblepart
42
-          display flex
43
-          flex-direction column
44
-          align-items center
45
-          border-top-right-radius 10px
46
-          border-bottom-right-radius 10px
47
-          width 50px
48
-          height 100%
49
-          background-color grey
50
-          cursor pointer
51
-          &:hover
52
-            background-color previewColor
53
-          &__icon
54
-            justify-content flex-start
55
-            font-size 30px
56
-            color white
57
-          &__title
58
-            margin-top 45px
59
-            color white
60
-            transform rotate(-90deg)
61
-        &__propertydetail
62
-          display none
63
-      &__dloption
64
-        display flex
65
-        margin-left calc(50% - 50px) // 50px => width/2 of the div
66
-        padding-top 10px
67
-        width 100px
68
-        &__icon
69
-          margin-right 20px
70
-          font-size 20px
71
-          cursor pointer
72
-      &__slidecontainer
73
-        display flex
74
-        align-items center
75
-        width calc(100% - 50px) // 50px => width of sidebar
76
-        height calc(100% - 40px) // 40px => height of dloption
77
-        &__fileimg
78
-          display flex
79
-          padding 30px
80
-          width 100%
81
-          height 100%
82
-          & > img
83
-            max-height 100%
84
-            max-width 100%
85
-        &__chevron
86
-          margin 0 5px
87
-          font-size 20px
88
-          cursor pointer
89
-    .timeline
90
-      margin 10px
91
-      border-radius 10px
92
-      width 45%
93
-      height calc(100% - 150px)
94
-      background-color off-white
95
-      overflow scroll
96
-      &__header
97
-        border-top-left-radius 10px
98
-        border-top-right-radius 10px
99
-        padding 10px 0
100
-        text-align center
101
-        font-size 20px
102
-        color dark-grey
103
-        background-color grey-hover
104
-      &__messagelist
105
-        min-height 300px
106
-        &__item
107
-          &__content
108
-            color dark-grey
109
-        &__version
110
-          margin-top 40px
111
-          background-color grey-hover
112
-          &__btn
113
-            padding 5px 25px
114
-            border-radius 5px
115
-            width 145px
116
-            color white
117
-            font-size 17px
118
-            background-color previewColor
119
-            & > i
120
-              margin-right 10px
121
-              color dark-grey
122
-              font-size 22px
123
-            &:hover
124
-              background-color lightPreviewColor
125
-            &:focus
126
-              background-color lightPreviewColor
127
-          &__date
128
-            color fontColor
129
-            font-size 17px
130
-      &__texteditor
131
-        &__simpletext
132
-          &__input
133
-            &:focus
134
-              color htmlColor
135
-              border-color htmlColor
136
-        &__submit
137
-          &__btn
138
-            border-color htmlColor
139
-            background-color htmlColor
140
-            color white
141
-            &:hover
142
-              border-color htmlColor
143
-              background-color htmlColor
144
-            &:focus
145
-              border-color htmlColor
146
-              background-color htmlColor
147
-
148
-/***** SENDER RECEIVER *****/
149
-
150
-.received
151
-  .wsFilePreview__contentpage__messagelist__item__content
152
-      background-color previewColor
153
-
154
-/***** ACTIVE SIDEBAR *****/
155
-
156
-.activesidebar
157
-  .wsFilePreview__contentpage__visualizer
158
-    &__sidebar
159
-      display flex
160
-      border-top-right-radius 10px
161
-      border-bottom-right-radius 10px
162
-      width 500px
163
-      background-color off-white
164
-      &__visiblepart
165
-        order 1
166
-        border-top-left-radius 10px
167
-        border-bottom-left-radius 10px
168
-        border-top-right-radius 0
169
-        border-bottom-right-radius 0
170
-        background-color previewColor
171
-      &__propertydetail
172
-        display flex
173
-        order 2
174
-        padding 20px
175
-        overflow-Y auto
176
-        color previewColor
177
-
178
-/****** MEDIA QUERIES ********/
179
-
180
-@media (min-width: max-xs) and (max-width: max-lg)
181
-
182
-  .wsFilePreview
183
-    overflow-Y auto
184
-    &__contentpage
185
-      display block
186
-      &__visualizer
187
-        display flex
188
-        flex-direction column
189
-        width calc(100% - 30px) // 20px => margin
190
-      .timeline
191
-        width calc(100% - 30px) // 20px => margin
192
-        &__texteditor
193
-          &__simpletext
194
-            display inline-flex
195
-            display ms-inline-flex
196
-            width 60%
197
-          &__submit
198
-            display inline-flex
199
-            display ms-inline-flex
200
-            margin 10px 0
201
-            &__btn
202
-              display flex
203
-              margin-left 35px
204
-              &__icon
205
-                margin-left 15px
206
-
207
-/**** MEDIA 992px & 1199px ****/
208
-
209
-@media (min-width: min-lg) and (max-width: max-lg)
210
-
211
-  .wsFilePreview
212
-    width 900px
213
-    overflow-Y auto
214
-
215
-/******************************/
216
-
217
-/**** MEDIA 768px & 991px ****/
218
-
219
-@media (min-width: min-md) and (max-width: max-md)
220
-
221
-  .wsFilePreview
222
-    width 100%
223
-
224
-/******************************/
225
-
226
-/**** MEDIA 576px & 767px ****/
227
-
228
-@media (min-width: min-sm) and (max-width: max-sm)
229
-
230
-  .wsFilePreview
231
-    top 69px
232
-    width 100%
233
-    height calc(100% - 69px)
234
-    overflow-Y scroll
235
-
236
-/******************************/
237
-
238
-/**** MEDIA 575px ****/
239
-
240
-@media (max-width: max-xs)
241
-
242
-  .activesidebar
243
-    .wsFilePreview__contentpage__visualizer
244
-      &__sidebar
245
-        width 350px
246
-
247
-  .wsFilePreview
248
-    top 69px
249
-    width 100%
250
-    height calc(100% - 69px)
251
-    overflow-Y scroll
252
-    &__option__menu__addversion
253
-        padding 8px 5px
254
-        & > i
255
-          display none
256
-    &__contentpage
257
-      display block
258
-      &__visualizer
259
-        display flex
260
-        flex-direction column
261
-        width calc(100% - 30px) // 20px => margin
262
-      .timeline
263
-        width calc(100% - 30px) // 20px => margin
264
-        &__texteditor
265
-          &__simpletext
266
-            display inline-flex
267
-            display ms-inline-flex
268
-            width 60%
269
-          &__submit
270
-            display inline-flex
271
-            display ms-inline-flex
272
-            margin 10px 0
273
-            &__btn
274
-              display flex
275
-              margin-left 35px
276
-              &__icon
277
-                margin-left 15px

+ 126 - 0
src/css/ProgressBar.styl View File

1
+.progress
2
+    width 150px
3
+    height 150px
4
+    line-height 150px
5
+    background none
6
+    margin 0 auto
7
+    position relative
8
+
9
+.progressafter
10
+    content ""
11
+    width 100%
12
+    height 100%
13
+    border-radius 50%
14
+    border 12px solid off-white
15
+    position absolute
16
+    top 0
17
+    left 0
18
+
19
+.progress > span
20
+    width 50%
21
+    height 100%
22
+    overflow hidden
23
+    position absolute
24
+    top 0
25
+    z-index 1
26
+
27
+.progress .progress-left
28
+    left 0
29
+
30
+.progress .progress-bar
31
+    width 100%
32
+    height 100%
33
+    background none
34
+    border-width 12px
35
+    border-style solid
36
+    position absolute
37
+    top 0
38
+
39
+.progress .progress-left .progress-bar
40
+    left 100%
41
+    border-top-right-radius 80px
42
+    border-bottom-right-radius 80px
43
+    border-left 0
44
+    -webkit-transform-origin center left
45
+    transform-origin center left
46
+
47
+.progress .progress-right
48
+    right 0
49
+
50
+.progress .progress-right .progress-bar
51
+    left -100%
52
+    border-top-left-radius 80px
53
+    border-bottom-left-radius 80px
54
+    border-right 0
55
+    -webkit-transform-origin center right
56
+    transform-origin center right
57
+    animation loading-1 1.8s linear forwards
58
+
59
+.progress .progress-value
60
+    display flex
61
+    justify-content center
62
+    align-items center
63
+    width 90%
64
+    height 90%
65
+    border 10px solid off-white
66
+    border-radius 50%
67
+    background darkBlue
68
+    font-size 24px
69
+    color off-white
70
+    line-height 135px
71
+    text-align center
72
+    position absolute
73
+    top 5%
74
+    left 5%
75
+
76
+
77
+.progress.blue .progress-bar
78
+    border-color blue
79
+
80
+.progress.blue .progress-left .progress-bar
81
+    animation loading-2 1.5s linear forwards 1.8s
82
+
83
+@keyframes loading-1
84
+    0%
85
+        -webkit-transform rotate(0deg)
86
+        transform rotate(0deg)
87
+
88
+    100%
89
+        -webkit-transform rotate(180deg)
90
+        transform rotate(180deg)
91
+
92
+@keyframes loading-2
93
+    0%
94
+        -webkit-transform rotate(0deg)
95
+        transform rotate(0deg)
96
+
97
+    100%
98
+        -webkit-transform rotate(144deg)
99
+        transform rotate(144deg)
100
+
101
+@keyframes loading-3
102
+    0%
103
+        -webkit-transform rotate(0deg)
104
+        transform rotate(0deg)
105
+
106
+    100%
107
+        -webkit-transform rotate(90deg)
108
+        transform rotate(90deg)
109
+
110
+@keyframes loading-4
111
+    0%
112
+        -webkit-transform rotate(0deg)
113
+        transform rotate(0deg)
114
+
115
+    100%
116
+        -webkit-transform rotate(36deg)
117
+        transform rotate(36deg)
118
+
119
+@keyframes loading-5
120
+    0%
121
+        -webkit-transform rotate(0deg)
122
+        transform rotate(0deg)
123
+
124
+    100%
125
+        -webkit-transform rotate(126deg)
126
+        transform rotate(126deg)

+ 4 - 2
src/css/Timeline.styl View File

2
   display flex
2
   display flex
3
   flex-direction column
3
   flex-direction column
4
   margin 10px
4
   margin 10px
5
+  border-radius 10px
6
+  height 100%
5
   &__header
7
   &__header
6
     border-radius 10px 10px 0 0
8
     border-radius 10px 10px 0 0
7
     padding 15px
9
     padding 15px
8
     text-align center
10
     text-align center
9
     font-size 20px
11
     font-size 20px
10
-    color dark-grey
12
+    color darkGrey
11
     background-color grey-hover
13
     background-color grey-hover
12
   &__messagelist
14
   &__messagelist
13
     flex 1 1 0
15
     flex 1 1 0
51
         font-size 17px
53
         font-size 17px
52
         & > i
54
         & > i
53
           margin-right 10px
55
           margin-right 10px
54
-          color dark-grey
56
+          color darkGrey
55
           font-size 22px
57
           font-size 22px
56
       &__date
58
       &__date
57
         color fontColor
59
         color fontColor

+ 29 - 0
src/css/UploadPopup.styl View File

1
+.uploadpopup
2
+  position fixed
3
+  top 0
4
+  left 0
5
+  display flex
6
+  justify-content center
7
+  width 100%
8
+  height 100%
9
+  z-index 3
10
+  &__wrapper
11
+    margin-top 120px
12
+    width 400px
13
+    height 350px
14
+    background off-white
15
+    box-shadow shadow-all
16
+  &__closepopup
17
+    display flex
18
+    justify-content flex-end
19
+    cursor pointer
20
+  &__progress
21
+    display flex
22
+    flex-direction column
23
+    align-items center
24
+    padding 40px 0
25
+    &__filename
26
+      margin-top 30px
27
+      font-size 25px
28
+
29
+

+ 2 - 0
src/css/Variable.styl View File

1
+// Côme - 2018/02/27 - DEPRECATED : now using Variable.styl from tracim_lib
2
+
1
 /**** VARIABLES ****/
3
 /**** VARIABLES ****/
2
 /*** COULEURS ****/
4
 /*** COULEURS ****/
3
 
5
 

+ 19 - 19
src/css/index.styl View File

3
 html, body, #content, #content > div
3
 html, body, #content, #content > div
4
   height 100%
4
   height 100%
5
 
5
 
6
-@import 'Variable'
7
-@import 'Generic'
6
+@import 'Variable.styl' // Côme - this comes from node_modules/tracim_lib
8
 
7
 
9
-@import 'Sidebar'
10
-@import 'Header'
11
-@import 'Footer'
8
+@import 'Generic.styl'
12
 
9
 
13
-@import 'Login'
14
-@import 'Workspace'
10
+@import 'Sidebar.styl'
11
+@import 'Header.styl'
12
+@import 'Footer.styl'
15
 
13
 
16
-@import 'FileItem'
17
-@import 'FileItemHeader'
18
-@import 'Folder'
14
+@import 'Login.styl'
15
+@import 'Workspace.styl'
19
 
16
 
20
-@import 'Thread'
21
-@import 'PageHtml'
22
-@import 'Timeline'
23
-@import 'File'
17
+@import 'FileItem.styl'
18
+@import 'FileItemHeader.styl'
19
+@import 'Folder.styl'
24
 
20
 
25
-@import 'Dashboard'
26
-@import 'AccountPage'
27
-@import 'btnSwtich'
21
+@import 'Timeline.styl'
22
+@import 'File.styl'
23
+
24
+@import 'Dashboard.styl'
25
+@import 'AccountPage.styl'
26
+@import 'btnSwtich.styl'
27
+
28
+@import 'UploadPopup'
29
+@import 'ProgressBar'
28
 
30
 
29
-// @import 'UploadPopup'
30
-// @import 'ProgressBar'

+ 0 - 26
src/helper.js View File

4
     'Content-Type': 'application/json'
4
     'Content-Type': 'application/json'
5
   }
5
   }
6
 }
6
 }
7
-
8
-export const FILE_TYPE = [{
9
-  name: 'pageHtml',
10
-  customClass: 'wsFilePageHtml',
11
-  icon: 'fa fa-file-word-o'
12
-}, {
13
-  name: 'pageMarkdown',
14
-  customClass: 'wsFilePageMarkdown',
15
-  icon: 'fa fa-file-code-o'
16
-}, {
17
-  name: 'file',
18
-  customClass: 'wsFileFile',
19
-  icon: 'fa fa-file-image-o'
20
-}, {
21
-  name: 'thread',
22
-  customClass: 'wsFileThread',
23
-  icon: 'fa fa-comments-o'
24
-}, {
25
-  name: 'task',
26
-  customClass: 'wsFileTask',
27
-  icon: 'fa fa-list-ul'
28
-}, {
29
-  name: 'issue',
30
-  customClass: 'wsFileIssue',
31
-  icon: 'fa fa-ticket'
32
-}]

src/css/PageHtml.styl → src/plugin/ContentType/PageHtml/PageHtml.styl View File

1
+@import '../../../css/Variable.styl'
2
+
1
 .wsFilePageHtml
3
 .wsFilePageHtml
2
   width 1200px
4
   width 1200px
3
   height calc(100% - 85px)
5
   height calc(100% - 85px)
4
   overflow-Y auto
6
   overflow-Y auto
5
   &__header
7
   &__header
6
     background-color htmlColor
8
     background-color htmlColor
9
+    &__editionmode
10
+      display none
7
     &__icon
11
     &__icon
8
       .fa-file-word-o
12
       .fa-file-word-o
9
         color white
13
         color white
10
   &__contentpage
14
   &__contentpage
11
-    display flex
12
-    overflow-Y auto
13
     &__textnote
15
     &__textnote
14
       margin 10px
16
       margin 10px
15
       border-radius 10px
17
       border-radius 10px
16
       padding 25px
18
       padding 25px
17
-      width 55%
18
       height 100%
19
       height 100%
19
       background-color off-white
20
       background-color off-white
20
       &__latestversion
21
       &__latestversion
22
         opacity 0.7
23
         opacity 0.7
23
       &__text
24
       &__text
24
         font-size 14px
25
         font-size 14px
25
-    &__wrapper
26
-      border-radius 10px
27
-      width 45%
28
-      height 100%
29
-    &__header
30
-      border-top-left-radius 10px
31
-      border-top-right-radius 10px
32
-      padding 10px 0
33
-      text-align center
34
-      font-size 20px
35
-      color dark-grey
36
-      background-color grey-hover
26
+      &__edition
27
+        display none
37
     &__messagelist
28
     &__messagelist
38
       min-height 300px
29
       min-height 300px
39
       &__item
30
       &__item
40
         &__content
31
         &__content
41
-          color dark-grey
32
+          color darkGrey
42
       &__version
33
       &__version
43
         margin-top 40px
34
         margin-top 40px
44
         background-color grey-hover
35
         background-color grey-hover
51
           background-color htmlColor
42
           background-color htmlColor
52
           & > i
43
           & > i
53
             margin-right 10px
44
             margin-right 10px
54
-            color dark-grey
45
+            color darkGrey
55
             font-size 22px
46
             font-size 22px
56
           &:hover
47
           &:hover
57
             background-color darkHtmlColor
48
             background-color darkHtmlColor
85
 
76
 
86
 .received
77
 .received
87
   .wsFilePageHtml__contentpage__messagelist__item__content
78
   .wsFilePageHtml__contentpage__messagelist__item__content
88
-      background-color htmlColor
79
+    background-color htmlColor
80
+
81
+.activeEditionTitle
82
+  .wsFilePageHtml
83
+    &__header
84
+      &__editionmode
85
+        display block
86
+      &__title
87
+        display none
88
+
89
+.activeEditionText
90
+  .wsFilePageHtml__contentpage__textnote
91
+    &__edition
92
+      display flex
93
+    &__text
94
+      display none
89
 
95
 
90
 @media (min-width: max-xs) and (max-width: max-lg)
96
 @media (min-width: max-xs) and (max-width: max-lg)
91
   .wsFilePageHtml
97
   .wsFilePageHtml

+ 17 - 0
src/plugin/ContentType/PageHtml/PageHtmlComponent.jsx View File

1
+import React from 'react'
2
+
3
+const PageHtml = props => {
4
+  return (
5
+    <div className='wsFilePageHtml__contentpage__textnote'>
6
+      <div className='wsFilePageHtml__contentpage__textnote__latestversion' dangerouslySetInnerHTML={{__html: props.version}} />
7
+      <div className='wsFilePageHtml__contentpage__textnote__text' dangerouslySetInnerHTML={{__html: props.text}} />
8
+
9
+      <form className='wsFilePageHtml__contentpage__textnote__edition editionmode'>
10
+        <textarea className='wsFilePageHtml__contentpage__textnote__edition__text editionmode__text' />
11
+        <input type='submit' className='wsFilePageHtml__contentpage__textnote__edition__submit editionmode__submit' value='Valider' />
12
+      </form>
13
+    </div>
14
+  )
15
+}
16
+
17
+export default PageHtml

+ 54 - 0
src/plugin/ContentType/PageHtml/PageHtmlContainer.jsx View File

1
+import React from 'react'
2
+import { connect } from 'react-redux'
3
+// import PopinFixed from '../../../component/common/PopinFixed/PopinFixed.jsx'
4
+// import PopinFixedHeader from '../../../component/common/PopinFixed/PopinFixedHeader.jsx'
5
+// import PopinFixedOption from '../../../component/common/PopinFixed/PopinFixedOption.jsx'
6
+// import PopinFixedContent from '../../../component/common/PopinFixed/PopinFixedContent.jsx'
7
+import {
8
+  PopinFixed,
9
+  PopinFixedHeader,
10
+  PopinFixedOption,
11
+  PopinFixedContent
12
+} from 'tracim_lib'
13
+import PageHtmlComponent from './PageHtmlComponent.jsx'
14
+import Timeline from '../../../component/Timeline.jsx'
15
+import { hideActiveFileContent } from '../../../action-creator.sync.js'
16
+
17
+require('./PageHtml.styl')
18
+
19
+class PageHtmlContainer extends React.Component {
20
+  handleClickBtnClose = () => this.props.dispatch(hideActiveFileContent())
21
+
22
+  render () {
23
+    const { activeFileContent, plugin: { PageHtml } } = this.props
24
+
25
+    return (
26
+      <PopinFixed customClass={`${PageHtml.customClass}`}>
27
+        <PopinFixedHeader
28
+          customClass={`${PageHtml.customClass}`}
29
+          icon={PageHtml.icon}
30
+          name={activeFileContent.title}
31
+          onClickCloseBtn={this.handleClickBtnClose}
32
+        />
33
+
34
+        <PopinFixedOption customClass={`${PageHtml.customClass}`} />
35
+
36
+        <PopinFixedContent customClass={`${PageHtml.customClass}__contentpage`}>
37
+          <PageHtmlComponent
38
+            version={activeFileContent.version}
39
+            text={activeFileContent.text}
40
+            key={'PageHtml'}
41
+          />
42
+
43
+          <Timeline
44
+            customClass={`${PageHtml.customClass}__contentpage`}
45
+            key={'pageHtml__timeline'}
46
+          />
47
+        </PopinFixedContent>
48
+      </PopinFixed>
49
+    )
50
+  }
51
+}
52
+
53
+const mapStateToProps = ({ activeFileContent, plugin }) => ({ activeFileContent, plugin })
54
+export default connect(mapStateToProps)(PageHtmlContainer)

+ 12 - 0
src/plugin/ContentType/PageHtml/index.js View File

1
+import reducer from './pageHtml.js'
2
+// import container from './PageHtmlContainer.jsx'
3
+// import component from './PageHtmlComponent.jsx'
4
+
5
+const PageHtml = {
6
+  name: 'PageHtml',
7
+  // container,
8
+  // component,
9
+  reducer
10
+}
11
+
12
+export default PageHtml

+ 15 - 0
src/plugin/ContentType/PageHtml/pageHtml.js View File

1
+import { PLUGIN_LIST } from '../../../action-creator.sync.js'
2
+
3
+export default function pageHtml (state = {
4
+  title: '',
5
+  version: 0,
6
+  icon: ''
7
+}, action) {
8
+  switch (action.type) {
9
+    case `Set/${PLUGIN_LIST}`:
10
+      return action.pluginList.find(p => p.name === 'PageHtml')
11
+
12
+    default:
13
+      return state
14
+  }
15
+}

src/component/Workspace/FileType/Thread.jsx → src/plugin/ContentType/Thread/Thread.jsx View File


src/css/Thread.styl → src/plugin/ContentType/Thread/Thread.styl View File

1
-.wsFileThread
1
+.wsContentThread
2
   width 550px
2
   width 550px
3
   &__header
3
   &__header
4
     color white
4
     color white
5
     background-color threadColor
5
     background-color threadColor
6
+    &__editionmode
7
+      display none
8
+    &__icon
9
+      .fa-comments-o
10
+        color white
6
   &__wrapper
11
   &__wrapper
7
     height calc(100% - 209px) /* height of chat__header + height of option + top of chat */
12
     height calc(100% - 209px) /* height of chat__header + height of option + top of chat */
8
   &__messagelist
13
   &__messagelist
21
         color darkBlue
26
         color darkBlue
22
 
27
 
23
 .received
28
 .received
24
-  .wsFileThread__messagelist__item__content
29
+  .wsContentThread__messagelist__item__content
25
       background-color darkBlue
30
       background-color darkBlue
26
       color white
31
       color white
27
 
32
 
28
-@media (min-width: max-xs) and (max-width: max-lg)
33
+.activeEditionTitle
29
   .wsFileThread
34
   .wsFileThread
35
+    &__header
36
+      &__editionmode
37
+        display block
38
+      &__title
39
+        display none
40
+
41
+@media (min-width: max-xs) and (max-width: max-lg)
42
+  .wsContentThread
30
     &__texteditor
43
     &__texteditor
31
       padding 7px
44
       padding 7px
32
       &__simpletext
45
       &__simpletext
36
         width 80px
49
         width 80px
37
 
50
 
38
 @media (min-width: min-sm) and (max-width: max-sm)
51
 @media (min-width: min-sm) and (max-width: max-sm)
39
-  .wsFileThread
52
+  .wsContentThread
40
     top 69px
53
     top 69px
41
 
54
 
42
 @media (max-width: max-xs)
55
 @media (max-width: max-xs)
43
-  .wsFileThread
56
+  .wsContentThread
44
     top 69px
57
     top 69px
45
     width 100%
58
     width 100%
46
     box-shadow none
59
     box-shadow none

+ 12 - 0
src/plugin/ContentType/Thread/index.js View File

1
+import reducer from './thread.js'
2
+// import container from './ThreadContainer.jsx'
3
+// import component from './ThreadComponent.jsx'
4
+
5
+const Thread = {
6
+  name: 'Thread',
7
+  // container,
8
+  // component,
9
+  reducer
10
+}
11
+
12
+export default Thread

+ 15 - 0
src/plugin/ContentType/Thread/thread.js View File

1
+import { PLUGIN_LIST } from '../../../action-creator.sync.js'
2
+
3
+export default function thread (state = {
4
+  title: '',
5
+  version: 0,
6
+  icon: ''
7
+}, action) {
8
+  switch (action.type) {
9
+    case `Set/${PLUGIN_LIST}`:
10
+      return action.pluginList.find(p => p.name === 'Thread')
11
+
12
+    default:
13
+      return state
14
+  }
15
+}

+ 6 - 0
src/plugin/index.js View File

1
+import pageHtml from '../plugin/ContentType/PageHtml/index.js'
2
+import thread from '../plugin/ContentType/Thread/index.js'
3
+
4
+const pluginDatabase = [pageHtml, thread]
5
+
6
+export default pluginDatabase

+ 0 - 10
src/reducer/fileType/index.js View File

1
-import { combineReducers } from 'redux'
2
-
3
-// import color from './color.js'
4
-// import size from './size.js'
5
-// import price from './price.js'
6
-// import multicolor from './multicolor.js'
7
-
8
-export default combineReducers({
9
-
10
-})

+ 0 - 10
src/reducer/fileType/pageHtml.js View File

1
-export default function pageHtml (state = {
2
-  title: '',
3
-  version: 0,
4
-  text: ''
5
-}, action) {
6
-  switch (action.type) {
7
-    default:
8
-      return state
9
-  }
10
-}

+ 9 - 0
src/reducer/plugin.js View File

1
+import { combineReducers } from 'redux'
2
+import pluginDatabase from '../plugin/index.js'
3
+
4
+const reducerList = {}
5
+pluginDatabase.forEach(p => (reducerList[p.name] = p.reducer))
6
+
7
+export default combineReducers({
8
+  ...reducerList
9
+})

+ 2 - 1
src/reducer/root.js View File

2
 import user from './user.js'
2
 import user from './user.js'
3
 import workspace from './workspace.js'
3
 import workspace from './workspace.js'
4
 import activeFileContent from './activeFileContent.js'
4
 import activeFileContent from './activeFileContent.js'
5
+import plugin from './plugin.js'
5
 
6
 
6
-const rootReducer = combineReducers({ user, workspace, activeFileContent })
7
+const rootReducer = combineReducers({ user, workspace, activeFileContent, plugin })
7
 
8
 
8
 export default rootReducer
9
 export default rootReducer

+ 1 - 1
webpack.config.js View File

76
     }]
76
     }]
77
   },
77
   },
78
   resolve: {
78
   resolve: {
79
-    extensions: ['.js', '.jsx']
79
+    extensions: ['.js', '.jsx', '.styl']
80
   },
80
   },
81
   plugins:[
81
   plugins:[
82
     ...[ // generic plugins always present
82
     ...[ // generic plugins always present