Browse Source

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

Guénaël Muller 5 years ago
parent
commit
f790a1152e

+ 10 - 1
build_full_frontend.sh View File

@@ -8,7 +8,10 @@ if  [[ $1 = "-w" ]]; then
8 8
     windoz="windoz"
9 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 16
 # Tracim Lib
14 17
 (
@@ -44,4 +47,10 @@ echo -e "\n${BROWN}/!\ ${NC}this script does not run 'npm install'\n${BROWN}/!\
44 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 56
 log "-- frontend build successful."

+ 6 - 0
color.json.sample View File

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

+ 3 - 3
frontend/src/container/AppFullscreenManager.jsx View File

@@ -9,11 +9,11 @@ class AppFullscreenManager extends React.Component {
9 9
   constructor (props) {
10 10
     super(props)
11 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 18
   render () {
19 19
     const { props } = this
@@ -22,7 +22,7 @@ class AppFullscreenManager extends React.Component {
22 22
       <div className='AppFullScreenManager'>
23 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 26
           <div className='emptyDiForRoute'>
27 27
             <Route path={PAGE.ADMIN.WORKSPACE} render={() => {
28 28
               props.renderAppFullscreen({slug: 'admin_workspace_user', hexcolor: '#7d4e24', type: 'workspace'}, props.user, {})

+ 12 - 2
frontend/src/container/Tracim.jsx View File

@@ -115,9 +115,19 @@ class Tracim extends React.Component {
115 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 132
           <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
123 133
 

+ 2 - 2
frontend/webpack.config.js View File

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