diff options
author | Kimsible <kimsible@users.noreply.github.com> | 2021-04-28 23:45:23 +0200 |
---|---|---|
committer | Kimsible <kimsible@users.noreply.github.com> | 2021-05-05 11:48:25 +0200 |
commit | 718873964490d1aa31b0e99852002165637e4b9e (patch) | |
tree | 55b66793e382e901a4fbceb15fc2b5822e54e650 /client/src/app/root.component.ts | |
parent | 69e076ddb0deda9e4120bab095d3369bb19fbd1e (diff) | |
download | PeerTube-718873964490d1aa31b0e99852002165637e4b9e.tar.gz PeerTube-718873964490d1aa31b0e99852002165637e4b9e.tar.zst PeerTube-718873964490d1aa31b0e99852002165637e4b9e.zip |
Make /a and /c default URLs for accounts and channels
Diffstat (limited to 'client/src/app/root.component.ts')
-rw-r--r-- | client/src/app/root.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/root.component.ts b/client/src/app/root.component.ts index c65f59448..ae999e058 100644 --- a/client/src/app/root.component.ts +++ b/client/src/app/root.component.ts | |||
@@ -30,12 +30,12 @@ export class RootComponent implements OnInit { | |||
30 | ])) | 30 | ])) |
31 | ) | 31 | ) |
32 | .subscribe(actor => { | 32 | .subscribe(actor => { |
33 | if (actor.constructor.name === 'Account') { | 33 | if (/\/accounts\//.test(actor.url)) { |
34 | this.router.navigateByUrl(`/accounts/${actor.name}`) | 34 | this.router.navigate([ `/a/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true }) |
35 | } | 35 | } |
36 | 36 | ||
37 | if (actor.constructor.name === 'VideoChannel') { | 37 | if (/\/video-channels\//.test(actor.url)) { |
38 | this.router.navigateByUrl(`/video-channels/${actor.name}`) | 38 | this.router.navigate([ `/c/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true }) |
39 | } | 39 | } |
40 | }) | 40 | }) |
41 | } | 41 | } |