Skip to content

Commit bb4cb11

Browse files
papadopanpamfilos
authored andcommitted
ui: check ui updates
* closes #1937 Signed-off-by: papadopan <antonios.papadopan@gmail.com>
1 parent f9aea50 commit bb4cb11

File tree

6 files changed

+43
-39
lines changed

6 files changed

+43
-39
lines changed

ui/cap-react/src/components/drafts/DraftPreview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,22 @@ const DraftPreview = props => {
167167
wrap={true}
168168
align="start"
169169
justify="center"
170-
colorIndex="light-2"
170+
colorIndex="light-1"
171171
>
172172
{props.error ? showToaster(props.error.message) : null}
173173

174174
<Box
175175
flex={true}
176176
pad={{ between: "medium" }}
177177
direction="column"
178-
style={{ width: "100%", maxWidth: "1200px" }}
178+
style={{ width: "100%", maxWidth: "960px" }}
179179
>
180180
<Box pad={{ horizontal: "medium" }}>
181181
<Box
182182
direction="row"
183183
responsive={false}
184184
justify="between"
185-
colorIndex="light-1"
185+
colorIndex="light-2"
186186
pad={{ horizontal: "medium" }}
187187
margin={{ vertical: "small" }}
188188
style={{ borderRadius: "3px" }}

ui/cap-react/src/components/drafts/DraftsItemIndex.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,7 @@ class DraftsItemIndex extends React.Component {
8585
<DraftsItemNav />
8686

8787
<Box flex={true} className="lg-column">
88-
<Box
89-
flex={true}
90-
colorIndex="light-1"
91-
style={{
92-
margin: "5px"
93-
}}
94-
responsive={false}
95-
>
88+
<Box flex={true} colorIndex="light-1" responsive={false}>
9689
<Switch>
9790
<Route
9891
exact
@@ -121,15 +114,14 @@ class DraftsItemIndex extends React.Component {
121114
/>
122115
</Switch>
123116
</Box>
124-
<Box colorIndex="light-1">
117+
<Box colorIndex="light-2">
125118
<MediaQuery
126119
minWidth={1450}
127120
onChange={matches => this.setState({ expanded: matches })}
128121
>
129122
<span />
130123
</MediaQuery>
131124
<Box
132-
colorIndex="light-1"
133125
className={
134126
this.state.expanded
135127
? "sidebar-hide-small show-sidebar"

ui/cap-react/src/components/drafts/components/DepositSidebar.js

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class DepositSidebar extends React.Component {
3838
size="icon"
3939
icon={<AiOutlinePlus size={20} />}
4040
onClick={this.props.toggleFilemanagerLayer}
41+
hoverColor="#e6e6e6"
42+
background="#d9d9d9"
4143
/>
4244
)}
4345
/>
@@ -57,6 +59,8 @@ class DepositSidebar extends React.Component {
5759
size="icon"
5860
onClick={this._refreshFileList}
5961
icon={<AiOutlineReload size={20} />}
62+
hoverColor="#e6e6e6"
63+
background="#d9d9d9"
6064
/>
6165
)}
6266
/>
@@ -91,23 +95,27 @@ class DepositSidebar extends React.Component {
9195
return (
9296
<Sidebar
9397
full={false}
94-
size="medium"
9598
colorIndex="light-2"
96-
separator="left"
9799
className="lg-row"
100+
style={{ height: "100%" }}
98101
>
99-
<Box flex={false} pad="none" size={{ width: { min: "medium" } }}>
102+
<Box
103+
flex={false}
104+
pad="none"
105+
size={{ width: { min: "medium" } }}
106+
separator="bottom"
107+
margin={{ bottom: "medium" }}
108+
>
100109
<Box flex={false} pad="small" style={{ fontWeight: "100" }}>
101110
<Box
102-
direction="row"
103-
wrap={false}
104111
justify="between"
112+
direction="row"
105113
margin={{ bottom: "small" }}
106114
responsive={false}
115+
wrap={false}
107116
>
108117
ID <span>{this.props.id}</span>
109118
</Box>
110-
111119
{this.props.schema && (
112120
<Box
113121
direction="row"
@@ -122,14 +130,13 @@ class DepositSidebar extends React.Component {
122130
text={`${this.props.schema.fullname} v${
123131
this.props.schema.version
124132
}`}
133+
size="small"
125134
/>
126135
</Box>
127136
)}
128-
129137
<Box
130-
direction="row"
131-
wrap={false}
132138
justify="between"
139+
direction="row"
133140
margin={{ bottom: "small" }}
134141
responsive={false}
135142
align="center"
@@ -138,24 +145,25 @@ class DepositSidebar extends React.Component {
138145
<Tag
139146
text={this.props.status}
140147
color={this._getColorByStatus(this.props.status)}
148+
size="small"
141149
/>
142150
</Box>
143-
144151
<Box
145-
direction="row"
146-
wrap={false}
147152
justify="between"
153+
direction="row"
148154
margin={{ bottom: "small" }}
149155
responsive={false}
156+
align="center"
150157
>
151-
Creator <span>{this.props.created_by}</span>
158+
Creator
159+
<span>{this.props.created_by}</span>
152160
</Box>
153161
<Box
154-
direction="row"
155-
wrap={false}
156162
justify="between"
163+
direction="row"
157164
margin={{ bottom: "small" }}
158165
responsive={false}
166+
align="center"
159167
>
160168
Created:
161169
{this.props.created && (
@@ -165,10 +173,11 @@ class DepositSidebar extends React.Component {
165173
)}
166174
</Box>
167175
<Box
168-
direction="row"
169-
wrap={false}
170176
justify="between"
177+
direction="row"
178+
margin={{ bottom: "small" }}
171179
responsive={false}
180+
align="center"
172181
>
173182
Last Updated:
174183
{this.props.updated && (
@@ -179,7 +188,7 @@ class DepositSidebar extends React.Component {
179188
</Box>
180189
</Box>
181190
</Box>
182-
<Box flex={true} pad="none" colorIndex="light-1">
191+
<Box flex={true} pad="none" colorIndex="light-2">
183192
<SectionHeader
184193
label="Files | Data | Repos"
185194
uppercase={true}
@@ -214,7 +223,8 @@ DepositSidebar.propTypes = {
214223
id: PropTypes.string,
215224
canUpdate: PropTypes.bool,
216225
links: PropTypes.object,
217-
getBucketById: PropTypes.func
226+
getBucketById: PropTypes.func,
227+
schema: PropTypes.object
218228
};
219229

220230
function mapStateToProps(state) {

ui/cap-react/src/components/drafts/components/FileTree/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ class FileTree extends React.Component {
7878
{displayTitle && (
7979
<HorizontalWithText
8080
text="All Repositories"
81-
background={this.props.background}
82-
color={this.props.color}
81+
background={this.props.background || "#f5f5f5"}
82+
color={this.props.color || "#000"}
8383
/>
8484
)}
8585
<RepoTree
@@ -94,8 +94,8 @@ class FileTree extends React.Component {
9494
{displayTitle && (
9595
<HorizontalWithText
9696
text="All Files"
97-
background={this.props.background}
98-
color={this.props.color}
97+
background={this.props.background || "#f5f5f5"}
98+
color={this.props.color || "#000"}
9999
/>
100100
)}
101101
{files.children && files.children.length > 0 ? (

ui/cap-react/src/components/partials/InfoHeaderBox/InfoHeaderBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const InfoHeaderBox = ({ type = "info", content = null }) => {
2222
borderRadius: "3px",
2323
padding: "7px"
2424
}}
25-
colorIndex="light-1"
25+
colorIndex="light-2"
2626
direction="row"
2727
align="center"
2828
justify="center"

ui/cap-react/src/components/partials/SectionBox.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function SectionBox(props) {
2929
<Box
3030
flex={false}
3131
direction="row"
32-
pad="small"
32+
pad={{ vertical: "small" }}
3333
justify="between"
3434
responsive={false}
3535
>
3636
<Heading
37-
tag="h4"
37+
tag="h3"
3838
align="start"
3939
justify="center"
4040
margin="none"
@@ -53,6 +53,8 @@ function SectionBox(props) {
5353
flex={false}
5454
style={{ borderRadius: "3px" }}
5555
className={className}
56+
separator="all"
57+
pad="small"
5658
>
5759
{body}
5860
</Box>

0 commit comments

Comments
 (0)