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

@@ -1,3 +1,18 @@
/*
* 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.
*
* 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/>.
*/
import {Component} from '@angular/core';
import {LibraryAccountService} from '../library-account.service';
import {PAIAPatron} from '../../types';
@@ -10,14 +25,7 @@ import {PAIAPatron} from '../../types';
export class ProfilePageComponent {
patron?: PAIAPatron;
propertiesToShow: (keyof PAIAPatron)[] = [
'id',
'name',
'email',
'address',
'expires',
'note',
];
propertiesToShow: (keyof PAIAPatron)[] = ['id', 'name', 'email', 'address', 'expires', 'note'];
constructor(private readonly libraryAccountService: LibraryAccountService) {}

View File

@@ -1,11 +1,24 @@
<!--
~ 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.
~
~ 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/>.
-->
<ion-header>
<ion-toolbar color="primary" mode="ios">
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>{{
'library.account.pages.profile.title' | translate | titlecase
}}</ion-title>
<ion-title>{{ 'library.account.pages.profile.title' | translate | titlecase }}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
@@ -14,28 +27,19 @@
<ion-grid>
<ng-container *ngFor="let property of propertiesToShow">
<ion-row *ngIf="patron[property]">
<ion-col>
{{
'library.account.pages.profile.labels' + '.' + property
| translate
}}:
</ion-col>
<ion-col> {{ 'library.account.pages.profile.labels' + '.' + property | translate }}: </ion-col>
<ion-col>
<ng-container *ngIf="!['expires'].includes(property); else date">
{{ patron[property] }}
</ng-container>
<ng-template #date>
<ng-container
*ngIf="patron[property] === '9999-12-31'; else exactDate"
>
{{
'library.account.pages.profile.values.unlimited' | translate
}}
<ng-container *ngIf="patron[property] === '9999-12-31'; else exactDate">
{{ 'library.account.pages.profile.values.unlimited' | translate }}
</ng-container>
<ng-template #exactDate>
{{
'library.account.pages.profile.values.expires' | translate
}}:&nbsp;{{ patron[property] | amDateFormat: 'll' }}
{{ 'library.account.pages.profile.values.expires' | translate }}:&nbsp;{{
patron[property] | amDateFormat: 'll'
}}
</ng-template>
</ng-template>
</ion-col>
@@ -45,7 +49,6 @@
</ion-card-content>
</ion-card>
<ng-template #loading>
<stapps-skeleton-simple-card [title]="false" [lines]="4">
</stapps-skeleton-simple-card>
<stapps-skeleton-simple-card [title]="false" [lines]="4"> </stapps-skeleton-simple-card>
</ng-template>
</ion-content>