Fix admin welcome modal show check
This commit is contained in:
parent
2214fedd8e
commit
488b89433f
|
@ -79,6 +79,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
hotkeysModalOpened = false
|
||||
|
||||
private serverConfig: HTMLServerConfig
|
||||
private userLoaded = false
|
||||
|
||||
constructor (
|
||||
@Inject(DOCUMENT) private document: Document,
|
||||
|
@ -267,7 +268,10 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
private listenUserChangeForModals () {
|
||||
this.authService.userInformationLoaded
|
||||
.pipe(map(() => this.authService.getUser()))
|
||||
.subscribe(user => this.openModalsIfNeeded(user))
|
||||
.subscribe(user => {
|
||||
this.userLoaded = true
|
||||
this.openModalsIfNeeded(user)
|
||||
})
|
||||
}
|
||||
|
||||
onModalCreated () {
|
||||
|
@ -278,6 +282,8 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
private openModalsIfNeeded (user: User) {
|
||||
if (!this.userLoaded) return
|
||||
|
||||
if (user.role.id === UserRole.ADMINISTRATOR) {
|
||||
this.openAdminModalsIfNeeded(user)
|
||||
} else {
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: calc(100% - 50px); // Space for links below the menu
|
||||
max-height: calc(100% - 75px); // Space for links below the menu
|
||||
}
|
||||
|
||||
.main-menu-scrollbar {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.root {
|
||||
width: 100%;
|
||||
|
||||
margin-bottom: 2rem;
|
||||
@include rfs(2.5rem, margin-bottom);
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
@ -98,8 +98,6 @@ h1 {
|
|||
.children-container {
|
||||
margin-top: 1.25rem;
|
||||
|
||||
@include rfs(margin-bottom, 2.5rem);
|
||||
|
||||
::ng-deep li {
|
||||
white-space: nowrap;
|
||||
|
||||
|
|
Loading…
Reference in New Issue