From 7193ad1044d2dfad8f929f0951f9a3601c056f67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Feb 2018 17:31:05 +0100 Subject: Add service worker --- client/src/app/app.module.ts | 9 ++++++-- .../src/app/shared/video/abstract-video-list.scss | 24 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 1134d061b..34114b60b 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -1,9 +1,11 @@ import { NgModule } from '@angular/core' import { BrowserModule } from '@angular/platform-browser' +import { ServiceWorkerModule } from '@angular/service-worker' import { AboutModule } from '@app/about' import { ResetPasswordModule } from '@app/reset-password' import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' +import { environment } from '../environments/environment' import { AccountModule } from './account' @@ -24,7 +26,8 @@ export function metaFactory (): MetaLoader { applicationName: 'PeerTube', defaults: { title: 'PeerTube', - description: 'PeerTube, a decentralized video streaming platform using P2P (BitTorrent) directly in the web browser' + description: 'PeerTube, a federated (ActivityPub) video streaming platform ' + + 'using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. ' } }) } @@ -57,7 +60,9 @@ export function metaFactory (): MetaLoader { MetaModule.forRoot({ provide: MetaLoader, useFactory: (metaFactory) - }) + }), + + ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }) ], providers: [ ] }) diff --git a/client/src/app/shared/video/abstract-video-list.scss b/client/src/app/shared/video/abstract-video-list.scss index 52797bc6c..0f0ff20f0 100644 --- a/client/src/app/shared/video/abstract-video-list.scss +++ b/client/src/app/shared/video/abstract-video-list.scss @@ -5,3 +5,27 @@ text-align: left; } } + +@media screen and (max-width: 400px) and (min-resolution: 1.5dppx) { + .videos { + text-align: center; + + /deep/ .video-miniature { + padding-right: 0; + height: 215px; + width: 100%; + + .video-miniature-information { + width: 100%; + } + + /deep/ .video-thumbnail { + width: 100%; + + img { + width: 100%; + } + } + } + } +} -- cgit v1.2.3