Use different file icon for JSON objects

This commit is contained in:
Basti 2017-11-12 18:27:54 +01:00
parent e6ba3644c4
commit 287a999207
2 changed files with 32 additions and 1 deletions

View File

@ -14,12 +14,17 @@ export default Component.extend({
src: function() {
let prefix = '/img/file-icons/';
let type = this.get('type');
let filename;
if (this.get('isFolder')) {
filename = 'folder.svg';
} else {
filename = 'file.svg';
if (type.match(/json/i)) {
filename = 'code-curly.svg';
} else {
filename = 'file.svg';
}
}
return prefix + filename;

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="filephp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 156 212" enable-background="new 0 0 156 212" xml:space="preserve">
<g>
<path d="M154.826,40.2969L115.6504,1.168c-0.75-0.7459-1.7656-1.168-2.826-1.168H4C1.7912,0,0,1.7893,0,4v204
c0,2.2109,1.7912,4,4,4h148c2.2088,0,4-1.7891,4-4V43.1289C156,42.0665,155.578,41.0509,154.826,40.2969z M142.3436,40H116V13.6565
L142.3436,40z M8,204V8h100v36c0,2.2109,1.7912,4,4,4h36v156H8z"/>
<path d="M103.4,112.08c-0.3468-0.5331-0.6268-1.2667-0.84-2.2c-0.2132-0.9331-0.32-2.12-0.32-3.56v-12.8
c0-3.68-0.68-6.6131-2.04-8.8c-1.36-2.1867-3.64-3.28-6.84-3.28h-4.72v6.32h2.56c1.5468,0,2.5868,0.6,3.12,1.8
s0.8,2.7333,0.8,4.6001V107.6c0,1.6,0.16,2.9733,0.48,4.12c0.32,1.1469,0.72,2.08,1.2,2.8c0.48,0.72,1.0132,1.2669,1.6,1.6401
s1.1468,0.6132,1.68,0.7199v0.16c-0.5332,0.1069-1.0932,0.3469-1.68,0.72c-0.5868,0.3733-1.12,0.92-1.6,1.64
c-0.48,0.72-0.88,1.6533-1.2,2.8c-0.32,1.1469-0.48,2.52-0.48,4.12v13.44c0,1.8669-0.2668,3.4001-0.8,4.6
c-0.5332,1.2-1.5732,1.8001-3.12,1.8001h-2.56v6.3199h4.72c3.2,0,5.48-1.0931,6.84-3.28c1.36-2.1867,2.04-5.12,2.04-8.8v-12.8
c0-1.4399,0.1068-2.6267,0.32-3.56c0.2132-0.9331,0.4932-1.6667,0.84-2.2c0.3468-0.5331,0.7868-0.9067,1.32-1.12
c0.5332-0.2131,1.12-0.32,1.76-0.32v-6.88c-0.64,0-1.2268-0.1067-1.76-0.32C104.1868,112.9869,103.7468,112.6133,103.4,112.08z"/>
<path d="M54.28,84.72c-1.36,2.1869-2.04,5.12-2.04,8.8v12.8c0,1.44-0.1068,2.6269-0.32,3.56c-0.2132,0.9333-0.5068,1.6669-0.88,2.2
c-0.3732,0.5333-0.8132,0.9069-1.32,1.12c-0.5068,0.2133-1.08,0.32-1.72,0.32v6.88c0.64,0,1.2132,0.1069,1.72,0.32
c0.5068,0.2133,0.9468,0.5869,1.32,1.12c0.3732,0.5333,0.6668,1.2669,0.88,2.2c0.2132,0.9333,0.32,2.1201,0.32,3.56v12.8
c0,3.68,0.68,6.6133,2.04,8.8c1.36,2.1869,3.64,3.28,6.84,3.28h4.64v-6.3199H63.2c-1.4932,0-2.5068-0.6001-3.04-1.8001
c-0.5332-1.1999-0.8-2.7331-0.8-4.6v-13.44c0-1.6-0.16-2.9731-0.48-4.12c-0.32-1.1467-0.7332-2.08-1.24-2.8
c-0.5068-0.72-1.0532-1.2667-1.64-1.64c-0.5868-0.3731-1.1468-0.6131-1.68-0.72v-0.16c0.5332-0.1067,1.0932-0.3467,1.68-0.7199
s1.1332-0.9201,1.64-1.6401c0.5068-0.72,0.92-1.6531,1.24-2.8c0.32-1.1467,0.48-2.52,0.48-4.12V94.1601
c0-1.8668,0.2668-3.4001,0.8-4.6001s1.5468-1.8,3.04-1.8h2.56v-6.32h-4.64C57.92,81.44,55.64,82.5333,54.28,84.72z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB