feat: separate prettier from eslint

This commit is contained in:
Rainer Killinger
2023-01-11 13:25:18 +01:00
committed by Thea Schöbl
parent 939fb6ef0f
commit a88d000ccd
381 changed files with 17952 additions and 38411 deletions

View File

@@ -61,11 +61,7 @@ export class DashboardCollapse {
this.animationControl
.create()
.addElement(schedule)
.fromTo(
'transform',
'translateY(0) scaleY(1)',
'translateY(-75px) scaleY(0.8)',
),
.fromTo('transform', 'translateY(0) scaleY(1)', 'translateY(-75px) scaleY(0.8)'),
this.animationControl
.create()
.addElement(schedule.querySelectorAll(':scope > a > *'))
@@ -78,17 +74,12 @@ export class DashboardCollapse {
}
private start() {
this.collapseAnimation.progressStart(
true,
this.scrollContainer.scrollTop / 172,
);
this.collapseAnimation.progressStart(true, this.scrollContainer.scrollTop / 172);
let pos = this.scrollContainer.scrollTop;
const animate = () => {
if (pos !== this.scrollContainer.scrollTop) {
pos = this.scrollContainer.scrollTop;
this.collapseAnimation.progressStep(
this.scrollContainer.scrollTop / 172,
);
this.collapseAnimation.progressStep(this.scrollContainer.scrollTop / 172);
}
this.nextFrame = requestAnimationFrame(animate);
};

View File

@@ -16,7 +16,10 @@
@import '../../../theme/util/mixins';
@include ion-md-down {
ion-toolbar, .logo, .schedule, .schedule > a > * {
ion-toolbar,
.logo,
.schedule,
.schedule > a > * {
will-change: transform;
}
@@ -25,7 +28,6 @@
}
.schedule {
> a {
> * {
transform-origin: center;

View File

@@ -1,5 +1,5 @@
<!--
~ Copyright (C) 2022 StApps
~ Copyright (C) 2023 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.
@@ -14,9 +14,7 @@
-->
<ion-header>
<ion-toolbar #toolbar class="ion-hide-md-up">
<ion-label slot="start">{{
'dashboard.header.title' | daytimeKey | translate
}}</ion-label>
<ion-label slot="start">{{ 'dashboard.header.title' | daytimeKey | translate }}</ion-label>
<div><ion-img src="assets/imgs/logo.png" class="logo"></ion-img></div>
</ion-toolbar>
</ion-header>
@@ -27,11 +25,7 @@
</a>
<!-- Avoid structural directives here, they might interfere with the collapse animation -->
<a
[routerLink]="
nextEvent?.event
? ['/data-detail', nextEvent!.event.uid]
: ['/schedule/recurring']
"
[routerLink]="nextEvent?.event ? ['/data-detail', nextEvent!.event.uid] : ['/schedule/recurring']"
class="schedule-item-button"
>
<ion-label>{{ 'dashboard.schedule.title' | translate }}</ion-label>
@@ -43,18 +37,13 @@
}}
</ion-label>
<ion-label>{{
nextEvent?.event
? nextEvent!.event.name
: ('dashboard.schedule.noEventLink' | translate)
nextEvent?.event ? nextEvent!.event.name : ('dashboard.schedule.noEventLink' | translate)
}}</ion-label>
</a>
</div>
<ion-content fullscreen="true" #ionContent>
<stapps-search-section
#search
(focusin)="onSearchBarFocus($event)"
></stapps-search-section>
<stapps-search-section #search (focusin)="onSearchBarFocus($event)"></stapps-search-section>
<stapps-news-section></stapps-news-section>
<stapps-mensa-section></stapps-mensa-section>
<stapps-favorites-section></stapps-favorites-section>

View File

@@ -176,7 +176,6 @@ ion-content {
}
}
.swiper {
background-color: var(--ion-color-primary-contrast);
border-radius: var(--border-radius-default);
@@ -195,7 +194,6 @@ ion-content {
}
}
ion-searchbar {
padding: 0;
--background: var(--ion-color-primary-contrast);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 StApps
* Copyright (C) 2023 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 {
Component,
ElementRef,
NgZone,
OnDestroy,
OnInit,
ViewChild,
} from '@angular/core';
import {Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {Location} from '@angular/common';
import {Subscription} from 'rxjs';
@@ -38,10 +31,7 @@ import {BreakpointObserver} from '@angular/cdk/layout';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: [
'./dashboard.component.scss',
'/dashboard.collapse.component.scss',
],
styleUrls: ['./dashboard.component.scss', '/dashboard.collapse.component.scss'],
})
export class DashboardComponent implements OnInit, OnDestroy {
/**
@@ -103,12 +93,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
async ngOnInit() {
this._eventUuidSubscription = this.scheduleProvider.uuids$.subscribe(
async result => {
this.eventUuids = result;
await this.loadNextEvent();
},
);
this._eventUuidSubscription = this.scheduleProvider.uuids$.subscribe(async result => {
this.eventUuids = result;
await this.loadNextEvent();
});
await SplashScreen.hide();
this.collapseAnimation = new DashboardCollapse(
@@ -120,12 +108,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
);
this.subscriptions.push(
this.breakpointObserver
.observe(['(min-width: 768px)'])
.subscribe(async state => {
await this.collapseAnimation.ready;
this.collapseAnimation.active = !state.matches;
}),
this.breakpointObserver.observe(['(min-width: 768px)']).subscribe(async state => {
await this.collapseAnimation.ready;
this.collapseAnimation.active = !state.matches;
}),
);
}
@@ -141,8 +127,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
time: new Date(
series.dates
.sort((a, b) => new Date(a).getTime() - new Date(b).getTime())
.find(date => new Date(date) > new Date()) ||
Number.POSITIVE_INFINITY,
.find(date => new Date(date) > new Date()) || Number.POSITIVE_INFINITY,
).getTime(),
series,
}))

View File

@@ -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.
@@ -37,11 +37,7 @@ export class DashboardProvider {
* @param from From which (results) page to start
* @param filters Additional filters to apply
*/
async getNews(
size: number,
from: number,
filters?: SCSearchFilter[],
): Promise<SCMessage[]> {
async getNews(size: number, from: number, filters?: SCSearchFilter[]): Promise<SCMessage[]> {
const query: SCSearchQuery = {
filter: {
type: 'boolean',
@@ -73,10 +69,7 @@ export class DashboardProvider {
if (typeof filters !== 'undefined') {
for (const filter of filters) {
(
(query.filter as SCSearchBooleanFilter)
.arguments as SCBooleanFilterArguments
).filters.push(filter);
((query.filter as SCSearchBooleanFilter).arguments as SCBooleanFilterArguments).filters.push(filter);
}
}

View File

@@ -35,22 +35,13 @@
<ion-item *ngFor="let item of items">
<ion-reorder slot="start"></ion-reorder>
<ion-label>{{ item.labelLocalized }}</ion-label>
<ion-toggle
slot="end"
[checked]="item.active"
[(ngModel)]="item.active"
></ion-toggle>
<ion-toggle slot="end" [checked]="item.active" [(ngModel)]="item.active"></ion-toggle>
</ion-item>
</ion-reorder-group>
<ion-radio-group
*ngSwitchCase="type === types.RADIOBOXES"
[(ngModel)]="selectedValue"
>
<ion-radio-group *ngSwitchCase="type === types.RADIOBOXES" [(ngModel)]="selectedValue">
<ion-list-header>
<ion-label>{{
'dashboard.canteens.choose_favorite' | translate
}}</ion-label>
<ion-label>{{ 'dashboard.canteens.choose_favorite' | translate }}</ion-label>
</ion-list-header>
<ion-item *ngFor="let item of items">
<ion-label>{{ item.labelLocalized }}</ion-label>

View File

@@ -1,16 +1,16 @@
<!--
~ 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.
~ 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.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<ion-label class="section-headline"
@@ -22,11 +22,6 @@
(click)="onEditClick()"
name="edit_square"
></ion-icon>
<ion-icon
size="25"
*ngIf="customIcon"
(click)="onEditClick()"
[name]="customIcon"
></ion-icon>
<ion-icon size="25" *ngIf="customIcon" (click)="onEditClick()" [name]="customIcon"></ion-icon>
</ion-label>
<ng-content></ng-content>

View File

@@ -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 {
Component,
EventEmitter,
HostBinding,
Input,
OnInit,
Output,
} from '@angular/core';
import {Component, EventEmitter, HostBinding, Input, OnInit, Output} from '@angular/core';
/**
* Shows a horizontal list of action chips

View File

@@ -1,14 +1,25 @@
<!--
~ 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.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<stapps-section
[title]="'dashboard.favorites.title' | translate"
[isEditable]="true"
(onEdit)="onSectionEdit()"
>
<div *ngIf="(items | async)?.length" class="container">
<div
*ngFor="let item of items | async"
class="card clickable"
(click)="notifySelect(item)"
>
<div *ngFor="let item of items | async" class="card clickable" (click)="notifySelect(item)">
<ion-thumbnail class="ion-margin-end">
<ion-icon color="dark" [attr.name]="item.type | dataIcon"></ion-icon>
</ion-thumbnail>
@@ -21,9 +32,7 @@
<div class="card">
<ion-label>
{{ 'dashboard.favorites.no_favorite_prefix' | translate }}
<a (click)="onSectionEdit()">{{
'dashboard.favorites.no_favorite_link' | translate
}}</a>
<a (click)="onSectionEdit()">{{ 'dashboard.favorites.no_favorite_link' | translate }}</a>
{{ 'dashboard.favorites.no_favorite_suffix' | translate }}
</ion-label>
</div>

View File

@@ -1,3 +1,18 @@
/*!
* 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.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
@@ -10,7 +25,7 @@
overflow: hidden;
width: 100%;
min-height: var(--size);
margin-bottom: var(--spacing-sm);
margin-bottom: var(--spacing-sm);
ion-thumbnail {
position: absolute;

View File

@@ -16,12 +16,7 @@ import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {AlertController, AnimationController} from '@ionic/angular';
import {combineLatest} from 'rxjs';
import {
debounceTime,
distinctUntilChanged,
startWith,
take,
} from 'rxjs/operators';
import {debounceTime, distinctUntilChanged, startWith, take} from 'rxjs/operators';
import {NGXLogger} from 'ngx-logger';
import {SCThings} from '@openstapps/core';
@@ -42,10 +37,7 @@ import {ConfigProvider} from '../../../config/config.provider';
templateUrl: 'favorites-section.component.html',
styleUrls: ['favorites-section.component.scss'],
})
export class FavoritesSectionComponent
extends SearchPageComponent
implements OnInit
{
export class FavoritesSectionComponent extends SearchPageComponent implements OnInit {
constructor(
protected readonly alertController: AlertController,
protected dataProvider: DataProvider,
@@ -100,9 +92,7 @@ export class FavoritesSectionComponent
.pipe(take(1))
.subscribe(result => {
this.items = new Promise(resolve => {
resolve(
result.data && result.data.filter(item => !this.isMensaThing(item)),
);
resolve(result.data && result.data.filter(item => !this.isMensaThing(item)));
});
});
}

View File

@@ -12,13 +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 {
Component,
Input,
OnInit,
OnChanges,
SimpleChanges,
} from '@angular/core';
import {Component, Input, OnInit, OnChanges, SimpleChanges} from '@angular/core';
import {SCDish, SCPlace, SCThings} from '@openstapps/core';
import {PlaceMensaService} from '../../../data/types/place/special/mensa/place-mensa-service';

View File

@@ -1,20 +1,31 @@
<!--
~ 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.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<stapps-section
[title]="'dashboard.canteens.title' | translate"
[isEditable]="true"
(onEdit)="onSectionEdit()"
>
<ng-container *ngIf="(items | async)?.length">
<stapps-mensa-section-content
[items]="items | async"
></stapps-mensa-section-content>
<stapps-mensa-section-content [items]="items | async"></stapps-mensa-section-content>
</ng-container>
<ng-container *ngIf="!(items | async)?.length">
<div class="card">
<ion-label>
{{ 'dashboard.canteens.no_favorite_prefix' | translate }}
<a (click)="onSectionEdit()">{{
'dashboard.canteens.no_favorite_link' | translate
}}</a>
<a (click)="onSectionEdit()">{{ 'dashboard.canteens.no_favorite_link' | translate }}</a>
{{ 'dashboard.canteens.no_favorite_suffix' | translate }}
</ion-label>
</div>

View File

@@ -14,18 +14,9 @@
*/
import {Component} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {
AlertController,
AnimationController,
ModalController,
} from '@ionic/angular';
import {AlertController, AnimationController, ModalController} from '@ionic/angular';
import {combineLatest, Subscription} from 'rxjs';
import {
debounceTime,
distinctUntilChanged,
startWith,
take,
} from 'rxjs/operators';
import {debounceTime, distinctUntilChanged, startWith, take} from 'rxjs/operators';
import {NGXLogger} from 'ngx-logger';
import {SCThings} from '@openstapps/core';
@@ -93,11 +84,7 @@ export class MensaSectionComponent extends FoodDataListComponent {
]).subscribe(async query => {
this.queryText = query[0];
this.from = 0;
if (
typeof this.filterQuery !== 'undefined' ||
this.queryText?.length > 0 ||
this.showDefaultData
) {
if (typeof this.filterQuery !== 'undefined' || this.queryText?.length > 0 || this.showDefaultData) {
await this.fetchAndUpdateItems();
this.queryChanged.next();
}
@@ -114,9 +101,7 @@ export class MensaSectionComponent extends FoodDataListComponent {
.pipe(take(1))
.subscribe(result => {
this.items = new Promise(resolve => {
resolve(
result.data && result.data.filter(item => this.isMensaThing(item)),
);
resolve(result.data && result.data.filter(item => this.isMensaThing(item)));
});
});
}

View File

@@ -19,11 +19,7 @@
[isSectionExtended]="true"
(onEdit)="onSectionEdit()"
>
<swiper
[config]="sliderOptions"
slidesPerView="auto"
class="navigation-swiper card-swiper"
>
<swiper [config]="sliderOptions" slidesPerView="auto" class="navigation-swiper card-swiper">
<ng-template swiperSlide *ngFor="let item of activeMenuItems">
<a [routerLink]="menuItems[item].link" class="card">
<ion-icon size="40" [name]="menuItems[item].icon"></ion-icon>

View File

@@ -1,22 +1,20 @@
/*!
* 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.
* 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.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
.navigation-swiper.swiper {
.swiper-slide {
a {
font-family: var(--ion-font-family);
font-size: var(--font-size-xs);

View File

@@ -17,10 +17,7 @@ import {ModalController} from '@ionic/angular';
import {EditModalComponent} from '../../edit-modal/edit-modal.component';
import {DEFAULT_ACTIVE_MENU_ITEMS, MENU_ITEMS} from './menu-items.config';
import {MenuItemKey} from './menu-item.interface';
import {
EditModalItem,
EditModalTypeEnum,
} from '../../edit-modal/edit-modal-type.enum';
import {EditModalItem, EditModalTypeEnum} from '../../edit-modal/edit-modal-type.enum';
import {StorageProvider} from '../../../storage/storage.provider';
import {TranslatePipe} from '@ngx-translate/core';
@@ -67,15 +64,10 @@ export class NavigationSectionComponent implements OnInit {
*/
async getItems() {
if (await this.storageProvider.has(DASHBOARD_NAVIGATION)) {
const storedMenuItems: string = await this.storageProvider.get(
DASHBOARD_NAVIGATION,
);
const storedMenuItems: string = await this.storageProvider.get(DASHBOARD_NAVIGATION);
if (storedMenuItems) {
const parsedMenuItems = JSON.parse(storedMenuItems);
if (
Array.isArray(parsedMenuItems) &&
parsedMenuItems.every(it => typeof it === 'string')
) {
if (Array.isArray(parsedMenuItems) && parsedMenuItems.every(it => typeof it === 'string')) {
this.activeMenuItems = parsedMenuItems;
}
}
@@ -87,10 +79,7 @@ export class NavigationSectionComponent implements OnInit {
*/
updateActiveItems(items: MenuItemKey[]) {
this.activeMenuItems = items;
void this.storageProvider.put<string>(
DASHBOARD_NAVIGATION,
JSON.stringify(this.activeMenuItems),
);
void this.storageProvider.put<string>(DASHBOARD_NAVIGATION, JSON.stringify(this.activeMenuItems));
}
/**
@@ -114,9 +103,7 @@ export class NavigationSectionComponent implements OnInit {
modal.onDidDismiss().then(result => {
if (result.data?.items) {
this.updateActiveItems(
result.data.items
.filter((it: EditModalItem) => it.active)
.map((it: EditModalItem) => it.id),
result.data.items.filter((it: EditModalItem) => it.active).map((it: EditModalItem) => it.id),
);
}
});

View File

@@ -1,16 +1,16 @@
<!--
~ 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.
~ 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.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<stapps-section
@@ -35,9 +35,7 @@
</ng-template>
<ng-template swiperSlide>
<a [routerLink]="['/news']" class="card more-news">
<ion-label>{{
'dashboard.news.moreNews' | translate | titlecase
}}</ion-label>
<ion-label>{{ 'dashboard.news.moreNews' | translate | titlecase }}</ion-label>
<ion-thumbnail class="ion-margin-end">
<ion-icon color="dark" name="read_more" size="128"></ion-icon>
</ion-thumbnail>

View File

@@ -1,5 +1,19 @@
.news-swiper.swiper {
/*!
* 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.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
.news-swiper.swiper {
.swiper-slide {
padding: 0;

View File

@@ -17,10 +17,7 @@ import {Router} from '@angular/router';
import {NewsPageComponent} from '../../../news/page/news-page.component';
import {NewsProvider} from '../../../news/news.provider';
import {SettingsProvider} from '../../../settings/settings.provider';
import {
newsFilterSettingsFieldsMapping,
NewsFilterSettingsNames,
} from '../../../news/news-filter-settings';
import {newsFilterSettingsFieldsMapping, NewsFilterSettingsNames} from '../../../news/news-filter-settings';
import {DataProvider} from '../../../data/data.provider';
import {SCSearchValueFilter} from '@openstapps/core';
@@ -58,11 +55,7 @@ export class NewsSectionComponent extends NewsPageComponent implements OnInit {
*/
filtersMap = new Map<NewsFilterSettingsNames, SCSearchValueFilter>();
constructor(
newsProvider: NewsProvider,
settingsProvider: SettingsProvider,
private router: Router,
) {
constructor(newsProvider: NewsProvider, settingsProvider: SettingsProvider, private router: Router) {
super(newsProvider, settingsProvider);
}
@@ -72,9 +65,7 @@ export class NewsSectionComponent extends NewsPageComponent implements OnInit {
this.filtersMap.set(
setting.name as NewsFilterSettingsNames,
DataProvider.createValueFilter(
newsFilterSettingsFieldsMapping[
setting.name as NewsFilterSettingsNames
],
newsFilterSettingsFieldsMapping[setting.name as NewsFilterSettingsNames],
setting.value as string,
),
);

View File

@@ -1,22 +1,19 @@
<!--
~ 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.
~ 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.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<stapps-section
title="{{ 'dashboard.navigation.item.search' | translate }}"
[isEditable]="false"
>
<stapps-section title="{{ 'dashboard.navigation.item.search' | translate }}" [isEditable]="false">
<div class="searchbar">
<ion-input
type="search"
@@ -27,12 +24,6 @@
(search)="onSubmitSearch()"
[(ngModel)]="searchTerm"
></ion-input>
<ion-icon
size="35"
weight="300"
name="search"
(click)="onSubmitSearch()"
class="clickable"
></ion-icon>
<ion-icon size="35" weight="300" name="search" (click)="onSubmitSearch()" class="clickable"></ion-icon>
</div>
</stapps-section>