feat: apply new layout overhaul

This commit is contained in:
Andy Bastian
2022-08-08 11:01:00 +00:00
committed by Rainer Killinger
parent f16e5394cc
commit 7bbdba5c0b
228 changed files with 28387 additions and 1092 deletions

View File

@@ -28,7 +28,7 @@
<ion-item-divider>
<ion-label>{{ event.title }}</ion-label>
<ion-note slot="start" *ngIf="event.events.length > 1">
<ion-icon name="warning"></ion-icon>
<ion-icon name="alert-triangle"></ion-icon>
</ion-note>
</ion-item-divider>
<ion-item *ngFor="let iCalEvent of event.events">

View File

@@ -24,6 +24,7 @@ import {ThingTranslateModule} from '../../translation/thing-translate.module';
import {FormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common';
import {MomentModule} from 'ngx-moment';
import {UtilModule} from '../../util/util.module';
@NgModule({
declarations: [AddEventReviewModalComponent],
@@ -34,6 +35,7 @@ import {MomentModule} from 'ngx-moment';
FormsModule,
CommonModule,
MomentModule,
UtilModule,
],
exports: [],
providers: [Calendar, CalendarService, ScheduleProvider],

View File

@@ -16,9 +16,10 @@
import {Calendar} from '@awesome-cordova-plugins/calendar/ngx';
import {Injectable} from '@angular/core';
import {ICalEvent} from './ical/ical';
import moment, {duration, unitOfTime} from 'moment';
import moment, {duration, Moment, unitOfTime} from 'moment';
import {Dialog} from '@capacitor/dialog';
import {CalendarInfo} from './calendar-info';
import {Subject} from 'rxjs';
const CALENDAR_NAME = 'StApps';
@@ -33,6 +34,10 @@ const RECURRENCE_PATTERNS: Partial<
@Injectable()
export class CalendarService {
goToDate = new Subject<number>();
goToDateClicked = this.goToDate.asObservable();
// eslint-disable-next-line @typescript-eslint/no-empty-function
constructor(readonly calendar: Calendar) {}
@@ -98,4 +103,14 @@ export class CalendarService {
);
}
}
/**
* Emit the calendar index corresponding to the input date.
*
* @param date Moment - date the calendar should go to
*/
emitGoToDate(date: Moment) {
const index = date.diff(moment().startOf('day'), 'days');
this.goToDate.next(index);
}
}