frontend: conditionally show 'Go back' button based on recording URL
This commit is contained in:
parent
c0ae9c38b6
commit
2268b0a593
@ -89,11 +89,12 @@
|
||||
</div>
|
||||
|
||||
<div class="url-actions">
|
||||
<button mat-button class="back-button" (click)="goBack()">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
<span>Go back</span>
|
||||
</button>
|
||||
|
||||
@if (shouldShowGoBackButton) {
|
||||
<button mat-button class="back-button" (click)="goBack()">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
<span>Go back</span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ import { RecordingManagerService } from '@lib/services';
|
||||
export class ShareRecordingDialogComponent {
|
||||
accessType: 'private' | 'public' = 'public';
|
||||
recordingUrl?: string;
|
||||
private initialRecordingUrl?: string;
|
||||
|
||||
loading = false;
|
||||
erroMessage?: string;
|
||||
@ -51,6 +52,7 @@ export class ShareRecordingDialogComponent {
|
||||
private clipboard: Clipboard
|
||||
) {
|
||||
this.recordingUrl = data.recordingUrl;
|
||||
this.initialRecordingUrl = data.recordingUrl;
|
||||
}
|
||||
|
||||
async getRecordingUrl() {
|
||||
@ -83,6 +85,10 @@ export class ShareRecordingDialogComponent {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
get shouldShowGoBackButton(): boolean {
|
||||
return !this.initialRecordingUrl;
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.recordingUrl = undefined;
|
||||
this.copied = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user