Skip to content

Commit

Permalink
fix: wrong slide direction animation on page changes (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ittipatken authored Feb 1, 2025
1 parent 1488fe8 commit f4aad5d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 34 deletions.
4 changes: 1 addition & 3 deletions src/app/home/course/course.page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<link rel="stylesheet" href="course.page.scss">
<ion-header>
<ion-toolbar>
<ion-buttons slot="start" [routerLink]="'/home/'+year">
<ion-back-button [defaultHref]="'/home/'+year"></ion-back-button>
</ion-buttons>
<ion-back-button slot="start" [defaultHref]="'/home/'+year"></ion-back-button>
<ion-title>
{{ course ?? 'Course' }}
@if (courseProgress.duration > 0) {
Expand Down
4 changes: 1 addition & 3 deletions src/app/home/course/course.page.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {combineLatest, EMPTY, Observable, startWith, Subject} from 'rxjs';
import {ActivatedRoute, Router, RouterLink} from '@angular/router';
import {ActivatedRoute, Router} from '@angular/router';
import {CourseMembers, Lecture, ManService} from '../../man.service';
import {first, map, switchMap} from 'rxjs/operators';
import videojs from 'video.js';
Expand Down Expand Up @@ -46,8 +46,6 @@ import {AsyncPipe, DatePipe, DecimalPipe, NgClass} from '@angular/common';
imports: [
IonHeader,
IonToolbar,
IonButtons,
RouterLink,
IonBackButton,
IonTitle,
IonContent,
Expand Down
28 changes: 5 additions & 23 deletions src/app/home/home.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { IonHeader, IonToolbar, IonTitle, IonButtons, IonButton, IonIcon, IonCon
IonHeader,
IonToolbar,
IonTitle,
IonText,
IonButtons,
IonButton,
IonIcon,
Expand All @@ -26,36 +27,17 @@ import { IonHeader, IonToolbar, IonTitle, IonButtons, IonButton, IonIcon, IonCon
IonCard,
IonCardHeader,
IonCardTitle,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
IonTitle,
IonContent,
IonGrid,
IonRow,
IonCol,
IonText,
IonCard,
IonCardHeader,
IonCardTitle,
IonCardContent,
IonList,
IonListHeader,
IonLabel,
IonItem,
IonIcon,
IonProgressBar,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
IonTitle,
IonContent,
IonList,
IonItem,
IonLabel,
HomePage, ListPage, CoursePage
HomePage,
ListPage,
CoursePage
]
})

export class HomePageModule { }
4 changes: 1 addition & 3 deletions src/app/home/list/list.page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start" routerLink="/home">
<ion-back-button defaultHref="/home"></ion-back-button>
</ion-buttons>
<ion-back-button slot="start" defaultHref="/home"></ion-back-button>
<ion-title>
<span [ngStyle]="{'background-color': colorByFolderName(year)}">{{ year || 'Loading'}}</span>
</ion-title>
Expand Down
4 changes: 2 additions & 2 deletions src/app/home/list/list.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { EMPTY, Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { ManService } from '../../man.service';
import { colorByFolderName } from '../../../helpers';
import { IonHeader, IonToolbar, IonButtons, IonBackButton, IonTitle, IonContent, IonList, IonItem, IonLabel } from '@ionic/angular/standalone';
import { IonHeader, IonToolbar, IonBackButton, IonTitle, IonContent, IonList, IonItem, IonLabel } from '@ionic/angular/standalone';
import { NgStyle, AsyncPipe } from '@angular/common';

@Component({
selector: 'app-list',
templateUrl: './list.page.html',
styleUrls: ['./list.page.scss'],
imports: [IonHeader, IonToolbar, IonButtons, RouterLink, IonBackButton, IonTitle, NgStyle, IonContent, IonList, IonItem, IonLabel, AsyncPipe]
imports: [IonHeader, IonToolbar, RouterLink, IonBackButton, IonTitle, NgStyle, IonContent, IonList, IonItem, IonLabel, AsyncPipe]
})
export class ListPage implements OnInit {
year: string;
Expand Down

0 comments on commit f4aad5d

Please sign in to comment.