Browse Source

refactored FileItem into ContentItem + fixed sidebar expand btn + deprecated workspace/filetype folder

Skylsmoi 6 years ago
parent
commit
3386f9466c

+ 1 - 0
src/component/Workspace/BtnExtandedAction.jsx View File

@@ -15,6 +15,7 @@ const ExtandedAction = props => {
15 15
       >
16 16
         <i className='fa fa-fw fa-ellipsis-h' />
17 17
       </button>
18
+
18 19
       <div className='extandedaction__subdropdown dropdown-menu' aria-labelledby='dropdownMenuButton'>
19 20
         <div className='subdropdown__item dropdown-item d-flex align-items-center' onClick={props.onClickExtendedAction.edit}>
20 21
           <div className='subdropdown__item__icon mr-3'>

src/component/Workspace/FileItem.jsx → src/component/Workspace/ContentItem.jsx View File

@@ -53,26 +53,12 @@ const FileItem = props => {
53 53
         <div className='file__name__text'>
54 54
           { props.name }
55 55
         </div>
56
-
57
-
58
-        {/*
59
-          <div className='file__name__icons d-none d-md-flex'>
60
-            <div className='file__name__icons__download'>
61
-              <i className='fa fa-download' />
62
-            </div>
63
-            <div className='file__name__icons__archive'>
64
-              <i className='fa fa-archive' />
65
-            </div>
66
-            <div className='file__name__icons__delete'>
67
-              <i className='fa fa-trash-o' />
68
-            </div>
69
-          </div>
70
-        */ }
71 56
       </div>
72 57
 
73 58
       <div className='d-none d-md-flex'>
74 59
         <BtnExtandedAction onClickExtendedAction={props.onClickExtendedAction} />
75 60
       </div>
61
+
76 62
       <div className={classnames('file__status d-flex align-items-center justify-content-start') + colorStatus}>
77 63
         <div className='file__status__icon d-block '>
78 64
           <i className={iconStatus} />

src/component/Workspace/FileItemHeader.jsx → src/component/Workspace/ContentItemHeader.jsx View File


+ 2 - 0
src/component/Workspace/FileType/deprecated_folder View File

@@ -0,0 +1,2 @@
1
+this folder is deprecated.
2
+content types are handled by respective apps

+ 1 - 1
src/component/Workspace/Folder.jsx View File

@@ -2,7 +2,7 @@ import React from 'react'
2 2
 import { translate } from 'react-i18next'
3 3
 import PropTypes from 'prop-types'
4 4
 import classnames from 'classnames'
5
-import FileItem from './FileItem.jsx'
5
+import FileItem from './ContentItem.jsx'
6 6
 // import PopupExtandedAction from '../../container/PopupExtandedAction.jsx'
7 7
 import BtnExtandedAction from './BtnExtandedAction.jsx'
8 8
 

+ 4 - 4
src/container/Sidebar.jsx View File

@@ -64,11 +64,11 @@ class Sidebar extends React.Component {
64 64
 
65 65
     return (
66 66
       <div className={classnames('sidebar', {'sidebarclose': sidebarClose})}>
67
-        <div className='sidebar__expand' onClick={this.handleClickToggleSidebar}>
68
-          <i className={classnames('fa fa-chevron-left', {'fa-chevron-right': sidebarClose, 'fa-chevron-left': !sidebarClose})} />
69
-        </div>
70
-
71 67
         <div className='sidebarSticky'>
68
+          <div className='sidebar__expand' onClick={this.handleClickToggleSidebar}>
69
+            <i className={classnames('fa fa-chevron-left', {'fa-chevron-right': sidebarClose, 'fa-chevron-left': !sidebarClose})} />
70
+          </div>
71
+
72 72
           <nav className='sidebar__navigation'>
73 73
             <ul className='sidebar__navigation__workspace'>
74 74
               { workspaceList.map((ws, i) =>

+ 4 - 4
src/container/WorkspaceContent.jsx View File

@@ -3,8 +3,8 @@ import { connect } from 'react-redux'
3 3
 import appFactory from '../appFactory.js'
4 4
 import Sidebar from './Sidebar.jsx'
5 5
 import Folder from '../component/Workspace/Folder.jsx'
6
-import FileItem from '../component/Workspace/FileItem.jsx'
7
-import FileItemHeader from '../component/Workspace/FileItemHeader.jsx'
6
+import ContentItem from '../component/Workspace/ContentItem.jsx'
7
+import ContentItemHeader from '../component/Workspace/ContentItemHeader.jsx'
8 8
 import PageWrapper from '../component/common/layout/PageWrapper.jsx'
9 9
 import PageTitle from '../component/common/layout/PageTitle.jsx'
10 10
 import PageContent from '../component/common/layout/PageContent.jsx'
@@ -98,7 +98,7 @@ class WorkspaceContent extends React.Component {
98 98
 
99 99
           <PageContent parentClass='workspace__content'>
100 100
             <div className='workspace__content__fileandfolder folder__content active'>
101
-              <FileItemHeader />
101
+              <ContentItemHeader />
102 102
 
103 103
               { filteredWorkspaceContent.map((c, i) => c.type === 'folder'
104 104
                 ? (
@@ -119,7 +119,7 @@ class WorkspaceContent extends React.Component {
119 119
                   />
120 120
                 )
121 121
                 : (
122
-                  <FileItem
122
+                  <ContentItem
123 123
                     name={c.title}
124 124
                     type={c.type}
125 125
                     icon={(app[c.type] || {icon: ''}).icon}