|
@@ -7,12 +7,13 @@ import PageWrapper from '../component/common/layout/PageWrapper.jsx'
|
7
|
7
|
import PageTitle from '../component/common/layout/PageTitle.jsx'
|
8
|
8
|
import PageContent from '../component/common/layout/PageContent.jsx'
|
9
|
9
|
import DropdownCreateButton from '../component/common/Input/DropdownCreateButton.jsx'
|
10
|
|
-import pluginDatabase from '../plugin/index.js'
|
|
10
|
+// import pluginDatabase from '../plugin/index.js'
|
11
|
11
|
import {
|
12
|
12
|
getPluginList,
|
13
|
13
|
getWorkspaceContent
|
14
|
14
|
} from '../action-creator.async.js'
|
15
|
15
|
import { setActiveFileContent } from '../action-creator.sync.js'
|
|
16
|
+import { bonjour } from 'tracim_lib'
|
16
|
17
|
|
17
|
18
|
class WorkspaceContent extends React.Component {
|
18
|
19
|
constructor (props) {
|
|
@@ -28,13 +29,23 @@ class WorkspaceContent extends React.Component {
|
28
|
29
|
}
|
29
|
30
|
|
30
|
31
|
handleClickFileItem = file => {
|
31
|
|
- this.props.dispatch(setActiveFileContent(file))
|
|
32
|
+ // this.props.dispatch(setActiveFileContent(file))
|
|
33
|
+ GLOBAL_renderPlugin(file.type)
|
|
34
|
+ }
|
|
35
|
+
|
|
36
|
+ handleDummyBtn = () => {
|
|
37
|
+ // GLOBAL_dispatchEvent({
|
|
38
|
+ // source: 'Tracim',
|
|
39
|
+ // type: 'PageHtml_showMsg',
|
|
40
|
+ // content: 'Bonjour ?'
|
|
41
|
+ // })
|
|
42
|
+ bonjour()
|
32
|
43
|
}
|
33
|
44
|
|
34
|
45
|
render () {
|
35
|
|
- const { workspace, activeFileContent, plugin } = this.props
|
|
46
|
+ const { workspace, plugin } = this.props
|
36
|
47
|
|
37
|
|
- const PluginContainer = (pluginDatabase.find(p => p.name === activeFileContent.type) || {container: '<div>unknow</div>'}).container
|
|
48
|
+ // const PluginContainer = (pluginDatabase.find(p => p.name === activeFileContent.type) || {container: '<div>unknow</div>'}).container
|
38
|
49
|
|
39
|
50
|
return (
|
40
|
51
|
<PageWrapper customeClass='workspace'>
|
|
@@ -47,6 +58,7 @@ class WorkspaceContent extends React.Component {
|
47
|
58
|
</PageTitle>
|
48
|
59
|
|
49
|
60
|
<PageContent parentClass='workspace__content'>
|
|
61
|
+ <button onClick={this.handleDummyBtn}>Click Me</button>
|
50
|
62
|
|
51
|
63
|
<div className='workspace__content__fileandfolder folder__content active'>
|
52
|
64
|
<FileItemHeader />
|
|
@@ -69,7 +81,7 @@ class WorkspaceContent extends React.Component {
|
69
|
81
|
<DropdownCreateButton customClass='workspace__content__button mb-5' />
|
70
|
82
|
|
71
|
83
|
<div id='pluginContainer'>
|
72
|
|
- { activeFileContent.display && <PluginContainer /> }
|
|
84
|
+ {/* activeFileContent.display && <PluginContainer /> */}
|
73
|
85
|
</div>
|
74
|
86
|
</PageContent>
|
75
|
87
|
|