frontend: add admin quick actions to disconnected page with navigation to console
This commit is contained in:
parent
0ae172e4ec
commit
796c20dfb5
@ -17,6 +17,14 @@
|
||||
|
||||
<div class="disconnect-footer">
|
||||
<p class="footer-text">Thank you for using OpenVidu Meet</p>
|
||||
@if (isAdmin) {
|
||||
<div class="quick-actions fade-in-delayed-more">
|
||||
<button mat-button class="quick-action-button" (click)="goToConsole()">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
<span>Back to Console</span>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
align-items: center;
|
||||
min-height: 90vh;
|
||||
height: 100%;
|
||||
background: var(--ov-background-color)
|
||||
background: var(--ov-background-color);
|
||||
}
|
||||
|
||||
.disconnect-content {
|
||||
@ -114,6 +114,24 @@
|
||||
gap: var(--ov-meet-spacing-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-actions {
|
||||
@include ov-flex-center;
|
||||
margin-top: var(--ov-meet-spacing-md);
|
||||
|
||||
.quick-action-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ov-meet-spacing-sm);
|
||||
color: var(--ov-meet-text-secondary);
|
||||
@include ov-theme-transition;
|
||||
|
||||
// &:hover {
|
||||
// color: var(--ov-meet-text-primary);
|
||||
// background-color: var(--ov-meet-surface-hover);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.disconnect-content {
|
||||
@ -124,7 +142,6 @@
|
||||
animation: scaleIn 0.8s ease-out 0.2s both;
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-contrast: high) {
|
||||
.disconnect-footer {
|
||||
border-top-width: 2px;
|
||||
|
||||
@ -4,6 +4,7 @@ import { MatCardModule } from '@angular/material/card';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AuthService, NavigationService } from '@lib/services';
|
||||
|
||||
@Component({
|
||||
selector: 'ov-disconnected',
|
||||
@ -15,13 +16,26 @@ import { ActivatedRoute } from '@angular/router';
|
||||
export class DisconnectedComponent implements OnInit {
|
||||
disconnectReason?: string;
|
||||
|
||||
constructor(private route: ActivatedRoute) {}
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
protected authService: AuthService,
|
||||
protected navService: NavigationService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
// Get disconnect reason from query parameters
|
||||
this.getDisconnectReasonFromQueryParams();
|
||||
}
|
||||
|
||||
get isAdmin(): boolean {
|
||||
return this.authService.isAdmin();
|
||||
}
|
||||
|
||||
async goToConsole(): Promise<void> {
|
||||
// Navigate to the admin console
|
||||
await this.navService.redirectTo('/overview', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the disconnect reason from URL query parameters
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user