mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-21 21:56:18 +00:00
Compare commits
2 Commits
set-depend
...
@openstapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7f512b7bd | ||
|
|
78d9690974 |
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Use observable chains instead of change detection in the rating component
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Added the ability to remove and add date series from their detail page
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Add a way to hide action chips on list items
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Improved calendar descriptions
|
|
||||||
|
|
||||||
- The dashboard quick link now has a more intuitive icon
|
|
||||||
- "Recurring" has been renamed to "Week Overview"
|
|
||||||
- Long words in calendar tabs will now break instead of overflowing
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Revamp "My Courses" section on profile page
|
|
||||||
|
|
||||||
The "My Courses" section on the profile page has been improved
|
|
||||||
|
|
||||||
- It will now show the upcoming courses for the next five days
|
|
||||||
- The section header is now consistent with the other sections
|
|
||||||
- The section now uses standard list items instead of the custom solution
|
|
||||||
|
|
||||||
Additionally, the profile page component has been cleaned up.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Replaced simple links with list items in date-series detail
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@openstapps/app': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Use event title for date series instead of the generic date series title
|
|
||||||
@@ -32,7 +32,7 @@ variables:
|
|||||||
default:
|
default:
|
||||||
image: registry.gitlab.com/openstapps/openstapps/node-builder
|
image: registry.gitlab.com/openstapps/openstapps/node-builder
|
||||||
tags:
|
tags:
|
||||||
- saas-linux-xlarge-amd64
|
- performance
|
||||||
interruptible: true
|
interruptible: true
|
||||||
before_script:
|
before_script:
|
||||||
- corepack enable
|
- corepack enable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.limit_publish_pipelines:
|
.limit_publish_pipelines:
|
||||||
rules:
|
rules:
|
||||||
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /^ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: publish
|
stage: publish
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ base image:
|
|||||||
docker build
|
docker build
|
||||||
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
|
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
|
||||||
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest" "${CI_PROJECT_DIR}/${DEPLOY_DIR}" &&
|
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest" "${CI_PROJECT_DIR}/${DEPLOY_DIR}" &&
|
||||||
docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}" --all-tags
|
docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}"
|
||||||
cache: {} # disable irrelevant cache for this job
|
cache: {} # disable irrelevant cache for this job
|
||||||
before_script: [] # do not run irrelevant before script for this job
|
before_script: [] # do not run irrelevant before script for this job
|
||||||
parallel:
|
parallel:
|
||||||
@@ -29,7 +29,5 @@ base image:
|
|||||||
DEPLOY_DIR: images/node-builder
|
DEPLOY_DIR: images/node-builder
|
||||||
- IMAGE_NAME: app-builder
|
- IMAGE_NAME: app-builder
|
||||||
DEPLOY_DIR: images/app-builder
|
DEPLOY_DIR: images/app-builder
|
||||||
- IMAGE_NAME: app-cypress
|
|
||||||
DEPLOY_DIR: images/app-cypress
|
|
||||||
rules:
|
rules:
|
||||||
- !reference [.limit_scheduled_pipelines, rules]
|
- !reference [.limit_scheduled_pipelines, rules]
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
e2e:
|
e2e:
|
||||||
image: registry.gitlab.com/openstapps/openstapps/app-cypress:node-18
|
image: cypress/browsers:latest # https://hub.docker.com/r/cypress/browsers/tags/
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pnpm --filter=@openstapps/app install
|
- pnpm --filter=@openstapps/app install
|
||||||
- pnpm --filter=@openstapps/app exec cypress install
|
- pnpm --filter=@openstapps/app exec cypress install
|
||||||
- cd node_modules/.pnpm/re2*/node_modules/re2
|
|
||||||
- npm run install
|
|
||||||
- cd $CI_PROJECT_DIR
|
|
||||||
- pnpm test:integration:app
|
- pnpm test:integration:app
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_failure
|
when: on_failure
|
||||||
|
|||||||
@@ -42,17 +42,3 @@ The command `ionic cordova run ios` runs into the error `/platforms/ios/build/em
|
|||||||
|
|
||||||
- Either use the command: `ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"`
|
- Either use the command: `ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"`
|
||||||
- Or open the iOS project in Xcode and change build system in workspace settings to `Lagacy Build System`. Then the normal run command works also.
|
- Or open the iOS project in Xcode and change build system in workspace settings to `Lagacy Build System`. Then the normal run command works also.
|
||||||
|
|
||||||
## Cypress
|
|
||||||
|
|
||||||
#### Problem
|
|
||||||
|
|
||||||
The browser doesn't open or the tests don't connect to a browser
|
|
||||||
|
|
||||||
#### Solution
|
|
||||||
|
|
||||||
Delete the Cypress config file
|
|
||||||
|
|
||||||
```shell
|
|
||||||
rm -rf ~/.config/Cypress
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -18,18 +18,14 @@
|
|||||||
|
|
||||||
describe('dashboard', async function () {
|
describe('dashboard', async function () {
|
||||||
describe('schedule section', function () {
|
describe('schedule section', function () {
|
||||||
it('should lead to the week overview', function () {
|
it('should lead to the schedule', function () {
|
||||||
cy.visit('/overview');
|
cy.visit('/overview');
|
||||||
cy.get('.schedule')
|
cy.get('.schedule').contains('a', 'Stundenplan').click();
|
||||||
.contains('a', /Wochen.*übersicht/)
|
cy.url().should('include', '/schedule/recurring');
|
||||||
.click();
|
|
||||||
cy.url().should('include', '/schedule/week-overview');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should lead to the calendar', function () {
|
|
||||||
cy.visit('/overview');
|
cy.visit('/overview');
|
||||||
cy.get('.schedule').contains('a', 'Kein Eintrag gefunden').click();
|
cy.get('.schedule').contains('a', 'Kein Eintrag gefunden').click();
|
||||||
cy.url().should('include', '/schedule/calendar');
|
cy.url().should('include', '/schedule/recurring');
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Reenable and stabilize tests
|
// TODO: Reenable and stabilize tests
|
||||||
|
|||||||
@@ -19,19 +19,19 @@
|
|||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<div #schedule class="schedule">
|
<div #schedule class="schedule">
|
||||||
<a [routerLink]="['/schedule/week-overview']">
|
<a [routerLink]="['/schedule/recurring']">
|
||||||
<ion-icon size="36" weight="300" name="calendar_month"></ion-icon>
|
<ion-icon size="40" weight="300" name="grid_view"></ion-icon>
|
||||||
<ion-label [innerHTML]="'schedule.recurring' | translate"></ion-label>
|
<ion-label>{{ 'schedule.recurring' | translate }}</ion-label>
|
||||||
</a>
|
</a>
|
||||||
<!-- Avoid structural directives here, they might interfere with the collapse animation -->
|
<!-- Avoid structural directives here, they might interfere with the collapse animation -->
|
||||||
<a
|
<a
|
||||||
[routerLink]="nextEvent ? ['/data-detail', nextEvent!.uid] : ['/schedule/calendar']"
|
[routerLink]="nextEvent?.event ? ['/data-detail', nextEvent!.event.uid] : ['/schedule/recurring']"
|
||||||
class="schedule-item-button"
|
class="schedule-item-button"
|
||||||
>
|
>
|
||||||
<ion-label>{{ 'dashboard.schedule.title' | translate }}</ion-label>
|
<ion-label>{{ 'dashboard.schedule.title' | translate }}</ion-label>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
{{
|
{{
|
||||||
nextEvent
|
nextEvent?.event
|
||||||
? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm')
|
? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm')
|
||||||
: ('dashboard.schedule.noEvent' | translate)
|
: ('dashboard.schedule.noEvent' | translate)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ ion-content {
|
|||||||
ion-label {
|
ion-label {
|
||||||
font-size: var(--font-size-xxs);
|
font-size: var(--font-size-xxs);
|
||||||
font-weight: var(--font-weight-semi-bold);
|
font-weight: var(--font-weight-semi-bold);
|
||||||
word-break: break-word;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover ::ng-deep stapps-icon {
|
&:hover ::ng-deep stapps-icon {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable unicorn/no-useless-undefined */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
@@ -13,51 +12,60 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {ChangeDetectionStrategy, Component, ElementRef, HostListener, Input} from '@angular/core';
|
import {Component, ElementRef, HostListener, Input} from '@angular/core';
|
||||||
import {SCDish, SCRatingRequest} from '@openstapps/core';
|
import {SCDish, SCRatingRequest, SCUuid} from '@openstapps/core';
|
||||||
import {RatingProvider} from '../rating.provider';
|
import {RatingProvider} from '../rating.provider';
|
||||||
import {ratingAnimation} from './rating.animation';
|
import {ratingAnimation} from './rating.animation';
|
||||||
import {BehaviorSubject, filter, merge, mergeMap, of, ReplaySubject, withLatestFrom} from 'rxjs';
|
|
||||||
import {catchError, map} from 'rxjs/operators';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stapps-rating',
|
selector: 'stapps-rating',
|
||||||
templateUrl: 'rating.html',
|
templateUrl: 'rating.html',
|
||||||
styleUrls: ['rating.scss'],
|
styleUrls: ['rating.scss'],
|
||||||
animations: [ratingAnimation],
|
animations: [ratingAnimation],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
})
|
})
|
||||||
export class StappsRatingComponent {
|
export class StappsRatingComponent {
|
||||||
performRating = new BehaviorSubject(false);
|
rate = false;
|
||||||
|
|
||||||
userRating = new BehaviorSubject<number | undefined>(undefined);
|
rated = false;
|
||||||
|
|
||||||
dish = new ReplaySubject<SCDish>(1);
|
canBeRated = false;
|
||||||
|
|
||||||
wasAlreadyRated = merge(
|
uid: SCUuid;
|
||||||
this.dish.pipe(mergeMap(({uid}) => this.ratingProvider.hasRated(uid))),
|
|
||||||
this.userRating.pipe(
|
rating?: number;
|
||||||
filter(it => it !== undefined),
|
|
||||||
withLatestFrom(this.dish),
|
@Input() set item(value: SCDish) {
|
||||||
mergeMap(([rating, {uid}]) => this.ratingProvider.rate(uid, rating as SCRatingRequest['rating'])),
|
this.uid = value.uid;
|
||||||
map(() => true),
|
|
||||||
catchError(() => of(false)),
|
Promise.all([this.ratingProvider.canRate(value), this.ratingProvider.hasRated(this.uid)] as const).then(
|
||||||
),
|
([canRate, hasRated]) => {
|
||||||
|
this.canBeRated = canRate;
|
||||||
|
this.rated = hasRated;
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
canBeRated = this.dish.pipe(mergeMap(dish => this.ratingProvider.canRate(dish)));
|
|
||||||
|
|
||||||
@Input({required: true}) set item(value: SCDish) {
|
|
||||||
this.dish.next(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(readonly elementRef: ElementRef, readonly ratingProvider: RatingProvider) {}
|
constructor(readonly elementRef: ElementRef, readonly ratingProvider: RatingProvider) {}
|
||||||
|
|
||||||
|
async submitRating(rating: number) {
|
||||||
|
this.rating = rating;
|
||||||
|
try {
|
||||||
|
await this.ratingProvider.rate(this.uid, rating as SCRatingRequest['rating']);
|
||||||
|
this.rated = true;
|
||||||
|
} catch {
|
||||||
|
this.rating = undefined;
|
||||||
|
// allow change detection to catch up first
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rate = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@HostListener('document:mousedown', ['$event'])
|
@HostListener('document:mousedown', ['$event'])
|
||||||
clickOutside(event: MouseEvent) {
|
clickOutside(event: MouseEvent) {
|
||||||
if (this.userRating.value) return;
|
if (this.rating) return;
|
||||||
if (!this.elementRef.nativeElement.contains(event.target)) {
|
if (!this.elementRef.nativeElement.contains(event.target)) {
|
||||||
this.performRating.next(false);
|
this.rate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,23 +14,19 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ion-button
|
<ion-button
|
||||||
*ngIf="canBeRated | async"
|
*ngIf="canBeRated"
|
||||||
fill="clear"
|
fill="clear"
|
||||||
(click)="$event.stopPropagation(); performRating.next(true)"
|
(click)="$event.stopPropagation(); rate = true"
|
||||||
[disabled]="wasAlreadyRated | async"
|
[disabled]="rated"
|
||||||
>
|
>
|
||||||
<ion-icon slot="icon-only" color="medium" name="thumbs_up_down"></ion-icon>
|
<ion-icon slot="icon-only" color="medium" name="thumbs_up_down"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
|
||||||
<div
|
<div class="rating-stars" *ngIf="rate && !rated" [@rating]="rating ? 'rated' : 'abandoned'">
|
||||||
class="rating-stars"
|
|
||||||
*ngIf="(performRating | async) && (wasAlreadyRated | async) !== true"
|
|
||||||
[@rating]="(userRating | async) === undefined ? 'abandoned' : 'rated'"
|
|
||||||
>
|
|
||||||
<ion-icon
|
<ion-icon
|
||||||
[class.rated-value]="(userRating | async) === i"
|
[class.rated-value]="rating === i"
|
||||||
*ngFor="let i of [5, 4, 3, 2, 1]"
|
*ngFor="let i of [5, 4, 3, 2, 1]"
|
||||||
(click)="$event.stopPropagation(); userRating.next(i)"
|
(click)="$event.stopPropagation(); submitRating(i)"
|
||||||
slot="icon-only"
|
slot="icon-only"
|
||||||
size="32"
|
size="32"
|
||||||
color="medium"
|
color="medium"
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ export class DataListItemComponent {
|
|||||||
|
|
||||||
@Input() listItemEndInteraction = true;
|
@Input() listItemEndInteraction = true;
|
||||||
|
|
||||||
@Input() listItemChipInteraction = true;
|
|
||||||
|
|
||||||
@Input() lines = 'inset';
|
@Input() lines = 'inset';
|
||||||
|
|
||||||
@Input() forceHeight = false;
|
@Input() forceHeight = false;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<ng-template [dataListItemHost]="item"></ng-template>
|
<ng-template [dataListItemHost]="item"></ng-template>
|
||||||
<stapps-action-chip-list
|
<stapps-action-chip-list
|
||||||
*ngIf="listItemChipInteraction && appearance !== 'square'"
|
*ngIf="appearance !== 'square'"
|
||||||
slot="end"
|
slot="end"
|
||||||
[item]="item"
|
[item]="item"
|
||||||
></stapps-action-chip-list>
|
></stapps-action-chip-list>
|
||||||
|
|||||||
@@ -12,49 +12,19 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {Component, Input, OnInit} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {SCDateSeries} from '@openstapps/core';
|
import {SCDateSeries} from '@openstapps/core';
|
||||||
import {ScheduleProvider, toDateSeriesRelevantData} from '../../../calendar/schedule.provider';
|
|
||||||
import {Observable} from 'rxjs';
|
|
||||||
import {map} from 'rxjs/operators';
|
|
||||||
import {DataRoutingService} from '../../data-routing.service';
|
|
||||||
import {Router} from '@angular/router';
|
|
||||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stapps-date-series-detail-content',
|
selector: 'stapps-date-series-detail-content',
|
||||||
templateUrl: 'date-series-detail-content.html',
|
templateUrl: 'date-series-detail-content.html',
|
||||||
styleUrls: ['date-series-detail-content.scss'],
|
|
||||||
})
|
})
|
||||||
export class DateSeriesDetailContentComponent implements OnInit {
|
export class DateSeriesDetailContentComponent {
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
@Input() item: SCDateSeries;
|
@Input() item: SCDateSeries;
|
||||||
|
|
||||||
isInCalendar: Observable<boolean>;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
readonly scheduleProvider: ScheduleProvider,
|
|
||||||
dataRoutingService: DataRoutingService,
|
|
||||||
router: Router,
|
|
||||||
) {
|
|
||||||
dataRoutingService
|
|
||||||
.itemSelectListener()
|
|
||||||
.pipe(takeUntilDestroyed())
|
|
||||||
.subscribe(item => {
|
|
||||||
void router.navigate(['/data-detail', item.uid]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.isInCalendar = this.scheduleProvider.uuids$.pipe(map(it => it.includes(this.item.uid)));
|
|
||||||
}
|
|
||||||
|
|
||||||
addToCalendar() {
|
|
||||||
const current = this.scheduleProvider.partialEvents$.value;
|
|
||||||
this.scheduleProvider.partialEvents$.next([...current, toDateSeriesRelevantData(this.item)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
removeFromCalendar() {
|
|
||||||
const filtered = this.scheduleProvider.partialEvents$.value.filter(it => it.uid !== this.item.uid);
|
|
||||||
this.scheduleProvider.partialEvents$.next(filtered);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,18 +12,23 @@
|
|||||||
~ You should have received a copy of the GNU General Public License along with
|
~ You should have received a copy of the GNU General Public License along with
|
||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<ng-container *ngIf="isInCalendar | async; else add">
|
<ion-card>
|
||||||
<ion-chip outline="true" color="success" (click)="removeFromCalendar()">
|
<ion-card-header> {{ 'event' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||||
<ion-icon name="event_available" fill="true"></ion-icon>
|
<ion-card-content>
|
||||||
<ion-label>{{'chips.addEvent.addedToEvents' | translate}}</ion-label>
|
<a [routerLink]="['/data-detail', item.event.uid]">{{ 'name' | thingTranslate : item.event }}</a>
|
||||||
</ion-chip>
|
</ion-card-content>
|
||||||
</ng-container>
|
</ion-card>
|
||||||
<ng-template #add>
|
<ion-card *ngIf="item.inPlace">
|
||||||
<ion-chip outline="true" color="primary" (click)="addToCalendar()">
|
<ion-card-header> {{ 'inPlace' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||||
<ion-icon name="calendar_today"></ion-icon>
|
<ion-card-content>
|
||||||
<ion-label>{{'chips.addEvent.addEvent' | translate}}</ion-label>
|
<ion-icon name="pin_drop"> </ion-icon>
|
||||||
</ion-chip>
|
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate : item.inPlace }}</a>
|
||||||
</ng-template>
|
<stapps-address-detail
|
||||||
|
*ngIf="item.inPlace.address"
|
||||||
|
[address]="item.inPlace.address"
|
||||||
|
></stapps-address-detail>
|
||||||
|
</ion-card-content>
|
||||||
|
</ion-card>
|
||||||
<stapps-simple-card
|
<stapps-simple-card
|
||||||
title="{{ 'duration' | propertyNameTranslate : item | titlecase }}"
|
title="{{ 'duration' | propertyNameTranslate : item | titlecase }}"
|
||||||
[content]="[item.duration | amDuration : 'minutes']"
|
[content]="[item.duration | amDuration : 'minutes']"
|
||||||
@@ -51,15 +56,3 @@
|
|||||||
[content]="item.performers"
|
[content]="item.performers"
|
||||||
></stapps-simple-card>
|
></stapps-simple-card>
|
||||||
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
||||||
<ion-card>
|
|
||||||
<ion-card-header> {{ 'event' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
|
||||||
<ion-card-content>
|
|
||||||
<stapps-data-list-item [item]="$any(item.event)"></stapps-data-list-item>
|
|
||||||
</ion-card-content>
|
|
||||||
</ion-card>
|
|
||||||
<ion-card *ngIf="item.inPlace">
|
|
||||||
<ion-card-header> {{ 'inPlace' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
|
||||||
<ion-card-content>
|
|
||||||
<stapps-data-list-item [item]="$any(item.inPlace)"></stapps-data-list-item>
|
|
||||||
</ion-card-content>
|
|
||||||
</ion-card>
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
ion-chip {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<div class="ion-text-wrap">
|
<div class="ion-text-wrap">
|
||||||
<ion-label class="title">{{ 'event.name' | thingTranslate : item }}</ion-label>
|
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
|
||||||
<p>
|
<p>
|
||||||
<ion-icon name="calendar_today"></ion-icon>
|
<ion-icon name="calendar_today"></ion-icon>
|
||||||
<span *ngIf="item.dates[0] && item.dates[item.dates.length - 1]">
|
<span *ngIf="item.dates[0] && item.dates[item.dates.length - 1]">
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
|
||||||
import {mergeMap, ReplaySubject} from 'rxjs';
|
|
||||||
import {map} from 'rxjs/operators';
|
|
||||||
import {SCDateSeries, SCISO8601Date} from '@openstapps/core';
|
|
||||||
import moment from 'moment/moment';
|
|
||||||
import {ScheduleProvider} from '../../calendar/schedule.provider';
|
|
||||||
|
|
||||||
interface MyCoursesTodayInterface {
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
course: SCDateSeries;
|
|
||||||
}
|
|
||||||
|
|
||||||
type MyCoursesGroup = [SCISO8601Date, MyCoursesTodayInterface[]][];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Groups date series into a list of events happening in the next days
|
|
||||||
* @param dateSeries the date series to group
|
|
||||||
* @param visibleDays the number of days ahead to group
|
|
||||||
*/
|
|
||||||
function groupDays(dateSeries: SCDateSeries[], visibleDays: number): MyCoursesGroup {
|
|
||||||
const courses: [SCISO8601Date, MyCoursesTodayInterface[]][] = [];
|
|
||||||
const dates = Array.from({length: visibleDays}, (_, i) => moment().startOf('day').add(i, 'days'));
|
|
||||||
|
|
||||||
for (const day of dates) {
|
|
||||||
const dayCourses: MyCoursesTodayInterface[] = [];
|
|
||||||
for (const course of dateSeries) {
|
|
||||||
for (const date of course.dates) {
|
|
||||||
if (moment(date).isSame(day, 'day')) {
|
|
||||||
dayCourses.push({
|
|
||||||
startTime: moment(date).toISOString(),
|
|
||||||
endTime: moment(date).add(course.duration).toISOString(),
|
|
||||||
course,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
courses.push([day.toISOString(), dayCourses]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return courses;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'my-courses',
|
|
||||||
templateUrl: 'my-courses.html',
|
|
||||||
styleUrls: ['my-courses.scss'],
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
})
|
|
||||||
export class MyCoursesComponent {
|
|
||||||
/**
|
|
||||||
* The number of days from today to display
|
|
||||||
*/
|
|
||||||
@Input({required: true}) set visibleDays(value: number) {
|
|
||||||
this.visibleDays$.next(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
readonly visibleDays$ = new ReplaySubject<number>();
|
|
||||||
|
|
||||||
myCourses = this.visibleDays$.pipe(
|
|
||||||
mergeMap(visibleDays =>
|
|
||||||
this.scheduleProvider.uuids$.pipe(
|
|
||||||
mergeMap(uuids => this.scheduleProvider.getDateSeries(uuids)),
|
|
||||||
map(dateSeries => groupDays(dateSeries.dates, visibleDays)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
constructor(private scheduleProvider: ScheduleProvider) {}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<ion-accordion-group *ngIf="myCourses | async as myCourses" [value]="myCourses[0][0]">
|
|
||||||
<ion-accordion
|
|
||||||
*ngFor="let myCoursesDay of myCourses"
|
|
||||||
[value]="myCoursesDay[0]"
|
|
||||||
[disabled]="myCoursesDay[1].length === 0"
|
|
||||||
>
|
|
||||||
<ion-item slot="header">
|
|
||||||
<!-- TODO: when using date-fns, use https://date-fns.org/v2.30.0/docs/formatRelative -->
|
|
||||||
<ion-label
|
|
||||||
>{{ myCoursesDay[0] | amDateFormat: 'dddd, ll' }} - {{ ('profile.courses.' + (myCoursesDay[1].length
|
|
||||||
=== 0 ? 'NO' : myCoursesDay[1].length === 1 ? 'ONE' : 'MANY' ) + '_EVENT') | translate: {count:
|
|
||||||
myCoursesDay[1].length} }}</ion-label
|
|
||||||
>
|
|
||||||
<ion-icon class="ion-accordion-toggle-icon" name="expand_more"></ion-icon>
|
|
||||||
</ion-item>
|
|
||||||
<ion-list class="ion-padding" slot="content">
|
|
||||||
<ng-container *ngIf="myCoursesDay[1].length === 0">
|
|
||||||
<div class="no-course">{{ 'profile.courses.no_courses' | translate }}</div>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngFor="let myCourse of myCoursesDay[1]">
|
|
||||||
<ion-item-group>
|
|
||||||
<ion-item-divider
|
|
||||||
>{{myCourse.startTime | amDateFormat: 'LT'}} - {{myCourse.endTime | amDateFormat:
|
|
||||||
'LT'}}</ion-item-divider
|
|
||||||
>
|
|
||||||
<stapps-data-list-item
|
|
||||||
[listItemChipInteraction]="false"
|
|
||||||
[hideThumbnail]="true"
|
|
||||||
[item]="myCourse.course"
|
|
||||||
></stapps-data-list-item>
|
|
||||||
</ion-item-group>
|
|
||||||
</ng-container>
|
|
||||||
</ion-list>
|
|
||||||
</ion-accordion>
|
|
||||||
</ion-accordion-group>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
ion-accordion-group {
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: var(--border-radius-default);
|
|
||||||
}
|
|
||||||
|
|
||||||
ion-item-divider {
|
|
||||||
--background: transparent;
|
|
||||||
--color: inherit;
|
|
||||||
}
|
|
||||||
@@ -12,20 +12,41 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {Component} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
|
import {firstValueFrom, Observable, of, Subscription} from 'rxjs';
|
||||||
import {AuthHelperService} from '../../auth/auth-helper.service';
|
import {AuthHelperService} from '../../auth/auth-helper.service';
|
||||||
import {SCAuthorizationProviderType, SCUserConfiguration} from '@openstapps/core';
|
import {SCAuthorizationProviderType, SCDateSeries, SCUserConfiguration} from '@openstapps/core';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {ScheduleProvider} from '../../calendar/schedule.provider';
|
import {ScheduleProvider} from '../../calendar/schedule.provider';
|
||||||
|
import moment from 'moment';
|
||||||
|
import {SCIcon} from '../../../util/ion-icon/icon';
|
||||||
import {profilePageSections} from '../../../../config/profile-page-sections';
|
import {profilePageSections} from '../../../../config/profile-page-sections';
|
||||||
import {filter, map} from 'rxjs/operators';
|
import {filter, map} from 'rxjs/operators';
|
||||||
|
|
||||||
|
const CourseCard = {
|
||||||
|
collapsed: SCIcon`expand_more`,
|
||||||
|
expanded: SCIcon`expand_less`,
|
||||||
|
};
|
||||||
|
|
||||||
|
interface MyCoursesTodayInterface {
|
||||||
|
startTime: string;
|
||||||
|
endTime: string;
|
||||||
|
course: SCDateSeries;
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-home',
|
selector: 'app-home',
|
||||||
templateUrl: 'profile-page.html',
|
templateUrl: 'profile-page.html',
|
||||||
styleUrls: ['profile-page.scss'],
|
styleUrls: ['profile-page.scss'],
|
||||||
})
|
})
|
||||||
export class ProfilePageComponent {
|
export class ProfilePageComponent implements OnInit {
|
||||||
|
data: {
|
||||||
|
[key in SCAuthorizationProviderType]: {loggedIn$: Observable<boolean>};
|
||||||
|
} = {
|
||||||
|
default: {loggedIn$: of(false)},
|
||||||
|
paia: {loggedIn$: of(false)},
|
||||||
|
};
|
||||||
|
|
||||||
user$ = this.authHelper.getProvider('default').user$.pipe(
|
user$ = this.authHelper.getProvider('default').user$.pipe(
|
||||||
filter(user => user !== undefined),
|
filter(user => user !== undefined),
|
||||||
map(userInfo => {
|
map(userInfo => {
|
||||||
@@ -37,18 +58,59 @@ export class ProfilePageComponent {
|
|||||||
|
|
||||||
logins: SCAuthorizationProviderType[] = [];
|
logins: SCAuthorizationProviderType[] = [];
|
||||||
|
|
||||||
|
originPath: string | null;
|
||||||
|
|
||||||
userInfo?: SCUserConfiguration;
|
userInfo?: SCUserConfiguration;
|
||||||
|
|
||||||
|
courseCardEnum = CourseCard;
|
||||||
|
|
||||||
|
courseCardState = CourseCard.expanded;
|
||||||
|
|
||||||
|
todayDate = moment().startOf('day').add(0, 'day').format(); // moment().startOf('day').format(); '2022-05-03T00:00:00+02:00'
|
||||||
|
|
||||||
|
myCoursesToday: MyCoursesTodayInterface[] = [];
|
||||||
|
|
||||||
|
subscriptions: Subscription[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly authHelper: AuthHelperService,
|
private authHelper: AuthHelperService,
|
||||||
readonly activatedRoute: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
readonly scheduleProvider: ScheduleProvider,
|
protected readonly scheduleProvider: ScheduleProvider,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.data.default.loggedIn$ = this.authHelper.getProvider('default').isAuthenticated$;
|
||||||
|
this.data.paia.loggedIn$ = this.authHelper.getProvider('paia').isAuthenticated$;
|
||||||
|
|
||||||
|
this.subscriptions.push(
|
||||||
|
this.route.queryParamMap.subscribe(queryParameters => {
|
||||||
|
this.originPath = queryParameters.get('origin_path');
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
this.getMyCourses();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getMyCourses() {
|
||||||
|
const result = await firstValueFrom(this.scheduleProvider.uuids$);
|
||||||
|
const courses = await this.scheduleProvider.getDateSeries(result);
|
||||||
|
|
||||||
|
for (const course of courses.dates) {
|
||||||
|
for (const date of course.dates) {
|
||||||
|
if (moment(date).startOf('day').format() === this.todayDate) {
|
||||||
|
this.myCoursesToday[this.myCoursesToday.length] = {
|
||||||
|
startTime: moment(date).format('LT'),
|
||||||
|
endTime: moment(date).add(course.duration).format('LT'),
|
||||||
|
course,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async signIn(providerType: SCAuthorizationProviderType) {
|
async signIn(providerType: SCAuthorizationProviderType) {
|
||||||
const originPath = this.activatedRoute.snapshot.queryParamMap.get('origin_path');
|
await this.handleOriginPath();
|
||||||
await (originPath ? this.authHelper.setOriginPath(originPath) : this.authHelper.deleteOriginPath());
|
this.authHelper.getProvider(providerType).signIn();
|
||||||
await this.authHelper.getProvider(providerType).signIn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async signOut(providerType: SCAuthorizationProviderType) {
|
async signOut(providerType: SCAuthorizationProviderType) {
|
||||||
@@ -56,6 +118,25 @@ export class ProfilePageComponent {
|
|||||||
this.userInfo = undefined;
|
this.userInfo = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleCourseCardState() {
|
||||||
|
if (this.courseCardState === CourseCard.expanded) {
|
||||||
|
const card: HTMLElement | null = document.querySelector('.course-card');
|
||||||
|
const height = card?.scrollHeight;
|
||||||
|
if (card && height) {
|
||||||
|
card.style.setProperty('--max-height', height + 'px');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.courseCardState =
|
||||||
|
this.courseCardState === CourseCard.expanded ? CourseCard.collapsed : CourseCard.expanded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async handleOriginPath() {
|
||||||
|
this.originPath
|
||||||
|
? await this.authHelper.setOriginPath(this.originPath)
|
||||||
|
: await this.authHelper.deleteOriginPath();
|
||||||
|
}
|
||||||
|
|
||||||
ionViewWillEnter() {
|
ionViewWillEnter() {
|
||||||
this.authHelper
|
this.authHelper
|
||||||
.getProvider('default')
|
.getProvider('default')
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content color="light" parallax [parallaxSize]="130">
|
<ion-content color="light" parallax [parallaxSize]="130">
|
||||||
|
<section class="user-card-wrapper">
|
||||||
<ion-card class="user-card">
|
<ion-card class="user-card">
|
||||||
<ion-card-header>
|
<ion-card-header>
|
||||||
<ion-img src="assets/imgs/header.svg"></ion-img>
|
<ion-img src="assets/imgs/header.svg"></ion-img>
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col size="3"></ion-col>
|
<ion-col size="3"></ion-col>
|
||||||
<ion-col
|
<ion-col
|
||||||
*ngIf="authHelper.getProvider('default').isAuthenticated$ | async as loggedIn; else logInPrompt"
|
*ngIf="data.default.loggedIn$ | async as loggedIn; else logInPrompt"
|
||||||
size="9"
|
size="9"
|
||||||
class="main-info"
|
class="main-info"
|
||||||
>
|
>
|
||||||
@@ -65,11 +66,33 @@
|
|||||||
</ion-grid>
|
</ion-grid>
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
|
</section>
|
||||||
<stapps-profile-page-section
|
<stapps-profile-page-section
|
||||||
*ngFor="let section of sections"
|
*ngFor="let section of sections"
|
||||||
[item]="section"
|
[item]="section"
|
||||||
></stapps-profile-page-section>
|
></stapps-profile-page-section>
|
||||||
<stapps-section [title]="'profile.titleCourses' | translate">
|
<section class="courses">
|
||||||
<my-courses [visibleDays]="5"></my-courses>
|
<ion-label class="section-headline"> {{ 'profile.titleCourses' | translate | uppercase }} </ion-label>
|
||||||
</stapps-section>
|
<ion-card class="courses-card">
|
||||||
|
<ion-card-header (click)="toggleCourseCardState()">
|
||||||
|
<span>{{ 'profile.courses.today' | translate | uppercase }}</span>
|
||||||
|
<ion-icon [name]="courseCardState" color="dark" size="20"></ion-icon>
|
||||||
|
</ion-card-header>
|
||||||
|
<ion-card-content class="course-card" [class.show-card]="courseCardState === courseCardEnum.expanded">
|
||||||
|
<ng-container *ngIf="myCoursesToday.length === 0">
|
||||||
|
<div class="no-course">{{ 'profile.courses.no_courses' | translate }}</div>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngFor="let myCourse of myCoursesToday">
|
||||||
|
<div class="clickable" [routerLink]="['/data-detail', myCourse.course.event.uid]">
|
||||||
|
<div>{{ myCourse?.startTime }} - {{ myCourse?.endTime }}</div>
|
||||||
|
<div>{{ myCourse?.course.event?.originalCategory }}</div>
|
||||||
|
<div [class.last]="!myCourse?.course.inPlace?.name">{{ myCourse.course?.event?.name }}</div>
|
||||||
|
<div *ngIf="myCourse.course?.inPlace?.name" [class.last]="myCourse.course?.inPlace?.name">
|
||||||
|
{{ myCourse.course?.inPlace.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
</ion-card-content>
|
||||||
|
</ion-card>
|
||||||
|
</section>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -12,12 +12,28 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
// TODO: clean up this mess
|
:host {
|
||||||
.user-card {
|
section {
|
||||||
|
margin-bottom: calc(2 * var(--spacing-lg) - var(--spacing-md));
|
||||||
|
padding: var(--spacing-md);
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-headline {
|
||||||
|
margin-bottom: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-card-wrapper {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.user-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
margin: var(--spacing-xl);
|
margin: 0;
|
||||||
|
|
||||||
border-radius: var(--border-radius-default);
|
border-radius: var(--border-radius-default);
|
||||||
box-shadow: var(--shadow-profile-card);
|
box-shadow: var(--shadow-profile-card);
|
||||||
@@ -114,4 +130,98 @@
|
|||||||
color: var(--ion-color-text);
|
color: var(--ion-color-text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-thumbnail {
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
background: var(--placeholder-gray);
|
||||||
|
border-radius: var(--border-radius-default);
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-row.main-info {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.courses {
|
||||||
|
.courses-card {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
background-color: unset;
|
||||||
|
border-radius: var(--border-radius-default) var(--border-radius-default) 0 0;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
ion-card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
background-color: var(--ion-item-background);
|
||||||
|
border-radius: var(--border-radius-default) var(--border-radius-default) 0 0;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
font-weight: var(--font-weight-bold);
|
||||||
|
color: var(--ion-item-background-color-contrast);
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--ion-color-light);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-card-content {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
max-height: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
background-color: var(--ion-item-background);
|
||||||
|
border-radius: var(--border-radius-default);
|
||||||
|
|
||||||
|
transition: max-height 250ms ease-in-out, padding 250ms ease-in-out, margin 250ms ease-in-out;
|
||||||
|
|
||||||
|
&.show-card {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
max-height: var(--max-height);
|
||||||
|
margin: var(--spacing-xxl);
|
||||||
|
padding: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
font-size: var(--font-size-md);
|
||||||
|
font-weight: var(--font-weight-black);
|
||||||
|
color: var(--ion-item-background-color-contrast);
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&.no-course {
|
||||||
|
padding: var(--spacing-xxl) var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.last {
|
||||||
|
margin-bottom: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
@@ -24,9 +25,6 @@ import {UtilModule} from '../../util/util.module';
|
|||||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||||
import {ProfilePageSectionComponent} from './page/profile-page-section.component';
|
import {ProfilePageSectionComponent} from './page/profile-page-section.component';
|
||||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||||
import {DataModule} from '../data/data.module';
|
|
||||||
import {MyCoursesComponent} from './page/my-courses.component';
|
|
||||||
import {MomentModule} from 'ngx-moment';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@@ -36,7 +34,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [MyCoursesComponent, ProfilePageComponent, ProfilePageSectionComponent],
|
declarations: [ProfilePageComponent, ProfilePageSectionComponent],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
@@ -47,8 +45,6 @@ const routes: Routes = [
|
|||||||
SwiperModule,
|
SwiperModule,
|
||||||
UtilModule,
|
UtilModule,
|
||||||
ThingTranslateModule,
|
ThingTranslateModule,
|
||||||
DataModule,
|
|
||||||
MomentModule,
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ProfilePageModule {}
|
export class ProfilePageModule {}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
|||||||
onInit() {
|
onInit() {
|
||||||
this.tabChoreographer = new SharedAxisChoreographer(this.activatedRoute.snapshot.paramMap.get('mode'), [
|
this.tabChoreographer = new SharedAxisChoreographer(this.activatedRoute.snapshot.paramMap.get('mode'), [
|
||||||
'calendar',
|
'calendar',
|
||||||
'week-overview',
|
'recurring',
|
||||||
'single',
|
'single',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,18 +18,15 @@
|
|||||||
<ion-buttons slot="start">
|
<ion-buttons slot="start">
|
||||||
<ion-back-button></ion-back-button>
|
<ion-back-button></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title
|
<ion-title *ngIf="tabChoreographer.currentValue === 'calendar'"
|
||||||
*ngIf="tabChoreographer.currentValue === 'calendar'"
|
>{{ 'schedule.calendar' | translate | titlecase }}</ion-title
|
||||||
[innerHTML]="'schedule.calendar' | translate | titlecase"
|
>
|
||||||
></ion-title>
|
<ion-title *ngIf="tabChoreographer.currentValue === 'recurring'"
|
||||||
<ion-title
|
>{{ 'schedule.recurring' | translate | titlecase }}</ion-title
|
||||||
*ngIf="tabChoreographer.currentValue === 'week-overview'"
|
>
|
||||||
[innerHTML]="'schedule.recurring' | translate | titlecase"
|
<ion-title *ngIf="tabChoreographer.currentValue === 'single'"
|
||||||
></ion-title>
|
>{{ 'schedule.single' | translate | titlecase }}</ion-title
|
||||||
<ion-title
|
>
|
||||||
*ngIf="tabChoreographer.currentValue === 'single'"
|
|
||||||
[innerHTML]="'schedule.single' | translate | titlecase"
|
|
||||||
></ion-title>
|
|
||||||
<ion-buttons slot="end">
|
<ion-buttons slot="end">
|
||||||
<ion-button (click)="onTodayClick()">
|
<ion-button (click)="onTodayClick()">
|
||||||
<ion-icon name="today" slot="icon-only"></ion-icon>
|
<ion-icon name="today" slot="icon-only"></ion-icon>
|
||||||
@@ -39,15 +36,15 @@
|
|||||||
<ion-toolbar color="primary" mode="md" class="tabs-toolbar">
|
<ion-toolbar color="primary" mode="md" class="tabs-toolbar">
|
||||||
<ion-segment #segment value="calendar" (ionChange)="onSegmentChange()">
|
<ion-segment #segment value="calendar" (ionChange)="onSegmentChange()">
|
||||||
<ion-segment-button value="calendar" layout="icon-start">
|
<ion-segment-button value="calendar" layout="icon-start">
|
||||||
<ion-label class="ion-text-wrap" [innerHTML]="'schedule.calendar' | translate"></ion-label>
|
<ion-label>{{ 'schedule.calendar' | translate }}</ion-label>
|
||||||
<ion-icon name="calendar_today"></ion-icon>
|
<ion-icon name="calendar_today"></ion-icon>
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="week-overview" layout="icon-start">
|
<ion-segment-button value="recurring" layout="icon-start">
|
||||||
<ion-label class="ion-text-wrap" [innerHTML]="'schedule.recurring' | translate"></ion-label>
|
<ion-label>{{ 'schedule.recurring' | translate }}</ion-label>
|
||||||
<ion-icon name="event_repeat"></ion-icon>
|
<ion-icon name="event_repeat"></ion-icon>
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="single" layout="icon-start">
|
<ion-segment-button value="single" layout="icon-start">
|
||||||
<ion-label class="ion-text-wrap" [innerHTML]="'schedule.single' | translate"></ion-label>
|
<ion-label>{{ 'schedule.single' | translate }}</ion-label>
|
||||||
<ion-icon name="event_upcoming"></ion-icon>
|
<ion-icon name="event_upcoming"></ion-icon>
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
@@ -62,7 +59,7 @@
|
|||||||
>
|
>
|
||||||
<stapps-calendar-view *ngSwitchCase="'calendar'" [layout]="layout"></stapps-calendar-view>
|
<stapps-calendar-view *ngSwitchCase="'calendar'" [layout]="layout"></stapps-calendar-view>
|
||||||
<!-- Schedule view needs full week -->
|
<!-- Schedule view needs full week -->
|
||||||
<stapps-schedule-view *ngSwitchCase="'week-overview'" [layout]="layout"></stapps-schedule-view>
|
<stapps-schedule-view *ngSwitchCase="'recurring'" [layout]="layout"></stapps-schedule-view>
|
||||||
<stapps-single-events *ngSwitchCase="'single'"></stapps-single-events>
|
<stapps-single-events *ngSwitchCase="'single'"></stapps-single-events>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import {ChooseEventsPageComponent} from './page/choose-events-page.component';
|
|||||||
const settingsRoutes: Routes = [
|
const settingsRoutes: Routes = [
|
||||||
{path: 'schedule', redirectTo: 'schedule/calendar/now'},
|
{path: 'schedule', redirectTo: 'schedule/calendar/now'},
|
||||||
{path: 'schedule/calendar', redirectTo: 'schedule/calendar/now'},
|
{path: 'schedule/calendar', redirectTo: 'schedule/calendar/now'},
|
||||||
{path: 'schedule/week-overview', redirectTo: 'schedule/week-overview/now'},
|
{path: 'schedule/recurring', redirectTo: 'schedule/recurring/now'},
|
||||||
{path: 'schedule/single', redirectTo: 'schedule/single/now'},
|
{path: 'schedule/single', redirectTo: 'schedule/single/now'},
|
||||||
// calendar | recurring | single
|
// calendar | recurring | single
|
||||||
{path: 'schedule/:mode/:date', component: SchedulePageComponent},
|
{path: 'schedule/:mode/:date', component: SchedulePageComponent},
|
||||||
|
|||||||
@@ -459,9 +459,9 @@
|
|||||||
"view": {
|
"view": {
|
||||||
"today": "Heute"
|
"today": "Heute"
|
||||||
},
|
},
|
||||||
"recurring": "Wochen­übersicht",
|
"recurring": "Stundenplan",
|
||||||
"calendar": "Kalender",
|
"calendar": "Kalender",
|
||||||
"single": "Einzel­termine",
|
"single": "Einzeltermine",
|
||||||
"addEventPage": {
|
"addEventPage": {
|
||||||
"TITLE": "Termine Hinzufügen",
|
"TITLE": "Termine Hinzufügen",
|
||||||
"PLACEHOLDER": "Termine",
|
"PLACEHOLDER": "Termine",
|
||||||
@@ -501,10 +501,8 @@
|
|||||||
"logInPrompt": "Bitte loggen Sie sich ein, um Ihre Nutzerdaten sehen zu können."
|
"logInPrompt": "Bitte loggen Sie sich ein, um Ihre Nutzerdaten sehen zu können."
|
||||||
},
|
},
|
||||||
"courses": {
|
"courses": {
|
||||||
"no_courses": "Heute stehen keine Termine mehr an.",
|
"today": "Heute",
|
||||||
"NO_EVENT": "Keine Termine",
|
"no_courses": "Heute stehen keine Termine mehr an."
|
||||||
"ONE_EVENT": "Ein Termin",
|
|
||||||
"MANY_EVENT": "{{count}} Termine"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|||||||
@@ -459,7 +459,7 @@
|
|||||||
"view": {
|
"view": {
|
||||||
"today": "Today"
|
"today": "Today"
|
||||||
},
|
},
|
||||||
"recurring": "Week Overview",
|
"recurring": "Recurring",
|
||||||
"calendar": "Calendar",
|
"calendar": "Calendar",
|
||||||
"single": "Single Events",
|
"single": "Single Events",
|
||||||
"addEventPage": {
|
"addEventPage": {
|
||||||
@@ -501,10 +501,8 @@
|
|||||||
"logInPrompt": "Please log in to view your user data."
|
"logInPrompt": "Please log in to view your user data."
|
||||||
},
|
},
|
||||||
"courses": {
|
"courses": {
|
||||||
"no_courses": "There are no more appointments scheduled today.",
|
"today": "Today",
|
||||||
"NO_EVENT": "no events",
|
"no_courses": "There are no more appointments scheduled today."
|
||||||
"ONE_EVENT": "one event",
|
|
||||||
"MANY_EVENT": "{{count}} events"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|||||||
Binary file not shown.
@@ -1,103 +0,0 @@
|
|||||||
### Set base image
|
|
||||||
FROM cypress/base:18.16.1
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN node --version
|
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
fonts-liberation \
|
|
||||||
git \
|
|
||||||
libcurl4 \
|
|
||||||
libcurl3-gnutls \
|
|
||||||
libcurl3-nss \
|
|
||||||
xdg-utils \
|
|
||||||
wget \
|
|
||||||
curl \
|
|
||||||
# firefox dependencies
|
|
||||||
bzip2 \
|
|
||||||
firefox-esr \
|
|
||||||
# add codecs needed for video playback in firefox
|
|
||||||
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
|
||||||
mplayer \
|
|
||||||
# edge dependencies
|
|
||||||
gnupg \
|
|
||||||
dirmngr \
|
|
||||||
# ci dependencies
|
|
||||||
build-essential \
|
|
||||||
jq \
|
|
||||||
musl-dev \
|
|
||||||
# clean up
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
#funky alpine linux compatibility
|
|
||||||
RUN ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
|
|
||||||
|
|
||||||
# install libappindicator3-1 - not included with Debian 11
|
|
||||||
RUN wget --no-verbose -O /usr/src/libappindicator3-1_0.4.92-7_amd64.deb "http://ftp.us.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-7_amd64.deb" && \
|
|
||||||
dpkg -i /usr/src/libappindicator3-1_0.4.92-7_amd64.deb ; \
|
|
||||||
apt update && \
|
|
||||||
apt --fix-broken install -y && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -f /usr/src/libappindicator3-1_0.4.92-7_amd64.deb
|
|
||||||
|
|
||||||
# install Chrome browser
|
|
||||||
RUN export CHROME_VERSION=$(curl -fsSL https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions | jq -r '.versions[0].version') && \
|
|
||||||
wget --no-verbose -O /usr/src/google-chrome-stable_current_amd64.deb "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb" && \
|
|
||||||
dpkg -i /usr/src/google-chrome-stable_current_amd64.deb ; \
|
|
||||||
apt update && \
|
|
||||||
apt --fix-broken install -y && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -f /usr/src/google-chrome-stable_current_amd64.deb
|
|
||||||
|
|
||||||
# "fake" dbus address to prevent errors
|
|
||||||
# https://github.com/SeleniumHQ/docker-selenium/issues/87
|
|
||||||
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
|
|
||||||
|
|
||||||
# install Firefox browser
|
|
||||||
RUN export FIREFOX_VERSION=$(curl -fsSL https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION') && \
|
|
||||||
wget --no-verbose -O /tmp/firefox.tar.bz2 "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" && \
|
|
||||||
tar -C /opt -xjf /tmp/firefox.tar.bz2 && \
|
|
||||||
rm /tmp/firefox.tar.bz2 && \
|
|
||||||
ln -fs /opt/firefox/firefox /usr/bin/firefox
|
|
||||||
|
|
||||||
RUN echo "Downloading Latest Edge version..."
|
|
||||||
|
|
||||||
## Setup Edge
|
|
||||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
|
||||||
RUN install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
|
|
||||||
RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
|
|
||||||
RUN rm microsoft.gpg
|
|
||||||
|
|
||||||
## Install Edge
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y microsoft-edge-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
# Add a link to the browser that allows Cypress to find it
|
|
||||||
RUN ln -s /usr/bin/microsoft-edge /usr/bin/edge
|
|
||||||
|
|
||||||
# versions of local tools
|
|
||||||
RUN echo " node version: $(node -v) \n" \
|
|
||||||
"npm version: $(npm -v) \n" \
|
|
||||||
"yarn version: $(yarn -v) \n" \
|
|
||||||
"debian version: $(cat /etc/debian_version) \n" \
|
|
||||||
"Chrome version: $(google-chrome --version) \n" \
|
|
||||||
"Firefox version: $(firefox --version) \n" \
|
|
||||||
"Edge version: $(edge --version) \n" \
|
|
||||||
"git version: $(git --version) \n" \
|
|
||||||
"whoami: $(whoami) \n"
|
|
||||||
|
|
||||||
# a few environment variables to make NPM installs easier
|
|
||||||
# good colors for most applications
|
|
||||||
ENV TERM=xterm
|
|
||||||
# avoid million NPM install messages
|
|
||||||
ENV npm_config_loglevel=warn
|
|
||||||
# allow installing when the main user is root
|
|
||||||
ENV npm_config_unsafe_perm=true
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@openstapps/app-cypress",
|
|
||||||
"version": "node-18",
|
|
||||||
"private": true,
|
|
||||||
"type": "module",
|
|
||||||
"license": "GPL-3.0-only",
|
|
||||||
"author": "Rainer Killinger <mail-openstapps@killinger.co>",
|
|
||||||
"contributors": [
|
|
||||||
],
|
|
||||||
"files": [
|
|
||||||
"Dockerfile",
|
|
||||||
"CHANGELOG.md"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"format:fix": "dotenv -c -- turbo run format:fix",
|
"format:fix": "dotenv -c -- turbo run format:fix",
|
||||||
"lint": "dotenv -c -- turbo run lint",
|
"lint": "dotenv -c -- turbo run lint",
|
||||||
"lint:fix": "dotenv -c -- turbo run lint:fix",
|
"lint:fix": "dotenv -c -- turbo run lint:fix",
|
||||||
"publish-packages": "pnpm changeset version && pnpm syncpack:fix && pnpm install && git add . && git commit -m \"docs: update changelogs for release\n\nci: publish release\" && git push && pnpm changeset tag && git push --follow-tags",
|
"publish-packages": "pnpm changeset version && pnpm syncpack:fix && pnpm install && git add . && git commit -m \"refactor: update changelog\n\nci: publish release\" && git push && pnpm changeset tag && git push --follow-tags",
|
||||||
"syncpack": "syncpack list-mismatches && syncpack lint-semver-ranges --types dev,peer,prod",
|
"syncpack": "syncpack list-mismatches && syncpack lint-semver-ranges --types dev,peer,prod",
|
||||||
"syncpack:fix": "syncpack format && syncpack fix-mismatches",
|
"syncpack:fix": "syncpack format && syncpack fix-mismatches",
|
||||||
"test": "trap 'node coverage.mjs' EXIT && dotenv -c -- turbo run test",
|
"test": "trap 'node coverage.mjs' EXIT && dotenv -c -- turbo run test",
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
<title>OpenStApps API</title>
|
<title>OpenStApps API</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="preconnect" href="https://fonts.bunny.net" />
|
|
||||||
<link
|
<link
|
||||||
href="https://fonts.bunny.net/css?family=montserrat:300,400,700|roboto:300,400,700"
|
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<!-- Redoc doesn't change outer page styles -->
|
<!-- Redoc doesn't change outer page styles -->
|
||||||
@@ -18,7 +17,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<redoc spec-url="./openapi.json"></redoc>
|
<redoc spec-url="openapi.json"></redoc>
|
||||||
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
|
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
||||||
import {LightweightDefinitionKind} from '../../src/index.js';
|
import {LightweightDefinitionKind} from '../../src/index.js';
|
||||||
import {TypeFlags} from 'typescript';
|
|
||||||
|
|
||||||
// @ts-expect-error unused type
|
// @ts-expect-error unused type
|
||||||
type TestTypeAlias = number | string;
|
type TestTypeAlias = number | string;
|
||||||
@@ -57,12 +56,12 @@ export const testConfig: EasyAstSpecType = {
|
|||||||
{
|
{
|
||||||
referenceName: 'Foo',
|
referenceName: 'Foo',
|
||||||
value: 0,
|
value: 0,
|
||||||
flags: 1280 as TypeFlags,
|
flags: 1280,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
referenceName: 'Bar',
|
referenceName: 'Bar',
|
||||||
value: 1,
|
value: 1,
|
||||||
flags: 1280 as TypeFlags,
|
flags: 1280,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
||||||
import {LightweightDefinitionKind} from '../../src/index.js';
|
import {LightweightDefinitionKind} from '../../src/index.js';
|
||||||
import {TypeFlags} from 'typescript';
|
|
||||||
|
|
||||||
// @ts-expect-error unused type
|
// @ts-expect-error unused type
|
||||||
enum TestAuto {
|
enum TestAuto {
|
||||||
@@ -42,12 +41,12 @@ export const testConfig: EasyAstSpecType = {
|
|||||||
{
|
{
|
||||||
referenceName: 'Foo',
|
referenceName: 'Foo',
|
||||||
value: 0,
|
value: 0,
|
||||||
flags: 1280 as TypeFlags,
|
flags: 1280,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
referenceName: 'Bar',
|
referenceName: 'Bar',
|
||||||
value: 1,
|
value: 1,
|
||||||
flags: 1280 as TypeFlags,
|
flags: 1280,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -62,12 +61,12 @@ export const testConfig: EasyAstSpecType = {
|
|||||||
{
|
{
|
||||||
referenceName: 'YES',
|
referenceName: 'YES',
|
||||||
value: 'yes',
|
value: 'yes',
|
||||||
flags: 1152 as TypeFlags,
|
flags: 1152,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
referenceName: 'NO',
|
referenceName: 'NO',
|
||||||
value: 'no',
|
value: 'no',
|
||||||
flags: 1152 as TypeFlags,
|
flags: 1152,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
||||||
import {LightweightDefinitionKind} from '../../src/index.js';
|
import {LightweightDefinitionKind} from '../../src/index.js';
|
||||||
import {TypeFlags} from 'typescript';
|
|
||||||
|
|
||||||
// @ts-expect-error unused
|
// @ts-expect-error unused
|
||||||
interface Test {
|
interface Test {
|
||||||
@@ -54,7 +53,7 @@ export const testConfig: EasyAstSpecType = {
|
|||||||
name: 'boolean_type',
|
name: 'boolean_type',
|
||||||
type: {
|
type: {
|
||||||
value: 'boolean',
|
value: 'boolean',
|
||||||
flags: 1_048_592 as TypeFlags,
|
flags: 1_048_592,
|
||||||
specificationTypes: [
|
specificationTypes: [
|
||||||
{
|
{
|
||||||
value: 'false',
|
value: 'false',
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"entryPoints": ["packages/**/docs/docs.json"],
|
"entryPoints": ["packages/**/docs/docs.json"],
|
||||||
"out": "./docs",
|
"out": "./docs",
|
||||||
"navigationLinks": {
|
"navigationLinks": {
|
||||||
"API": "./api/",
|
"API": "api",
|
||||||
"GitLab": "https://gitlab.com/openstapps/openstapps/",
|
"GitLab": "https://gitlab.com/openstapps/openstapps/",
|
||||||
"Wiki": "https://gitlab.com/openstapps/openstapps/-/wikis/home"
|
"Wiki": "https://gitlab.com/openstapps/openstapps/-/wikis/home"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user