]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app.component.ts
register: hide channel step if upload quota is 0
[github/Chocobozzz/PeerTube.git] / client / src / app / app.component.ts
index ef0b1ae56efff122389b63638169bd570b238491..75f4bdfe62d9b8c1e10dcf09dfb0649b58013675 100644 (file)
@@ -11,7 +11,7 @@ import { PluginService } from '@app/core/plugins/plugin.service'
 import { CustomModalComponent } from '@app/modal/custom-modal.component'
 import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component'
 import { WelcomeModalComponent } from '@app/modal/welcome-modal.component'
-import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
+import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap'
 import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
 import { getShortLocale, is18nPath } from '@shared/core-utils/i18n'
 import { BroadcastMessageLevel, ServerConfig, UserRole } from '@shared/models'
@@ -54,8 +54,11 @@ export class AppComponent implements OnInit, AfterViewInit {
     private location: PlatformLocation,
     private modalService: NgbModal,
     private markdownService: MarkdownService,
+    private ngbConfig: NgbConfig,
     public menu: MenuService
-  ) { }
+  ) {
+    this.ngbConfig.animation = false
+  }
 
   get instanceName () {
     return this.serverConfig.instance.name
@@ -180,8 +183,8 @@ export class AppComponent implements OnInit, AfterViewInit {
 
     eventsObs.pipe(
       filter((e: Event): e is GuardsCheckStart => e instanceof GuardsCheckStart),
-      filter(() => this.screenService.isInSmallView())
-    ).subscribe(() => this.menu.isMenuDisplayed = false) // User clicked on a link in the menu, change the page
+      filter(() => this.screenService.isInSmallView() || this.screenService.isInTouchScreen())
+    ).subscribe(() => this.menu.setMenuDisplay(false)) // User clicked on a link in the menu, change the page
   }
 
   private injectBroadcastMessage () {