Skip to content

Commit 67f42d9

Browse files
committed
feat(details.page.ts): make iframe url to be configurable
Signed-off-by: Bofu Chen (bafu) <[email protected]>
1 parent f0e020f commit 67f42d9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/app/features/home/details/details.page.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { ConfirmAlert } from '../../../shared/confirm-alert/confirm-alert.servic
2929
import { ContactSelectionDialogComponent } from '../../../shared/contact-selection-dialog/contact-selection-dialog.component';
3030
import { DiaBackendAssetRepository } from '../../../shared/dia-backend/asset/dia-backend-asset-repository.service';
3131
import { DiaBackendAuthService } from '../../../shared/dia-backend/auth/dia-backend-auth.service';
32+
import { BUBBLE_IFRAME_URL } from '../../../shared/dia-backend/secret';
3233
import { DiaBackendWorkflowService } from '../../../shared/dia-backend/workflow/dia-backend-workflow.service';
3334
import { ErrorService } from '../../../shared/error/error.service';
3435
import { MediaStore } from '../../../shared/media/media-store/media-store.service';
@@ -183,11 +184,8 @@ export class DetailsPage {
183184
readonly iframeUrl$ = this.activeDetailedCapture$.pipe(
184185
distinctUntilChanged(),
185186
map(detailedCapture => {
186-
const host = 'https://captureappiframe.bubbleapps.io';
187-
const path = '';
188187
const params = `pid=${detailedCapture.id}&iframeLoadedFrom=CaptureApp`;
189-
// const params = `pid=288036ab-5768-4270-988b-a85d7bd11eb3&iframeLoadedFrom=CaptureApp`;
190-
const url = `${host}/${path}?${params}`;
188+
const url = `${BUBBLE_IFRAME_URL}/?${params}`;
191189
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
192190
})
193191
);
@@ -209,10 +207,8 @@ export class DetailsPage {
209207
distinctUntilChanged(),
210208
map(([detailedCapture]) => {
211209
const token = this.userToken;
212-
const host = 'https://captureappiframe.bubbleapps.io';
213-
const path = 'version-qa-release/asset_page';
214210
const params = `pid=${detailedCapture.id}&token=${token}&iframeLoadedFrom=CaptureApp`;
215-
const url = `${host}/${path}?${params}`;
211+
const url = `${BUBBLE_IFRAME_URL}/asset_page?${params}`;
216212
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
217213
})
218214
);
@@ -257,7 +253,7 @@ export class DetailsPage {
257253

258254
iframeUrlFor(detailedCapture: any) {
259255
return this.sanitizer.bypassSecurityTrustResourceUrl(
260-
`https://captureappiframe.bubbleapps.io/asset_page?pid=${detailedCapture.id}`
256+
`${BUBBLE_IFRAME_URL}/asset_page?pid=${detailedCapture.id}`
261257
);
262258
}
263259

0 commit comments

Comments
 (0)