File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -379,16 +379,20 @@ export class DetailsPage {
379
379
}
380
380
381
381
private openCaptureClub ( ) {
382
- return this . activeDetailedCapture$
383
- . pipe (
384
- first ( ) ,
382
+ combineLatest ( [
383
+ this . activeDetailedCapture$ . pipe (
385
384
switchMap (
386
385
activeDetailedCapture => activeDetailedCapture . diaBackendAsset$
387
386
) ,
388
- isNonNullable ( ) ,
389
- concatMap ( diaBackendAsset =>
387
+ isNonNullable ( )
388
+ ) ,
389
+ this . diaBackendAuthService . token$ ,
390
+ ] )
391
+ . pipe (
392
+ first ( ) ,
393
+ concatMap ( ( [ diaBackendAsset , token ] ) =>
390
394
Browser . open ( {
391
- url : `https://captureclub.cc/asset?mid=${ diaBackendAsset . id } ` ,
395
+ url : `https://captureclub.cc/asset?mid=${ diaBackendAsset . id } &token= ${ token } ` ,
392
396
toolbarColor : '#564dfc' ,
393
397
} )
394
398
) ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
first ,
13
13
map ,
14
14
startWith ,
15
+ switchMap ,
15
16
tap ,
16
17
} from 'rxjs/operators' ;
17
18
import { CameraService } from '../../shared/camera/camera.service' ;
@@ -196,10 +197,18 @@ export class HomePage {
196
197
}
197
198
198
199
// eslint-disable-next-line class-methods-use-this
199
- async openCaptureClub ( ) {
200
- return Browser . open ( {
201
- url : 'https://captureclub.cc/' ,
202
- toolbarColor : '#564dfc' ,
203
- } ) ;
200
+ openCaptureClub ( ) {
201
+ this . diaBackendAuthService . token$
202
+ . pipe (
203
+ first ( ) ,
204
+ switchMap ( token =>
205
+ Browser . open ( {
206
+ url : `https://captureclub.cc/?token=${ token } ` ,
207
+ toolbarColor : '#564dfc' ,
208
+ } )
209
+ ) ,
210
+ untilDestroyed ( this )
211
+ )
212
+ . subscribe ( ) ;
204
213
}
205
214
}
You can’t perform that action at this time.
0 commit comments