mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
add ng-select for templatable select options
- create select-tags component to replace ngx-chips - create select-options to factorize option selection in forms - create select-channel to simplify channel selection - refactor tags validation
This commit is contained in:
parent
766d13b447
commit
02c01341f4
36 changed files with 399 additions and 217 deletions
|
@ -16,7 +16,10 @@ function getParameterByName (name: string, url: string) {
|
|||
return decodeURIComponent(results[2].replace(/\+/g, ' '))
|
||||
}
|
||||
|
||||
function populateAsyncUserVideoChannels (authService: AuthService, channel: { id: number, label: string, support?: string }[]) {
|
||||
function populateAsyncUserVideoChannels (
|
||||
authService: AuthService,
|
||||
channel: { id: number, label: string, support?: string, avatarPath?: string, recent?: boolean }[]
|
||||
) {
|
||||
return new Promise(res => {
|
||||
authService.userInformationLoaded
|
||||
.subscribe(
|
||||
|
@ -27,7 +30,12 @@ function populateAsyncUserVideoChannels (authService: AuthService, channel: { id
|
|||
const videoChannels = user.videoChannels
|
||||
if (Array.isArray(videoChannels) === false) return
|
||||
|
||||
videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName, support: c.support }))
|
||||
videoChannels.forEach(c => channel.push({
|
||||
id: c.id,
|
||||
label: c.displayName,
|
||||
support: c.support,
|
||||
avatarPath: c.avatar?.path
|
||||
}))
|
||||
|
||||
return res()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue