File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/app/features/home/details Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 5555 "
5656 >
5757 < div class ="slide ">
58- < iframe [src] ="iframeUrlWithToken $ | ngrxPush "> </ iframe >
58+ < iframe [src] ="iframeUrlWithJWTToken $ | ngrxPush "> </ iframe >
5959 </ div >
6060 </ ng-template >
6161 </ swiper >
Original file line number Diff line number Diff line change @@ -213,6 +213,22 @@ export class DetailsPage {
213213 } )
214214 ) ;
215215
216+ readonly iframeUrlWithJWTToken$ = combineLatest ( [
217+ this . activeDetailedCapture$ ,
218+ defer ( ( ) => this . diaBackendAuthService . queryJWTToken$ ( ) ) ,
219+ ] ) . pipe (
220+ distinctUntilChanged ( ) ,
221+ map ( ( [ detailedCapture , token ] ) => {
222+ const params =
223+ `nid=${ detailedCapture . id } ` +
224+ `&token=${ token . access } ` +
225+ `&refresh_token=${ token . refresh } ` +
226+ `&from=mycapture` ;
227+ const url = `${ BUBBLE_IFRAME_URL } /asset_page?${ params } ` ;
228+ return this . sanitizer . bypassSecurityTrustResourceUrl ( url ) ;
229+ } )
230+ ) ;
231+
216232 readonly isFromSeriesPage$ = this . type$ . pipe ( map ( type => type === 'series' ) ) ;
217233
218234 constructor (
You can’t perform that action at this time.
0 commit comments