]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-comment/video-comment.model.ts
Fix terms/code of conduct link toggle
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-comment / video-comment.model.ts
index 9a4e3954e5b2bdcf6bc6ddd6c9e2d7d3a9a01e5b..adab4cfbda43ede60833b4cdcba765b7d7aebfb5 100644 (file)
@@ -1,6 +1,10 @@
 import { getAbsoluteAPIUrl } from '@app/helpers'
-import { Account, Actor } from '@app/shared/shared-main'
-import { Account as AccountInterface, VideoComment as VideoCommentServerModel, VideoCommentAdmin as VideoCommentAdminServerModel } from '@shared/models'
+import { Actor, Video } from '@app/shared/shared-main'
+import {
+  Account as AccountInterface,
+  VideoComment as VideoCommentServerModel,
+  VideoCommentAdmin as VideoCommentAdminServerModel
+} from '@shared/models'
 
 export class VideoComment implements VideoCommentServerModel {
   id: number
@@ -85,7 +89,7 @@ export class VideoCommentAdmin implements VideoCommentAdminServerModel {
       id: hash.video.id,
       uuid: hash.video.uuid,
       name: hash.video.name,
-      localUrl: '/videos/watch/' + hash.video.uuid
+      localUrl: Video.buildWatchUrl(hash.video)
     }
 
     this.localUrl = this.video.localUrl + ';threadId=' + this.threadId
@@ -95,7 +99,7 @@ export class VideoCommentAdmin implements VideoCommentAdminServerModel {
     if (this.account) {
       this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host)
 
-      this.account.localUrl = '/accounts/' + this.by
+      this.account.localUrl = '/a/' + this.by
     }
   }
 }