feat: Fragebutton erstellt und Shortcut-Zuweisungen optimiert
- Fragebutton zur Benutzeroberfläche hinzugefügt. - Tastenkombination für den Transferprozess von `Ctrl + T` auf `Ctrl + Space` geändert. - Zuweisungen der Shortcuts in die `app.component.ts` verschoben.
This commit is contained in:
parent
ef99c674e7
commit
42f082996b
@ -1,6 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, HostListener, inject } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import {NavMenuComponent} from './components/nav-menu/nav-menu.component'
|
||||
import { TransferService } from './services/button/transfer.service';
|
||||
import { UpdateService } from './services/button/update.service';
|
||||
import { RefreshService } from './services/button/refresh.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@ -11,4 +14,30 @@ import {NavMenuComponent} from './components/nav-menu/nav-menu.component'
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'app';
|
||||
protected transferService: TransferService = inject(TransferService)
|
||||
protected updateService: UpdateService = inject(UpdateService)
|
||||
protected refreshService: RefreshService = inject(RefreshService)
|
||||
|
||||
@HostListener('window:keydown.control.s', ['$event'])
|
||||
protected handleCtrlS(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.updateService.executeAll();
|
||||
}
|
||||
|
||||
@HostListener('window:keydown.control.r', ['$event'])
|
||||
protected handleCtrlR(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.refreshService.executeAll();
|
||||
}
|
||||
|
||||
@HostListener('window:keydown.delete', ['$event'])
|
||||
protected handleDelete(event: KeyboardEvent) {
|
||||
}
|
||||
|
||||
|
||||
@HostListener('window:keydown.control.space', ['$event'])
|
||||
protected handleCtrlSapce(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.transferService.executeAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,9 @@
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="refreshService.executeAll()" [ngStyle]="{ 'visibility': refreshService.isVisible ? 'visible' : 'hidden' }">
|
||||
<mat-icon class="turn-360">sync</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" class="btn">
|
||||
<mat-icon class="scale-pulse">contact_support</mat-icon>
|
||||
</button>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse"
|
||||
aria-label="Toggle navigation" [attr.aria-expanded]="isExpanded" (click)="toggle()">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
||||
@ -29,29 +29,5 @@ export class BasePageComponent {
|
||||
if(this.transferService.any)
|
||||
this.transferService.removeAll()
|
||||
}
|
||||
|
||||
@HostListener('window:keydown.control.s', ['$event'])
|
||||
protected handleCtrlS(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.updateService.executeAll();
|
||||
}
|
||||
|
||||
@HostListener('window:keydown.control.r', ['$event'])
|
||||
protected handleCtrlR(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.refreshService.executeAll();
|
||||
}
|
||||
|
||||
@HostListener('window:keydown.delete', ['$event'])
|
||||
protected handleDelete(event: KeyboardEvent) {
|
||||
this.handleDeleteRequest();
|
||||
}
|
||||
|
||||
handleDeleteRequest() { }
|
||||
|
||||
@HostListener('window:keydown.control.t', ['$event'])
|
||||
protected handleCtrlT(event: KeyboardEvent) {
|
||||
event.preventDefault();
|
||||
this.transferService.executeAll();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user