Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ pr-zooming-image-viewer,
pr-thumbnail,
pr-video,
pr-audio .thumb-preview,
iframe,
replay-web-page {
iframe {
position: absolute;
top: 0px;
bottom: 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ApiService } from '@shared/services/api/api.service';
import { FeatureFlagService } from '@root/app/feature-flag/services/feature-flag.service';
import { MockComponent } from 'ng-mocks';
import { GetThumbnailPipe } from '@shared/pipes/get-thumbnail.pipe';
import { environment } from '@root/environments/environment';
import { TagsComponent } from '../../../shared/components/tags/tags.component';
import { FileViewerComponent } from './file-viewer.component';

Expand Down Expand Up @@ -579,6 +580,10 @@ describe('FileViewerComponent', () => {
await fixture.whenStable();

expect(component.replayUrl).toBeTruthy();
const internalUrl = (component.replayUrl as any)
.changingThisBreaksApplicationSecurity;

expect(internalUrl.startsWith(environment.replayBaseUrl)).toBe(true);
});

it('should not set replayUrl when replay-web feature flag is disabled', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { GetAccessFile } from '@models/get-access-file';
import { ShareLinksService } from '@root/app/share-links/services/share-links.service';
import { ApiService } from '@shared/services/api/api.service';
import { FeatureFlagService } from '@root/app/feature-flag/services/feature-flag.service';
import { environment } from '@root/environments/environment';
import { TagsService } from '../../../core/services/tags/tags.service';

@Component({
Expand Down Expand Up @@ -291,7 +292,7 @@ export class FileViewerComponent implements OnInit, OnDestroy {
return null;
}

const url = `https://replay.dev.permanent.org/?source=${encodeURIComponent(originalFileUrl)}&embed=replay-with-info`;
const url = `${environment.replayBaseUrl}/?source=${encodeURIComponent(originalFileUrl)}&embed=replay-with-info`;
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}

Expand Down
1 change: 1 addition & 0 deletions src/environments/environment-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface AnalyticsConfig {
export interface Environment {
production: boolean;
apiUrl: string;
replayBaseUrl: string;
hmr: boolean;
firebase: FirebaseConfig;
debug: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: true,
apiUrl: 'https://app.dev.permanent.org/api',
replayBaseUrl: 'https://replay.dev.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgedev.firebaseapp.com',
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.local-docker.proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: false,
apiUrl: 'https://local.permanent.org/api',
replayBaseUrl: 'https://replay.dev.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgedev.firebaseapp.com',
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.local.proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: false,
apiUrl: 'https://ng.permanent.org:4200/api',
replayBaseUrl: 'https://replay.dev.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgedev.firebaseapp.com',
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: true,
apiUrl: 'https://app.permanent.org/api',
replayBaseUrl: 'https://replay.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgeprod.firebaseapp.com',
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: true,
apiUrl: 'https://app.staging.permanent.org/api',
replayBaseUrl: 'https://replay.staging.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgestaging.firebaseapp.com',
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Environment } from './environment-interface';
export const environment: Environment = {
production: false,
apiUrl: 'https://local.permanent.org/api',
replayBaseUrl: 'https://replay.dev.permanent.org',
hmr: false,
firebase: {
authDomain: 'prpledgedev.firebaseapp.com',
Expand Down
1 change: 0 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@
<div class="lds-dual-ring"></div>
</pr-app-root>
<script src="https://js.stripe.com/v3/"></script>
<script src="https://replay.dev.permanent.org/ui.js"></script>
</body>
</html>