mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
feat: apply new layout overhaul
This commit is contained in:
committed by
Rainer Killinger
parent
f16e5394cc
commit
7bbdba5c0b
@@ -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">
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user