mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2025-01-03 05:17:36 +03:00
more done
This commit is contained in:
parent
30a5d8113d
commit
6d3349291f
@ -48,19 +48,26 @@ export class ServiceComponent implements OnInit {
|
||||
}
|
||||
|
||||
hasMenu() {
|
||||
return this.hasActions() || this.hasManyTransports();
|
||||
return this.service.maintenance === false && this.service.not_accesible === false && (this.hasActions() || this.hasManyTransports());
|
||||
}
|
||||
|
||||
notifyNotLaunching(message: string) {
|
||||
this.api.gui.alert(django.gettext('Launcher'), message);
|
||||
this.api.gui.alert('<p align="center"><b>' + django.gettext('Launcher') + '</b></p>', message);
|
||||
}
|
||||
|
||||
launch() {
|
||||
if (this.service.maintenance ) {
|
||||
this.notifyNotLaunching(django.gettext('Service is in maintenance and cannot be launched'));
|
||||
return;
|
||||
}
|
||||
if (this.service.not_accesible) {
|
||||
this.notifyNotLaunching(django.gettext('Service has been restricted and cannot be launched'));
|
||||
this.notifyNotLaunching('<p align="center">' +
|
||||
django.gettext('This service is currently not accesible due to schedule restrictions.') +
|
||||
'</p><p align="center"><b>' + django.gettext('Access limited by calendar') +
|
||||
'</b></p><p align="center">' + django.gettext('Please, retry access in a while.') +
|
||||
'</p>'
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.api.launchURL(this.service.transports[0].link);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
justify-content: start;
|
||||
/* margin: 0 10%; */
|
||||
}
|
||||
|
||||
.services-group-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -1,4 +1,8 @@
|
||||
.uds-modal-footer {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.mat-dialog-actions {
|
||||
justify-content: flex-end;
|
||||
}
|
@ -1,19 +1,20 @@
|
||||
.uds-nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.fill-remaining-space {
|
||||
/*This fills the remaining space, by using flexbox.
|
||||
/*This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
margin-right: 0.3rem;
|
||||
/*margin-left: 0.3rem;*/
|
||||
margin-right: 0.3rem;
|
||||
/*margin-left: 0.3rem;*/
|
||||
}
|
||||
|
||||
.udsicon {
|
||||
width: 2rem;
|
||||
}
|
||||
width: 2rem;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
<mat-menu x-position="before" #shrink="matMenu">
|
||||
<button mat-menu-item *ngIf="api.user.isLogged" [matMenuTriggerFor]="userMenu">{{api.user.user}}</button>
|
||||
|
||||
<button mat-menu-item routerLink="/client-download">UDS Plugin</button>
|
||||
<button mat-menu-item routerLink="/client-download">UDS Client</button>
|
||||
<button mat-menu-item routerLink="/about"><uds-translate>About</uds-translate></button>
|
||||
</mat-menu>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
<!-- elements only visible when expanded -->
|
||||
<div fxLayout="row" fxShow="false" fxShow.gt-sm>
|
||||
<button mat-button routerLink="/client-download"><i class="material-icons">file_download</i>UDS Plugin</button>
|
||||
<button mat-button routerLink="/client-download"><i class="material-icons">file_download</i>UDS Client</button>
|
||||
<button mat-button routerLink="/about"><i class="material-icons">info</i><uds-translate>About</uds-translate></button>
|
||||
<button mat-button [matMenuTriggerFor]="appMenu">{{ lang.name }} <i class="material-icons">arrow_drop_down</i></button>
|
||||
<button mat-button *ngIf="api.user.isLogged" [matMenuTriggerFor]="userMenu">{{api.user.user}} <i class="material-icons">arrow_drop_down</i></button>
|
||||
|
@ -9,8 +9,9 @@ export class UDSGuiService {
|
||||
constructor(public dialog: MatDialog) { }
|
||||
|
||||
alert(title: string, message: string, autoclose = 0 ) {
|
||||
const width = window.innerWidth < 800 ? '80%' : '40%';
|
||||
const dialogRef = this.dialog.open(ModalComponent, {
|
||||
width: '25%',
|
||||
width: width,
|
||||
data: { title: title, body: message, autoclose: autoclose },
|
||||
disableClose: true,
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="banner">
|
||||
<div class="banner-text">
|
||||
<h1>
|
||||
<uds-translate>UDS Plugin</uds-translate>
|
||||
<uds-translate>UDS Client</uds-translate>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<uds-translate>Download UDS client plugin for your platform</uds-translate>
|
||||
<uds-translate>Download UDS client for your platform</uds-translate>
|
||||
</div>
|
||||
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user