595eb480ba
This lets users navigate the allocation filesystem. It doesn’t support viewing actual files yet.
19 lines
489 B
JavaScript
19 lines
489 B
JavaScript
import Component from '@ember/component';
|
|
import { computed } from '@ember/object';
|
|
import { isEmpty } from '@ember/utils';
|
|
|
|
export default Component.extend({
|
|
tagName: '',
|
|
|
|
pathToEntry: computed('path', 'entry.Name', function() {
|
|
const pathWithNoLeadingSlash = this.get('path').replace(/^\//, '');
|
|
const name = this.get('entry.Name');
|
|
|
|
if (isEmpty(pathWithNoLeadingSlash)) {
|
|
return name;
|
|
} else {
|
|
return `${pathWithNoLeadingSlash}/${name}`;
|
|
}
|
|
}),
|
|
});
|