import {Component} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Title} from '@angular/platform-browser'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {FAQ} from "../openaireLibrary/utils/entities/FAQ"; @Component({ selector: 'learn-how', template: `
` }) export class LearnHowComponent { public piwiksub: any; questions: FAQ[] = [ /*{ question: 'Coming soon?', answer: 'Yes' }, { question: 'Could you be more specific?', answer: 'No' }*/ ]; public gifs: {"gif": string, "header": string, "text"}[] = []; private pageTitle = "OpenAIRE - Connect | Learn How"; properties:EnvProperties; constructor ( private route: ActivatedRoute, private _router: Router, private _title: Title, private _piwikService: PiwikService) { var description = "OpenAIRE - Connect, Community Dashboard, research community"; this._title.setTitle(this.pageTitle); } public ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect | Create and manage your community page", this.properties.piwikSiteId).subscribe(); } }); this.createGifs(); } public ngOnDestroy() { if(this.piwiksub){ this.piwiksub.unsubscribe(); } } private createGifs() { this.gifs.push({ gif: "../../../../assets/about/gifs/profile.gif", header: "Profile", text: "Edit community information, change logo url, add community managers or organizations related to community." }); this.gifs.push({ gif: "../../../../assets/about/gifs/content.gif", header: "Content", text: "Manage projects, content providers, subjects and zenodo communities that are related to the research community." }); this.gifs.push({ gif: "../../../../assets/about/gifs/statistics.gif", header: "Statistics & Charts", text: "Manage statistical numbers & charts that will be displayed in the community overview and graph analysis views." }); this.gifs.push({ gif: "../../../../assets/about/gifs/links.gif", header: "Links", text: " Manage user claims related to the research community." }); this.gifs.push({ gif: "../../../../assets/about/gifs/help.gif", header: " Help texts", text: "Add or edit help text in research community pages." }); this.gifs.push({ gif: "../../../../assets/about/gifs/users.gif", header: "Users", text: "Invite more users to subscribe, manage community subscribers, your personal info and notification settings." }); } }