-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathcomponent.js
More file actions
30 lines (22 loc) · 784 Bytes
/
component.js
File metadata and controls
30 lines (22 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import layout from './template';
import config from 'dummy/config/environment';
import { classify } from '@ember/string';
import { addonLogo } from 'ember-cli-addon-docs/utils/computed';
const projectName = config['ember-cli-addon-docs'].projectName;
export default Component.extend({
layout,
tagName: '',
root: 'api',
store: service(),
addonLogo: addonLogo(projectName),
addonTitle: computed('addonLogo', function() {
let logo = this.get('addonLogo');
return classify(projectName.replace(`${logo}-`, ''));
}),
project: computed(function() {
return this.get('store').peekRecord('project', projectName);
})
});