Parcourir la source

Merge branch 'develop' of github.com:tracim/tracim_v2 into fix/742_backend_should_generate_index.html

Guénaël Muller il y a 6 ans
Parent
révision
f790a1152e

+ 10 - 1
build_full_frontend.sh Voir le fichier

8
     windoz="windoz"
8
     windoz="windoz"
9
 fi
9
 fi
10
 
10
 
11
-echo -e "\n${BROWN}/!\ ${NC}this script does not run 'npm install'\n${BROWN}/!\ ${NC}it also assumes your webpack dev server of frontend is running"
11
+echo -e "\n${BROWN}/!\ ${NC}this script does not run 'npm install'\n${BROWN}/!\ ${NC}"
12
+
13
+# get the new sources
14
+git pull origin develop
12
 
15
 
13
 # Tracim Lib
16
 # Tracim Lib
14
 (
17
 (
44
   ./build_admin_workspace_user.sh
47
   ./build_admin_workspace_user.sh
45
 )
48
 )
46
 
49
 
50
+# build Tracim
51
+(
52
+  cd frontend || exit
53
+  npm run build
54
+)
55
+
47
 log "-- frontend build successful."
56
 log "-- frontend build successful."

+ 6 - 0
color.json.sample Voir le fichier

1
+{
2
+  "primary": "#7d4e24",
3
+  "html-document": "#3f52e3",
4
+  "thread": "#ad4cf9",
5
+  "file": "#ff9900"
6
+}

+ 3 - 3
frontend/src/container/AppFullscreenManager.jsx Voir le fichier

9
   constructor (props) {
9
   constructor (props) {
10
     super(props)
10
     super(props)
11
     this.state = {
11
     this.state = {
12
-      AmIMounted: false
12
+      isMounted: false
13
     }
13
     }
14
   }
14
   }
15
 
15
 
16
-  componentDidMount = () => this.setState({AmIMounted: true})
16
+  componentDidMount = () => this.setState({isMounted: true})
17
 
17
 
18
   render () {
18
   render () {
19
     const { props } = this
19
     const { props } = this
22
       <div className='AppFullScreenManager'>
22
       <div className='AppFullScreenManager'>
23
         <div id='appFullscreenContainer' />
23
         <div id='appFullscreenContainer' />
24
 
24
 
25
-        {this.state.AmIMounted && (// we must wait for the component to be fully mounted to be sure the div#appFullscreenContainer exists in DOM
25
+        {this.state.isMounted && (// we must wait for the component to be fully mounted to be sure the div#appFullscreenContainer exists in DOM
26
           <div className='emptyDiForRoute'>
26
           <div className='emptyDiForRoute'>
27
             <Route path={PAGE.ADMIN.WORKSPACE} render={() => {
27
             <Route path={PAGE.ADMIN.WORKSPACE} render={() => {
28
               props.renderAppFullscreen({slug: 'admin_workspace_user', hexcolor: '#7d4e24', type: 'workspace'}, props.user, {})
28
               props.renderAppFullscreen({slug: 'admin_workspace_user', hexcolor: '#7d4e24', type: 'workspace'}, props.user, {})

+ 12 - 2
frontend/src/container/Tracim.jsx Voir le fichier

115
             </div>
115
             </div>
116
           } />
116
           } />
117
 
117
 
118
-          <Route path={PAGE.ACCOUNT} component={Account} />
118
+          <Route path={PAGE.ACCOUNT} render={() =>
119
+            <div className='sidebarpagecontainer'>
120
+              <Sidebar />
121
+              <Account />
122
+            </div>
123
+          } />
119
 
124
 
120
-          <Route path={PAGE.ADMIN.ROOT} component={AppFullscreenManager} />
125
+          <Route path={PAGE.ADMIN.ROOT} render={() =>
126
+            <div className='sidebarpagecontainer'>
127
+              <Sidebar />
128
+              <AppFullscreenManager />
129
+            </div>
130
+          } />
121
 
131
 
122
           <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
132
           <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
123
 
133
 

+ 2 - 2
frontend/webpack.config.js Voir le fichier

30
   output: {
30
   output: {
31
     path: path.resolve(__dirname, 'dist/asset'),
31
     path: path.resolve(__dirname, 'dist/asset'),
32
     filename: 'tracim.app.entry.js',
32
     filename: 'tracim.app.entry.js',
33
-    pathinfo: !isProduction
34
-    // publicPath: '/'
33
+    pathinfo: !isProduction,
34
+    publicPath: '/asset/'
35
   },
35
   },
36
   devServer: {
36
   devServer: {
37
     contentBase: path.join(__dirname, 'dist/'),
37
     contentBase: path.join(__dirname, 'dist/'),