Turn dir listings into UL, so we can use normal links

This commit is contained in:
2017-11-12 15:36:09 +01:00
parent d924303c32
commit 93d8c68949
7 changed files with 69 additions and 53 deletions

View File

@@ -2,12 +2,27 @@ import Component from '@ember/component';
export default Component.extend({
tagName: 'img',
classNames: ['item-icon'],
attributeBindings: ['src:src'],
type: null,
isFolder: function() {
return this.get('type') === 'folder';
}.property('type')
}.property('type'),
src: function() {
let prefix = '/img/file-icons/';
let filename;
if (this.get('isFolder')) {
filename = 'folder.svg';
} else {
filename = 'file.svg';
}
return prefix + filename;
}.property()
});

View File

@@ -1,5 +0,0 @@
{{#if isFolder}}
<img src="/img/file-icons/folder.svg">
{{else}}
<img src="/img/file-icons/file.svg">
{{/if}}