diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-15 16:52:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-15 18:20:56 +0200 |
commit | bbe0f0645ca958d33a3f409b15166609733b663f (patch) | |
tree | edcd5d702c73cda74a2177c4bdc08c616334337d /client/src/app/app.component.ts | |
parent | 2baea0c77cc765f7cbca9c9a2f4272268892a35c (diff) | |
download | PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.tar.gz PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.tar.zst PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.zip |
Add ability to schedule video publication
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 0bfe9f916..494cd9ea6 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core' | |||
2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
3 | import { GuardsCheckStart, NavigationEnd, Router } from '@angular/router' | 3 | import { GuardsCheckStart, NavigationEnd, Router } from '@angular/router' |
4 | import { AuthService, RedirectService, ServerService } from '@app/core' | 4 | import { AuthService, RedirectService, ServerService } from '@app/core' |
5 | import { isInSmallView } from '@app/shared/misc/utils' | ||
6 | import { is18nPath } from '../../../shared/models/i18n' | 5 | import { is18nPath } from '../../../shared/models/i18n' |
6 | import { ScreenService } from '@app/shared/misc/screen.service' | ||
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | selector: 'my-app', | 9 | selector: 'my-app', |
@@ -33,7 +33,8 @@ export class AppComponent implements OnInit { | |||
33 | private authService: AuthService, | 33 | private authService: AuthService, |
34 | private serverService: ServerService, | 34 | private serverService: ServerService, |
35 | private domSanitizer: DomSanitizer, | 35 | private domSanitizer: DomSanitizer, |
36 | private redirectService: RedirectService | 36 | private redirectService: RedirectService, |
37 | private screenService: ScreenService | ||
37 | ) { } | 38 | ) { } |
38 | 39 | ||
39 | get serverVersion () { | 40 | get serverVersion () { |
@@ -75,14 +76,14 @@ export class AppComponent implements OnInit { | |||
75 | this.serverService.loadVideoPrivacies() | 76 | this.serverService.loadVideoPrivacies() |
76 | 77 | ||
77 | // Do not display menu on small screens | 78 | // Do not display menu on small screens |
78 | if (isInSmallView()) { | 79 | if (this.screenService.isInSmallView()) { |
79 | this.isMenuDisplayed = false | 80 | this.isMenuDisplayed = false |
80 | } | 81 | } |
81 | 82 | ||
82 | this.router.events.subscribe( | 83 | this.router.events.subscribe( |
83 | e => { | 84 | e => { |
84 | // User clicked on a link in the menu, change the page | 85 | // User clicked on a link in the menu, change the page |
85 | if (e instanceof GuardsCheckStart && isInSmallView()) { | 86 | if (e instanceof GuardsCheckStart && this.screenService.isInSmallView()) { |
86 | this.isMenuDisplayed = false | 87 | this.isMenuDisplayed = false |
87 | } | 88 | } |
88 | } | 89 | } |