]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+accounts/accounts.component.ts
Fix backend channel name validator consistency
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / accounts.component.ts
index abee0b9bbb726543f2ec29416bffe4fb6675c8eb..5b59f3cd0e556ea73d73a82a456238e999c7bfd9 100644 (file)
@@ -13,8 +13,7 @@ import {
   VideoService
 } from '@app/shared/shared-main'
 import { AccountReportComponent } from '@app/shared/shared-moderation'
-import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
-import { User, UserRight } from '@shared/models'
+import { HttpStatusCode, User, UserRight } from '@shared/models'
 import { AccountSearchComponent } from './account-search/account-search.component'
 
 @Component({
@@ -66,7 +65,7 @@ export class AccountsComponent implements OnInit, OnDestroy {
                           distinctUntilChanged(),
                           switchMap(accountId => this.accountService.getAccount(accountId)),
                           tap(account => this.onAccount(account)),
-                          switchMap(account => this.videoChannelService.listAccountVideoChannels(account)),
+                          switchMap(account => this.videoChannelService.listAccountVideoChannels({ account })),
                           catchError(err => this.restExtractor.redirectTo404IfNotFound(err, 'other', [
                             HttpStatusCode.BAD_REQUEST_400,
                             HttpStatusCode.NOT_FOUND_404
@@ -79,7 +78,7 @@ export class AccountsComponent implements OnInit, OnDestroy {
                         )
 
     this.links = [
-      { label: $localize`VIDEO CHANNELS`, routerLink: 'video-channels' },
+      { label: $localize`CHANNELS`, routerLink: 'video-channels' },
       { label: $localize`VIDEOS`, routerLink: 'videos' }
     ]
   }
@@ -147,6 +146,10 @@ export class AccountsComponent implements OnInit, OnDestroy {
     return this.videoChannels.length !== 0
   }
 
+  hasShowMoreDescription () {
+    return !this.accountDescriptionExpanded && this.accountDescriptionHTML.length > 100
+  }
+
   private async onAccount (account: Account) {
     this.accountFollowerTitle = $localize`${account.followersCount} direct account followers`