aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-19 16:04:34 +0100
committerChocobozzz <me@florianbigard.com>2018-12-19 17:26:52 +0100
commitf8b2c1b4f509c037b9650cca2c5befd21f056df3 (patch)
tree89d278f9628d657e6aad1b1e15febaf8ff9fcfa9 /client/src/app/+about
parente0e665f0efa98f2701dd9f5529e99989680481ae (diff)
downloadPeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.gz
PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.zst
PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.zip
Refractor notification service
Shorter name and use primeng component
Diffstat (limited to 'client/src/app/+about')
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
index 354f52ce7..36e7a8e5b 100644
--- a/client/src/app/+about/about-instance/about-instance.component.ts
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -1,7 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ServerService } from '@app/core' 2import { Notifier, ServerService } from '@app/core'
3import { MarkdownService } from '@app/videos/shared' 3import { MarkdownService } from '@app/videos/shared'
4import { NotificationsService } from 'angular2-notifications'
5import { I18n } from '@ngx-translate/i18n-polyfill' 4import { I18n } from '@ngx-translate/i18n-polyfill'
6 5
7@Component({ 6@Component({
@@ -9,14 +8,13 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
9 templateUrl: './about-instance.component.html', 8 templateUrl: './about-instance.component.html',
10 styleUrls: [ './about-instance.component.scss' ] 9 styleUrls: [ './about-instance.component.scss' ]
11}) 10})
12
13export class AboutInstanceComponent implements OnInit { 11export class AboutInstanceComponent implements OnInit {
14 shortDescription = '' 12 shortDescription = ''
15 descriptionHTML = '' 13 descriptionHTML = ''
16 termsHTML = '' 14 termsHTML = ''
17 15
18 constructor ( 16 constructor (
19 private notificationsService: NotificationsService, 17 private notifier: Notifier,
20 private serverService: ServerService, 18 private serverService: ServerService,
21 private markdownService: MarkdownService, 19 private markdownService: MarkdownService,
22 private i18n: I18n 20 private i18n: I18n
@@ -43,7 +41,7 @@ export class AboutInstanceComponent implements OnInit {
43 this.termsHTML = this.markdownService.textMarkdownToHTML(res.instance.terms) 41 this.termsHTML = this.markdownService.textMarkdownToHTML(res.instance.terms)
44 }, 42 },
45 43
46 err => this.notificationsService.error(this.i18n('Error getting about from server'), err) 44 () => this.notifier.error(this.i18n('Cannot get about information from server'))
47 ) 45 )
48 } 46 }
49 47