diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.css b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.css index f5889ef..938afb2 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.css +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.css @@ -107,11 +107,6 @@ html { } } -.scale-pulse { - display: inline-block; - transition: transform 1s ease; -} - .scale-pulse:hover { animation: pulse 1s ease forwards; } @@ -126,4 +121,23 @@ html { 100% { transform: scale(1); } +} + +.move-left-right:hover { + animation: move 0.8s ease forwards; +} + +@keyframes move { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(-10px); + } + 75% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } } \ No newline at end of file diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.html b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.html index 9431076..181e6c4 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.html +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.html @@ -37,6 +37,9 @@ + diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.ts index e51b681..60394de 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/nav-menu/nav-menu.component.ts @@ -9,6 +9,7 @@ import { MatIconModule } from '@angular/material/icon'; import { RefreshService } from '../../services/refresh.service'; import { CreationService } from '../../services/creation.service'; import { UpdateService, UpdateEvent } from '../../services/update.service'; +import { TransferService } from '../../services/transfer.service'; import { MatBadgeModule } from '@angular/material/badge'; import { MatSlideToggleModule, @@ -32,7 +33,7 @@ export class NavMenuComponent { isChecked = true; - constructor(private dialog: MatDialog, private authService: AuthenticationService, public refreshService: RefreshService, public creationService: CreationService, public updateService: UpdateService) { + constructor(private dialog: MatDialog, private authService: AuthenticationService, public refreshService: RefreshService, public creationService: CreationService, public updateService: UpdateService, public transferService: TransferService) { this.authService.isAuthenticated().then().catch() this.updateActCount = this.updateService.totalCount; this.updateService.addChangeListener(UpdateEvent.CountChange, () => { diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/base-page/base-page.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/base-page/base-page.component.ts index d732f93..b7a5afe 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/base-page/base-page.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/pages/base-page/base-page.component.ts @@ -2,6 +2,7 @@ import { Component, HostListener, inject } from '@angular/core'; import { RefreshService } from '../../services/refresh.service'; import { CreationService } from '../../services/creation.service'; import { UpdateService } from '../../services/update.service'; +import { TransferService } from '../../services/transfer.service'; @Component({ selector: 'app-base-page', @@ -15,6 +16,7 @@ export class BasePageComponent { protected refreshService: RefreshService = inject(RefreshService) protected creationService: CreationService = inject(CreationService) protected updateService: UpdateService = inject(UpdateService) + protected transferService: TransferService = inject(TransferService) constructor() { this.refreshService.removeAll() @@ -22,6 +24,8 @@ export class BasePageComponent { if (this.updateService.any) { this.updateService.executeAll().then() } + if(this.transferService.any) + this.transferService.removeAll() } @HostListener('window:keydown.control.s', ['$event']) diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.spec.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.spec.ts new file mode 100644 index 0000000..ca57f12 --- /dev/null +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { TransferService } from './transfer.service'; + +describe('TransferService', () => { + let service: TransferService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(TransferService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.ts new file mode 100644 index 0000000..1c6af7a --- /dev/null +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/services/transfer.service.ts @@ -0,0 +1,31 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class TransferService { + + constructor() { } + + private actions: Array<() => void> = []; + + public get count(): number { + return this.actions.length; + } + + public get any(): boolean { + return this.count > 0; + } + + add(action: () => void): void { + this.actions.push(action); + } + + removeAll(): void { + this.actions = []; + } + + executeAll(): void { + this.actions.forEach(action => action()); + } +} \ No newline at end of file