Alphabetical order for channels filter

pull/5860/head
Chocobozzz 2023-06-19 11:12:02 +02:00
parent 7aacaa76ec
commit 7d758898dc
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 9 additions and 7 deletions

View File

@ -105,12 +105,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
this.user = this.authService.getUser() this.user = this.authService.getUser()
this.userChannels = this.user.videoChannels this.userChannels = this.user.videoChannels
const channelFilters = this.userChannels.map(c => { const channelFilters = [ ...this.userChannels ]
return { .sort((a, b) => a.displayName.localeCompare(b.displayName))
value: 'channel:' + c.name, .map(c => {
label: c.displayName return {
} value: 'channel:' + c.name,
}) label: c.displayName
}
})
this.inputFilters = [ this.inputFilters = [
{ {

View File

@ -2,7 +2,7 @@ import { Observable, of, Subject } from 'rxjs'
import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators' import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
import { Inject, Injectable, LOCALE_ID } from '@angular/core' import { Inject, Injectable, LOCALE_ID } from '@angular/core'
import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' import { getDevLocale, isOnDevLocale } from '@app/helpers'
import { logger } from '@root-helpers/logger' import { logger } from '@root-helpers/logger'
import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n'
import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models' import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models'