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>
|
||||||
|
|
||||||
<div class="url-actions">
|
<div class="url-actions">
|
||||||
<button mat-button class="back-button" (click)="goBack()">
|
@if (shouldShowGoBackButton) {
|
||||||
<mat-icon>arrow_back</mat-icon>
|
<button mat-button class="back-button" (click)="goBack()">
|
||||||
<span>Go back</span>
|
<mat-icon>arrow_back</mat-icon>
|
||||||
</button>
|
<span>Go back</span>
|
||||||
|
</button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@ import { RecordingManagerService } from '@lib/services';
|
|||||||
export class ShareRecordingDialogComponent {
|
export class ShareRecordingDialogComponent {
|
||||||
accessType: 'private' | 'public' = 'public';
|
accessType: 'private' | 'public' = 'public';
|
||||||
recordingUrl?: string;
|
recordingUrl?: string;
|
||||||
|
private initialRecordingUrl?: string;
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
erroMessage?: string;
|
erroMessage?: string;
|
||||||
@ -51,6 +52,7 @@ export class ShareRecordingDialogComponent {
|
|||||||
private clipboard: Clipboard
|
private clipboard: Clipboard
|
||||||
) {
|
) {
|
||||||
this.recordingUrl = data.recordingUrl;
|
this.recordingUrl = data.recordingUrl;
|
||||||
|
this.initialRecordingUrl = data.recordingUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRecordingUrl() {
|
async getRecordingUrl() {
|
||||||
@ -83,6 +85,10 @@ export class ShareRecordingDialogComponent {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get shouldShowGoBackButton(): boolean {
|
||||||
|
return !this.initialRecordingUrl;
|
||||||
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
this.recordingUrl = undefined;
|
this.recordingUrl = undefined;
|
||||||
this.copied = false;
|
this.copied = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user