diff --git a/.travis.yml b/.travis.yml index 51892e504..042719529 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,12 +29,6 @@ before_script: - cp ffmpeg-*-64bit-static/{ffmpeg,ffprobe,ffserver} $HOME/bin - export PATH=$HOME/bin:$PATH - export NODE_TEST_IMAGE=true - - psql -c 'create database peertube_test1;' -U postgres - - psql -c 'create database peertube_test2;' -U postgres - - psql -c 'create database peertube_test3;' -U postgres - - psql -c 'create database peertube_test4;' -U postgres - - psql -c 'create database peertube_test5;' -U postgres - - psql -c 'create database peertube_test6;' -U postgres - psql -c "create user peertube with password 'peertube';" -U postgres matrix: diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 48886fd4e..9d655c523 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -18,6 +18,7 @@ import { VideosModule } from './videos' import { buildFileLocale, getCompleteLocale, isDefaultLocale } from '../../../shared/models/i18n' import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' import { LanguageChooserComponent } from '@app/menu/language-chooser.component' +import { SearchModule } from '@app/search' export function metaFactory (serverService: ServerService): MetaLoader { return new MetaStaticLoader({ @@ -52,6 +53,7 @@ export function metaFactory (serverService: ServerService): MetaLoader { LoginModule, ResetPasswordModule, SignupModule, + SearchModule, SharedModule, VideosModule, diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts index 0e999fbb1..f73d40947 100644 --- a/client/src/app/header/header.component.ts +++ b/client/src/app/header/header.component.ts @@ -24,7 +24,7 @@ export class HeaderComponent implements OnInit { } doSearch () { - this.router.navigate([ '/videos', 'search' ], { + this.router.navigate([ '/search' ], { queryParams: { search: this.searchValue } }) } diff --git a/client/src/app/search/index.ts b/client/src/app/search/index.ts new file mode 100644 index 000000000..40f4e021f --- /dev/null +++ b/client/src/app/search/index.ts @@ -0,0 +1,3 @@ +export * from './search-routing.module' +export * from './search.component' +export * from './search.module' diff --git a/client/src/app/search/search-routing.module.ts b/client/src/app/search/search-routing.module.ts new file mode 100644 index 000000000..0ac9e6b57 --- /dev/null +++ b/client/src/app/search/search-routing.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core' +import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' +import { SearchComponent } from '@app/search/search.component' + +const searchRoutes: Routes = [ + { + path: 'search', + component: SearchComponent, + canActivate: [ MetaGuard ], + data: { + meta: { + title: 'Search' + } + } + } +] + +@NgModule({ + imports: [ RouterModule.forChild(searchRoutes) ], + exports: [ RouterModule ] +}) +export class SearchRoutingModule {} diff --git a/client/src/app/search/search.component.html b/client/src/app/search/search.component.html new file mode 100644 index 000000000..b8c4d7dc5 --- /dev/null +++ b/client/src/app/search/search.component.html @@ -0,0 +1,19 @@ +