diff options
-rw-r--r-- | client/src/app/header/header.component.ts | 9 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.html | 7 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.scss | 5 | ||||
-rw-r--r-- | client/src/app/videos/video-list/video-search.component.ts | 3 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 2 | ||||
-rw-r--r-- | yarn.lock | 8 |
8 files changed, 24 insertions, 14 deletions
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts index 6b0ee67ff..42de2dd92 100644 --- a/client/src/app/header/header.component.ts +++ b/client/src/app/header/header.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router, NavigationEnd } from '@angular/router' |
3 | import { getParameterByName } from '../shared/misc/utils' | 3 | import { getParameterByName } from '../shared/misc/utils' |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
@@ -14,8 +14,11 @@ export class HeaderComponent implements OnInit { | |||
14 | constructor (private router: Router) {} | 14 | constructor (private router: Router) {} |
15 | 15 | ||
16 | ngOnInit () { | 16 | ngOnInit () { |
17 | const searchQuery = getParameterByName('search', window.location.href) | 17 | this.router.events |
18 | if (searchQuery) this.searchValue = searchQuery | 18 | .filter(e => e instanceof NavigationEnd) |
19 | .map(() => getParameterByName('search', window.location.href)) | ||
20 | .filter(searchQuery => !!searchQuery) | ||
21 | .subscribe(searchQuery => this.searchValue = searchQuery) | ||
19 | } | 22 | } |
20 | 23 | ||
21 | doSearch () { | 24 | doSearch () { |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 52e3e429a..91e590094 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
@@ -22,8 +22,11 @@ | |||
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <div class="video-info-by"> | 24 | <div class="video-info-by"> |
25 | By {{ video.by }} | 25 | <a [routerLink]="[ '/videos', 'search' ]" [queryParams]="{ search: video.account.name }" title="Search videos of this account"> |
26 | <img [src]="getAvatarPath()" alt="Account avatar" /> | 26 | By {{ video.by }} |
27 | <img [src]="getAvatarPath()" alt="Account avatar" /> | ||
28 | </a> | ||
29 | |||
27 | <my-video-feed [syndicationItems]="syndicationItems"></my-video-feed> | 30 | <my-video-feed [syndicationItems]="syndicationItems"></my-video-feed> |
28 | </div> | 31 | </div> |
29 | </div> | 32 | </div> |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 8a3e2584b..3ebeccd4b 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
@@ -73,6 +73,11 @@ | |||
73 | align-items: center; | 73 | align-items: center; |
74 | font-size: 13px; | 74 | font-size: 13px; |
75 | 75 | ||
76 | a { | ||
77 | color: black; | ||
78 | display: inline-block; | ||
79 | } | ||
80 | |||
76 | img { | 81 | img { |
77 | @include avatar(18px); | 82 | @include avatar(18px); |
78 | 83 | ||
diff --git a/client/src/app/videos/video-list/video-search.component.ts b/client/src/app/videos/video-list/video-search.component.ts index ef9afa757..46a9dd48e 100644 --- a/client/src/app/videos/video-list/video-search.component.ts +++ b/client/src/app/videos/video-list/video-search.component.ts | |||
@@ -7,7 +7,6 @@ import { Subscription } from 'rxjs/Subscription' | |||
7 | import { AuthService } from '../../core/auth' | 7 | import { AuthService } from '../../core/auth' |
8 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 8 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
9 | import { VideoService } from '../../shared/video/video.service' | 9 | import { VideoService } from '../../shared/video/video.service' |
10 | import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum' | ||
11 | 10 | ||
12 | @Component({ | 11 | @Component({ |
13 | selector: 'my-videos-search', | 12 | selector: 'my-videos-search', |
@@ -64,6 +63,6 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O | |||
64 | } | 63 | } |
65 | 64 | ||
66 | generateSyndicationList () { | 65 | generateSyndicationList () { |
67 | throw new Error('Method not implemented.') | 66 | throw new Error('Search does not support syndication.') |
68 | } | 67 | } |
69 | } | 68 | } |
diff --git a/package.json b/package.json index e3007bea9..6a6275fb9 100644 --- a/package.json +++ b/package.json | |||
@@ -91,7 +91,7 @@ | |||
91 | "safe-buffer": "^5.0.1", | 91 | "safe-buffer": "^5.0.1", |
92 | "scripty": "^1.5.0", | 92 | "scripty": "^1.5.0", |
93 | "sequelize": "4.37.6", | 93 | "sequelize": "4.37.6", |
94 | "sequelize-typescript": "^0.6.1", | 94 | "sequelize-typescript": "0.6.4-beta.0", |
95 | "sharp": "^0.20.0", | 95 | "sharp": "^0.20.0", |
96 | "uuid": "^3.1.0", | 96 | "uuid": "^3.1.0", |
97 | "validator": "^9.0.0", | 97 | "validator": "^9.0.0", |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 244099015..b4cd67158 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -418,7 +418,7 @@ async function removeVideo (req: express.Request, res: express.Response) { | |||
418 | } | 418 | } |
419 | 419 | ||
420 | async function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) { | 420 | async function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) { |
421 | const resultList = await VideoModel.searchAndPopulateAccountAndServerAndTags( | 421 | const resultList = await VideoModel.searchAndPopulateAccountAndServer( |
422 | req.query.search, | 422 | req.query.search, |
423 | req.query.start, | 423 | req.query.start, |
424 | req.query.count, | 424 | req.query.count, |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index ffb9725b4..a7923b477 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -696,7 +696,7 @@ export class VideoModel extends Model<VideoModel> { | |||
696 | }) | 696 | }) |
697 | } | 697 | } |
698 | 698 | ||
699 | static async searchAndPopulateAccountAndServerAndTags (value: string, start: number, count: number, sort: string) { | 699 | static async searchAndPopulateAccountAndServer (value: string, start: number, count: number, sort: string) { |
700 | const query: IFindOptions<VideoModel> = { | 700 | const query: IFindOptions<VideoModel> = { |
701 | offset: start, | 701 | offset: start, |
702 | limit: count, | 702 | limit: count, |
@@ -4585,7 +4585,7 @@ performance-now@^2.1.0: | |||
4585 | version "2.1.0" | 4585 | version "2.1.0" |
4586 | resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" | 4586 | resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" |
4587 | 4587 | ||
4588 | pfeed@^1.1.2: | 4588 | pfeed@^1.1.5: |
4589 | version "1.1.5" | 4589 | version "1.1.5" |
4590 | resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.5.tgz#6d0ab54209c60b45de03a15efaab7be867a3f71a" | 4590 | resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.5.tgz#6d0ab54209c60b45de03a15efaab7be867a3f71a" |
4591 | dependencies: | 4591 | dependencies: |
@@ -5408,9 +5408,9 @@ send@0.16.2: | |||
5408 | range-parser "~1.2.0" | 5408 | range-parser "~1.2.0" |
5409 | statuses "~1.4.0" | 5409 | statuses "~1.4.0" |
5410 | 5410 | ||
5411 | sequelize-typescript@^0.6.1: | 5411 | sequelize-typescript@0.6.4-beta.0: |
5412 | version "0.6.3" | 5412 | version "0.6.4-beta.0" |
5413 | resolved "https://registry.yarnpkg.com/sequelize-typescript/-/sequelize-typescript-0.6.3.tgz#567ef7d12193c16aac7ee85e5d321e8980fb817d" | 5413 | resolved "https://registry.yarnpkg.com/sequelize-typescript/-/sequelize-typescript-0.6.4-beta.0.tgz#c36e4bfc030dd59b1211967ecace243601b2242e" |
5414 | dependencies: | 5414 | dependencies: |
5415 | "@types/bluebird" "3.5.18" | 5415 | "@types/bluebird" "3.5.18" |
5416 | "@types/node" "6.0.41" | 5416 | "@types/node" "6.0.41" |