mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
feat: separate prettier from eslint
This commit is contained in:
committed by
Thea Schöbl
parent
939fb6ef0f
commit
a88d000ccd
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -12,14 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {
|
||||
AfterViewInit,
|
||||
Component,
|
||||
HostListener,
|
||||
Input,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {AfterViewInit, Component, HostListener, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {Location} from '@angular/common';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {IonRouterOutlet} from '@ionic/angular';
|
||||
@@ -79,9 +72,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
/**
|
||||
* Layout
|
||||
*/
|
||||
layout: ScheduleResponsiveBreakpoint = SchedulePageComponent.getDaysToDisplay(
|
||||
this.currentWindowWidth,
|
||||
);
|
||||
layout: ScheduleResponsiveBreakpoint = SchedulePageComponent.getDaysToDisplay(this.currentWindowWidth);
|
||||
|
||||
@ViewChild('segment') segmentView!: HTMLIonSegmentElement;
|
||||
|
||||
@@ -111,8 +102,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
// we can be sure we get an hit when the last value.until is infinity
|
||||
// (unless someone has a display that reaches across the universe)
|
||||
return (
|
||||
responsiveConfig.find(value => width < value.until) ??
|
||||
responsiveConfig[responsiveConfig.length - 1]
|
||||
responsiveConfig.find(value => width < value.until) ?? responsiveConfig[responsiveConfig.length - 1]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -142,10 +132,11 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
onInit() {
|
||||
this.tabChoreographer = new SharedAxisChoreographer(
|
||||
this.activatedRoute.snapshot.paramMap.get('mode'),
|
||||
['calendar', 'recurring', 'single'],
|
||||
);
|
||||
this.tabChoreographer = new SharedAxisChoreographer(this.activatedRoute.snapshot.paramMap.get('mode'), [
|
||||
'calendar',
|
||||
'recurring',
|
||||
'single',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,9 +147,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
*/
|
||||
@HostListener('window:resize', ['$event'])
|
||||
onResize(_: UIEvent) {
|
||||
const current = SchedulePageComponent.getDaysToDisplay(
|
||||
this.currentWindowWidth,
|
||||
);
|
||||
const current = SchedulePageComponent.getDaysToDisplay(this.currentWindowWidth);
|
||||
const next = SchedulePageComponent.getDaysToDisplay(window.innerWidth);
|
||||
this.currentWindowWidth = window.innerWidth;
|
||||
|
||||
@@ -171,9 +160,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
* When the segment changes
|
||||
*/
|
||||
onSegmentChange() {
|
||||
const url = this.router
|
||||
.createUrlTree([[], 'schedule', this.segmentView.value])
|
||||
.toString();
|
||||
const url = this.router.createUrlTree([[], 'schedule', this.segmentView.value]).toString();
|
||||
this.location.go(url);
|
||||
this.tabChoreographer.changeViewForState(this.segmentView.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user