mirror of https://github.com/rancher/ui.git
23 lines
595 B
JavaScript
23 lines
595 B
JavaScript
import { inject as service } from '@ember/service';
|
|
import Component from '@ember/component';
|
|
import layout from './template';
|
|
|
|
export default Component.extend({
|
|
layout,
|
|
scope: service(),
|
|
classNames: ['namespace-app'],
|
|
srcSet: false,
|
|
latestVersion: null,
|
|
|
|
didRender() {
|
|
if (!this.get('srcSet')) {
|
|
this.set('srcSet', true);
|
|
var $icon = this.$('.catalog-icon > img');
|
|
$icon.attr('src', $icon.data('src'));
|
|
this.$('img').on('error', () => {
|
|
$icon.attr('src', `${this.get('app.baseAssets')}assets/images/generic-catalog.svg`);
|
|
});
|
|
}
|
|
}
|
|
});
|