Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 0e11e3c

Browse files
darkwingjasonLaster
authored andcommitted
Restore sources tree icons (#5786)
1 parent 2b34694 commit 0e11e3c

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

src/components/PrimaryPanes/SourcesTree.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class SourcesTree extends Component<Props, State> {
219219
}
220220

221221
const sourceType = sourceTypes[getExtension(source)];
222-
return <img className={sourceType || "file"} />;
222+
const classNames = classnames("source-icon", sourceType || "file");
223+
return <img className={classNames} />;
223224
}
224225

225226
return <img className="folder" />;

src/components/shared/Svg.css

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
fill: var(--theme-splitter-color);
1111
}
1212

13-
.file,
1413
.folder,
15-
.domain {
14+
.domain,
15+
.source-icon,
16+
.file {
1617
background-color: var(--theme-comment);
1718
}
1819

1920
.worker,
2021
.file,
21-
.folder {
22+
.folder,
23+
.source-icon {
2224
position: relative;
2325
top: 2px;
2426
}
@@ -39,7 +41,8 @@
3941
}
4042

4143
img.domain,
42-
img.folder {
44+
img.folder,
45+
img.source-icon {
4346
width: 15px;
4447
height: 15px;
4548
}
@@ -52,6 +55,22 @@ img.folder {
5255
mask: url(/images/folder.svg) no-repeat;
5356
}
5457

58+
img.coffeescript {
59+
mask: url(/images/coffeescript.svg) no-repeat;
60+
}
61+
62+
img.javascript {
63+
mask: url(/images/javascript.svg) no-repeat;
64+
}
65+
66+
img.react {
67+
mask: url(/images/react.svg) no-repeat;
68+
}
69+
70+
img.typescript {
71+
mask: url(/images/typescript.svg) no-repeat;
72+
}
73+
5574
img.file {
5675
mask: url(/images/file.svg) no-repeat;
5776
width: 13px;
@@ -60,7 +79,8 @@ img.file {
6079

6180
img.domain,
6281
img.folder,
63-
img.file {
82+
img.file,
83+
img.source-icon {
6484
mask-size: 100%;
6585
margin-inline-end: 5px;
6686
display: inline-block;

0 commit comments

Comments
 (0)