diff --git a/client/src/app/+accounts/account-about/account-about.component.html b/client/src/app/+accounts/account-about/account-about.component.html deleted file mode 100644 index e9e0e4079..000000000 --- a/client/src/app/+accounts/account-about/account-about.component.html +++ /dev/null @@ -1,15 +0,0 @@ -

About

-
-
-
-

DESCRIPTION

-
-
- -
-

STATS

- -
Joined {{ account.createdAt | date }}
-
-
-
diff --git a/client/src/app/+accounts/account-about/account-about.component.scss b/client/src/app/+accounts/account-about/account-about.component.scss deleted file mode 100644 index 5bcd4b561..000000000 --- a/client/src/app/+accounts/account-about/account-about.component.scss +++ /dev/null @@ -1,12 +0,0 @@ -@import '_variables'; -@import '_mixins'; - -.block { - margin-bottom: 40px; - - .small-title { - @include in-content-small-title; - - margin-bottom: 20px; - } -} diff --git a/client/src/app/+accounts/account-about/account-about.component.ts b/client/src/app/+accounts/account-about/account-about.component.ts deleted file mode 100644 index 6cf846d72..000000000 --- a/client/src/app/+accounts/account-about/account-about.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Subscription } from 'rxjs' -import { Component, OnDestroy, OnInit } from '@angular/core' -import { MarkdownService } from '@app/core' -import { Account, AccountService } from '@app/shared/shared-main' - -@Component({ - selector: 'my-account-about', - templateUrl: './account-about.component.html', - styleUrls: [ './account-about.component.scss' ] -}) -export class AccountAboutComponent implements OnInit, OnDestroy { - account: Account - descriptionHTML = '' - - private accountSub: Subscription - - constructor ( - private accountService: AccountService, - private markdownService: MarkdownService - ) { } - - ngOnInit () { - // Parent get the account for us - this.accountSub = this.accountService.accountLoaded - .subscribe(async account => { - this.account = account - this.descriptionHTML = await this.markdownService.textMarkdownToHTML(this.account.description, true) - }) - } - - ngOnDestroy () { - if (this.accountSub) this.accountSub.unsubscribe() - } - - getAccountDescription () { - if (this.descriptionHTML) return this.descriptionHTML - - return $localize`No description` - } -} diff --git a/client/src/app/+accounts/account-search/account-search.component.ts b/client/src/app/+accounts/account-search/account-search.component.ts index dda4bf0c7..f54ab846a 100644 --- a/client/src/app/+accounts/account-search/account-search.component.ts +++ b/client/src/app/+accounts/account-search/account-search.component.ts @@ -64,9 +64,14 @@ export class AccountSearchComponent extends AbstractVideoList implements OnInit, } updateSearch (value: string) { - if (value === '') this.router.navigate(['../videos'], { relativeTo: this.route }) this.search = value + if (!this.search) { + this.router.navigate([ '../videos' ], { relativeTo: this.route }) + return + } + + this.videos = [] this.reloadVideos() } diff --git a/client/src/app/+accounts/accounts-routing.module.ts b/client/src/app/+accounts/accounts-routing.module.ts index 15937a67b..3bf0f7185 100644 --- a/client/src/app/+accounts/accounts-routing.module.ts +++ b/client/src/app/+accounts/accounts-routing.module.ts @@ -1,11 +1,10 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' import { MetaGuard } from '@ngx-meta/core' -import { AccountsComponent } from './accounts.component' -import { AccountVideosComponent } from './account-videos/account-videos.component' -import { AccountAboutComponent } from './account-about/account-about.component' -import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component' import { AccountSearchComponent } from './account-search/account-search.component' +import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component' +import { AccountVideosComponent } from './account-videos/account-videos.component' +import { AccountsComponent } from './accounts.component' const accountsRoutes: Routes = [ { @@ -31,15 +30,6 @@ const accountsRoutes: Routes = [ } } }, - { - path: 'about', - component: AccountAboutComponent, - data: { - meta: { - title: $localize`About account` - } - } - }, { path: 'videos', component: AccountVideosComponent, diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index 1903bb36f..92d24ce94 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html @@ -1,57 +1,89 @@ -
-