2015-10-07 12:47:57 +03:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-22 21:17:48 +03:00
|
|
|
import { SpecManager, RedocComponent, BaseComponent } from '../base';
|
2016-07-21 13:35:27 +03:00
|
|
|
import { OptionsService, MenuService } from '../../services/index';
|
2015-10-07 12:47:57 +03:00
|
|
|
|
2015-10-09 23:19:35 +03:00
|
|
|
@RedocComponent({
|
|
|
|
selector: 'api-info',
|
2016-05-25 18:34:31 +03:00
|
|
|
styleUrls: ['./api-info.css'],
|
|
|
|
templateUrl: './api-info.html'
|
2015-10-07 12:47:57 +03:00
|
|
|
})
|
2016-05-06 00:48:41 +03:00
|
|
|
export class ApiInfo extends BaseComponent {
|
2016-07-20 11:07:08 +03:00
|
|
|
info: any;
|
2016-05-25 18:34:31 +03:00
|
|
|
specUrl: String;
|
2016-07-21 13:35:27 +03:00
|
|
|
constructor(specMgr:SpecManager, private optionsService:OptionsService, private menuServ: MenuService) {
|
2016-06-23 17:36:38 +03:00
|
|
|
super(specMgr);
|
2015-10-07 12:47:57 +03:00
|
|
|
}
|
2016-06-13 20:54:24 +03:00
|
|
|
|
2016-07-20 11:07:08 +03:00
|
|
|
init() {
|
|
|
|
this.info = this.componentSchema.info;
|
2016-05-06 12:46:41 +03:00
|
|
|
this.specUrl = this.optionsService.options.specUrl;
|
2016-07-20 11:07:08 +03:00
|
|
|
if (parseInt(this.info.version.substring(0, 1)) !== NaN) {
|
|
|
|
this.info.version = 'v' + this.info.version;
|
2016-07-01 18:09:42 +03:00
|
|
|
}
|
2015-10-07 12:47:57 +03:00
|
|
|
}
|
|
|
|
}
|