remove ngx scrollbar
This commit is contained in:
@@ -54,7 +54,7 @@ const routes: Routes = [
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, {
|
||||
preloadingStrategy: PreloadAllModules,
|
||||
relativeLinkResolution: 'legacy',
|
||||
// relativeLinkResolution: 'legacy',
|
||||
}),
|
||||
],
|
||||
exports: [RouterModule],
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<app-navigation></app-navigation>
|
||||
<perfect-scrollbar
|
||||
#scrollbar
|
||||
(psScrollY)="onScoll($event)"
|
||||
[perfectScrollbar]
|
||||
class="scroll"
|
||||
style="max-height: calc(100vh); width: 100%; overflow: hidden"
|
||||
>
|
||||
<div [@fader]="o.isActivated ? o.activatedRoute : ''" class="content">
|
||||
|
||||
<div [@fader]="o.isActivated ? o.activatedRoute : ''" class="content">
|
||||
<router-outlet #o="outlet"></router-outlet>
|
||||
</div>
|
||||
</perfect-scrollbar>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
||||
import {fader} from './animations';
|
||||
import {ScrollService} from './services/scroll.service';
|
||||
import {PerfectScrollbarComponent} from 'ngx-perfect-scrollbar';
|
||||
import {register} from 'swiper/element/bundle';
|
||||
|
||||
@Component({
|
||||
@@ -12,12 +11,7 @@ import {register} from 'swiper/element/bundle';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
@ViewChild('scrollbar', {static: false}) public scrollbar: PerfectScrollbarComponent | null = null;
|
||||
|
||||
public constructor(private scrollService: ScrollService) {
|
||||
scrollService.restoreScrollPosition$.subscribe(pos => {
|
||||
if (this.scrollbar && pos) this.scrollbar.directiveRef?.scrollTo(0, pos, 300);
|
||||
});
|
||||
register();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import {AngularFireAuthModule} from '@angular/fire/compat/auth';
|
||||
import {AngularFireAuthGuardModule} from '@angular/fire/compat/auth-guard';
|
||||
import {MAT_DATE_LOCALE} from '@angular/material/core';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {PerfectScrollbarModule} from 'ngx-perfect-scrollbar';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
@@ -37,7 +36,6 @@ import {PerfectScrollbarModule} from 'ngx-perfect-scrollbar';
|
||||
AngularFireAuthModule,
|
||||
AngularFireAuthGuardModule,
|
||||
FontAwesomeModule,
|
||||
PerfectScrollbarModule,
|
||||
],
|
||||
providers: [{provide: MAT_DATE_LOCALE, useValue: 'de-DE'}],
|
||||
bootstrap: [AppComponent],
|
||||
|
||||
@@ -7,6 +7,8 @@ import {FormControl, FormGroup, Validators} from '@angular/forms';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||
import {map, switchMap} from 'rxjs/operators';
|
||||
import firebase from 'firebase/compat/app';
|
||||
import Timestamp = firebase.firestore.Timestamp;
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit',
|
||||
@@ -56,7 +58,7 @@ export class EditComponent implements OnInit {
|
||||
await this.showService.update$(
|
||||
this.form.value.id as string,
|
||||
{
|
||||
date: this.form.value.date,
|
||||
date: Timestamp.fromDate(this.form.value.date),
|
||||
showType: this.form.value.showType,
|
||||
} as Partial<Show>
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ export class DbService {
|
||||
return typeof ref === 'string' ? this.afs.doc<T>(ref) : ref;
|
||||
}
|
||||
|
||||
public doc$<T>(ref: DocumentPredicate<T>): Observable<(T & {id: string}) | null> {
|
||||
public doc$<T>(ref: DocumentPredicate<T>): Observable<(NonNullable<T> & {id?: string}) | null> {
|
||||
return this.doc(ref)
|
||||
.valueChanges({idField: 'id'})
|
||||
.pipe(map(_ => (_ ? _ : null)));
|
||||
|
||||
Reference in New Issue
Block a user