From: Chocobozzz Date: Thu, 6 Jul 2017 15:43:58 +0000 (+0200) Subject: Fix page titles X-Git-Tag: v0.0.1-alpha~378 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8b13c289f8db1666a3970882797d42f6cfd6128b;p=oweals%2Fpeertube.git Fix page titles --- diff --git a/client/package.json b/client/package.json index fbfe5ae26..a922fe107 100644 --- a/client/package.json +++ b/client/package.json @@ -32,7 +32,7 @@ "@angular/router": "~4.2.0", "@angularclass/hmr": "^2.1.0", "@angularclass/hmr-loader": "^3.0.2", - "@nglibs/meta": "^0.4.0-rc.1", + "@ngx-meta/core": "^0.4.0-rc.2", "@types/core-js": "^0.9.28", "@types/node": "^6.0.38", "@types/source-map": "^0.1.26", @@ -63,9 +63,9 @@ "ng-router-loader": "^2.0.0", "ng2-file-upload": "^1.1.4-2", "ng2-smart-table": "1.2.1", - "ng2-tag-input": "1.3.3", "ngc-webpack": "3.0.0", "ngx-bootstrap": "1.6.6", + "ngx-chips": "1.4.5-beta", "node-sass": "^4.1.1", "normalize.css": "^7.0.0", "optimize-js-plugin": "0.0.4", diff --git a/client/src/app/+admin/admin-routing.module.ts b/client/src/app/+admin/admin-routing.module.ts index bcc94a9f3..03782c258 100644 --- a/client/src/app/+admin/admin-routing.module.ts +++ b/client/src/app/+admin/admin-routing.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' + import { AdminComponent } from './admin.component' import { FriendsRoutes } from './friends' import { RequestSchedulersRoutes } from './request-schedulers' @@ -11,6 +13,7 @@ const adminRoutes: Routes = [ { path: '', component: AdminComponent, + canActivateChild: [ MetaGuard ], children: [ { path: '', diff --git a/client/src/app/account/account-routing.module.ts b/client/src/app/account/account-routing.module.ts index e9b8f7031..029d97788 100644 --- a/client/src/app/account/account-routing.module.ts +++ b/client/src/app/account/account-routing.module.ts @@ -1,12 +1,15 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' + import { AccountComponent } from './account.component' const accountRoutes: Routes = [ { path: 'account', component: AccountComponent, + canActivate: [ MetaGuard ], data: { meta: { title: 'My account' diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index d7c9f6548..804a7a71e 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -6,7 +6,7 @@ import { createInputTransfer } from '@angularclass/hmr' -import { MetaModule, MetaLoader, MetaStaticLoader, PageTitlePositioning } from '@nglibs/meta' +import { MetaModule, MetaLoader, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' // TODO: remove, we need this to avoid error in ng2-smart-table import 'rxjs/add/operator/toPromise' import 'bootstrap-loader' diff --git a/client/src/app/login/login-routing.module.ts b/client/src/app/login/login-routing.module.ts index 1a91677c0..4d8913041 100644 --- a/client/src/app/login/login-routing.module.ts +++ b/client/src/app/login/login-routing.module.ts @@ -1,12 +1,15 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' + import { LoginComponent } from './login.component' const loginRoutes: Routes = [ { path: 'login', component: LoginComponent, + canActivate: [ MetaGuard ], data: { meta: { title: 'Login' diff --git a/client/src/app/signup/signup-routing.module.ts b/client/src/app/signup/signup-routing.module.ts index 122d6c976..b7ac69b53 100644 --- a/client/src/app/signup/signup-routing.module.ts +++ b/client/src/app/signup/signup-routing.module.ts @@ -1,12 +1,15 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' + import { SignupComponent } from './signup.component' const signupRoutes: Routes = [ { path: 'signup', component: SignupComponent, + canActivate: [ MetaGuard ], data: { meta: { title: 'Signup' diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index 1284aa033..12ddf3eef 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable' import { Subscription } from 'rxjs/Subscription' import videojs from 'video.js' -import { MetaService } from '@nglibs/meta' +import { MetaService } from '@ngx-meta/core' import { NotificationsService } from 'angular2-notifications' import { AuthService, ConfirmService } from '../../core' diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts index 7d002abde..e18c1cec0 100644 --- a/client/src/app/videos/videos-routing.module.ts +++ b/client/src/app/videos/videos-routing.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' + import { VideoAddComponent, VideoUpdateComponent } from './video-edit' import { VideoListComponent } from './video-list' import { VideosComponent } from './videos.component' @@ -10,6 +12,7 @@ const videosRoutes: Routes = [ { path: 'videos', component: VideosComponent, + canActivateChild: [ MetaGuard ], children: [ { path: 'list', diff --git a/client/src/app/videos/videos.module.ts b/client/src/app/videos/videos.module.ts index 75a8dd24f..7d2451de7 100644 --- a/client/src/app/videos/videos.module.ts +++ b/client/src/app/videos/videos.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core' -import { TagInputModule } from 'ng2-tag-input' +import { TagInputModule } from 'ngx-chips' import { VideosRoutingModule } from './videos-routing.module' import { VideosComponent } from './videos.component' diff --git a/client/yarn.lock b/client/yarn.lock index 3b1184f58..b953fcb21 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -80,19 +80,19 @@ version "2.1.1" resolved "https://registry.yarnpkg.com/@angularclass/hmr/-/hmr-2.1.1.tgz#2a797f5d282ec0513b8a2c29ac9e316376c563ef" -"@nglibs/meta@^0.4.0-rc.1": - version "0.4.0-rc.1" - resolved "https://registry.yarnpkg.com/@nglibs/meta/-/meta-0.4.0-rc.1.tgz#d084fcf1f39344087ea2d16e728cfa5f2fd0468a" +"@ngx-meta/core@^0.4.0-rc.2": + version "0.4.0-rc.2" + resolved "https://registry.yarnpkg.com/@ngx-meta/core/-/core-0.4.0-rc.2.tgz#1bd793103a1a5d463ba773db9f56d3eb8575c2c8" dependencies: - tslib "^1.6.0" + tslib "^1.7.0" "@types/core-js@^0.9.28": version "0.9.42" resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.42.tgz#dd6da92cd7d5ab5ca0b4477524537c3e633b6bce" "@types/node@*": - version "8.0.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.7.tgz#fb0ad04b5b6f6eabe0372a32a8f1fbba5c130cae" + version "8.0.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.8.tgz#0dc4ca2c6f6fc69baee16c5e928c4a627f517ada" "@types/node@^6.0.38": version "6.0.79" @@ -4086,12 +4086,6 @@ ng2-smart-table@1.2.1: lodash "^4.17.4" ng2-completer "^1.2.2" -ng2-tag-input@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/ng2-tag-input/-/ng2-tag-input-1.3.3.tgz#612b12b244dfd1efdb9659fd99caafa16762ff56" - dependencies: - ng2-material-dropdown "0.7.7" - ngc-webpack@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ngc-webpack/-/ngc-webpack-3.0.0.tgz#b7caf724e367c22c10f100c5b460f266a0189b63" @@ -4106,6 +4100,12 @@ ngx-bootstrap@1.6.6: dependencies: moment "2.18.1" +ngx-chips@1.4.5-beta: + version "1.4.5-beta" + resolved "https://registry.yarnpkg.com/ngx-chips/-/ngx-chips-1.4.5-beta.tgz#62d11fb900778ac4aa07674d9cefd8d28dd7ec85" + dependencies: + ng2-material-dropdown "0.7.7" + no-case@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.1.tgz#7aeba1c73a52184265554b7dc03baf720df80081" @@ -6126,7 +6126,7 @@ tsickle@^0.21.0: source-map "^0.5.6" source-map-support "^0.4.2" -tslib@^1.0.0, tslib@^1.5.0, tslib@^1.6.0, tslib@^1.7.1: +tslib@^1.0.0, tslib@^1.5.0, tslib@^1.7.0, tslib@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec"