]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-custom-markup/custom-markup.service.ts
Add reset button for file inputs in studio page
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-custom-markup / custom-markup.service.ts
index 089728a51ab8e551db794f597985a4b9a7e12b85..a959b336d18b555619dbdddbf9b29b85cacefbd1 100644 (file)
@@ -1,4 +1,4 @@
-import { first } from 'rxjs/operators'
+import { firstValueFrom } from 'rxjs'
 import { ComponentRef, Injectable } from '@angular/core'
 import { MarkdownService } from '@app/core'
 import {
@@ -7,7 +7,6 @@ import {
   ContainerMarkupData,
   EmbedMarkupData,
   PlaylistMiniatureMarkupData,
-  VideoFilter,
   VideoMiniatureMarkupData,
   VideosListMarkupData
 } from '@shared/models'
@@ -85,7 +84,7 @@ export class CustomMarkupService {
             const component = this.execAngularBuilder(selector, e)
 
             if (component.instance.loaded) {
-              const p = component.instance.loaded.pipe(first()).toPromise()
+              const p = firstValueFrom(component.instance.loaded)
               loadedPromises.push(p)
             }
 
@@ -191,7 +190,9 @@ export class CustomMarkupService {
       accountHandle: data.accountHandle || undefined,
       channelHandle: data.channelHandle || undefined,
 
-      filter: this.buildBoolean(data.onlyLocal) ? 'local' as VideoFilter : undefined
+      isLive: this.buildBoolean(data.isLive),
+
+      isLocal: this.buildBoolean(data.onlyLocal) ? true : undefined
     }
 
     this.dynamicElementService.setModel(component, model)
@@ -215,6 +216,8 @@ export class CustomMarkupService {
 
     root.classList.add('peertube-container', layoutClass)
 
+    root.style.justifyContent = data.justifyContent || 'space-between'
+
     if (data.width) {
       root.setAttribute('width', data.width)
     }