Skip to content

Commit 82774e8

Browse files
committed
fixes to asset list
1 parent 28a6756 commit 82774e8

File tree

7 files changed

+46
-49
lines changed

7 files changed

+46
-49
lines changed

client/modules/IDE/components/AssetList.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { connect } from 'react-redux';
33
import { bindActionCreators } from 'redux';
44
import { Link } from 'react-router';
55
import InlineSVG from 'react-inlinesvg';
6-
import * as AssetActions from '../actions/assets';
76
import prettyBytes from 'pretty-bytes';
87

8+
import * as AssetActions from '../actions/assets';
9+
910
const trashCan = require('../../../images/trash-can.svg');
1011

1112
class AssetList extends React.Component {

client/styles/components/_asset-list.scss

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
overflow-y: scroll;
44
max-width: 100%;
55
width: #{1000 / $base-font-size}rem;
6+
min-height: #{400 / $base-font-size}rem;
67
}
78

89
.asset-table {
@@ -31,7 +32,6 @@
3132
margin: #{10 / $base-font-size}rem;
3233
height: #{72 / $base-font-size}rem;
3334
font-size: #{16 / $base-font-size}rem;
34-
cursor: pointer;
3535

3636
&:nth-child(odd) {
3737
@include themify() {
@@ -52,18 +52,18 @@
5252
height:#{20 / $base-font-size}rem;
5353
}
5454

55-
.visibility-toggle:hover .asset-list__delete-button {
56-
@include themify() {
57-
background-color: transparent;
58-
border: none;
59-
cursor: pointer;
60-
padding: 0;
61-
position: initial;
62-
left: 0;
63-
top: 0;
64-
& g {
65-
opacity: 1;
66-
fill: getThemifyVariable('icon-hover-color');
67-
}
68-
}
69-
}
55+
// .visibility-toggle:hover .asset-list__delete-button {
56+
// @include themify() {
57+
// background-color: transparent;
58+
// border: none;
59+
// cursor: pointer;
60+
// padding: 0;
61+
// position: initial;
62+
// left: 0;
63+
// top: 0;
64+
// & g {
65+
// opacity: 1;
66+
// fill: getThemifyVariable('icon-hover-color');
67+
// }
68+
// }
69+
// }
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.keyboard-shortcuts {
2+
padding: #{20 / $base-font-size}rem;
3+
padding-bottom: #{40 / $base-font-size}rem;
4+
width: #{450 / $base-font-size}rem;
5+
}
6+
7+
.keyboard-shortcut-item {
8+
display: flex;
9+
& + & {
10+
margin-top: #{10 / $base-font-size}rem;
11+
}
12+
align-items: baseline;
13+
}
14+
15+
.keyboard-shortcut__command {
16+
width: 50%;
17+
font-weight: bold;
18+
text-align: right;
19+
padding-right: #{10 / $base-font-size}rem;
20+
}

client/styles/components/_modal.scss

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,3 @@
5050
text-align: center;
5151
margin: #{20 / $base-font-size}rem 0;
5252
}
53-
54-
.uploader {
55-
min-height: #{200 / $base-font-size}rem;
56-
width: 100%;
57-
text-align: center;
58-
}
59-
60-
.keyboard-shortcuts {
61-
padding: #{20 / $base-font-size}rem;
62-
padding-bottom: #{40 / $base-font-size}rem;
63-
width: #{450 / $base-font-size}rem;
64-
}
65-
66-
.keyboard-shortcut-item {
67-
display: flex;
68-
& + & {
69-
margin-top: #{10 / $base-font-size}rem;
70-
}
71-
align-items: baseline;
72-
}
73-
74-
.keyboard-shortcut__command {
75-
width: 50%;
76-
font-weight: bold;
77-
text-align: right;
78-
padding-right: #{10 / $base-font-size}rem;
79-
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
.dropzone {
22
color: $primary-text-color;
3+
}
4+
5+
.uploader {
6+
min-height: #{200 / $base-font-size}rem;
7+
width: 100%;
8+
text-align: center;
39
}

client/styles/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@import 'components/help-modal';
3737
@import 'components/share';
3838
@import 'components/asset-list';
39+
@import 'components/keyboard-shortcuts';
3940

4041
@import 'layout/ide';
4142
@import 'layout/fullscreen';

server/controllers/aws.controller.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,11 @@ export function listObjectsInS3ForUser(req, res) {
120120
let assets = [];
121121
const list = client.listObjects(params)
122122
.on('data', (data) => {
123-
console.log(data);
124123
assets = assets.concat(data["Contents"].map((object) => {
125124
return { key: object["Key"], size: object["Size"] };
126125
}));
127126
})
128127
.on('end', () => {
129-
console.log(assets);
130-
// res.json({assets});
131-
//map objects to project
132128
const projectAssets = [];
133129
getProjectsForUserId(userId).then((projects) => {
134130
projects.forEach((project) => {
@@ -145,9 +141,9 @@ export function listObjectsInS3ForUser(req, res) {
145141
key: foundAsset.key,
146142
size: foundAsset.size
147143
});
144+
res.json({assets: projectAssets});
148145
});
149146
});
150-
res.json({assets});
151147
});
152148
});
153149
});

0 commit comments

Comments
 (0)