mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-18 23:52:52 +00:00
Compare commits
4 Commits
@openstapp
...
d682102467
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d682102467 | ||
|
|
566ef35652 | ||
|
|
4a48e330bc | ||
|
|
1c39483e9d |
6
.changeset/new-yaks-drop.md
Normal file
6
.changeset/new-yaks-drop.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@openstapps/backend": patch
|
||||
"@openstapps/logger": patch
|
||||
---
|
||||
|
||||
Updated nodemailer dependency
|
||||
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
@@ -4,13 +4,6 @@
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Chrome",
|
||||
"request": "launch",
|
||||
"type": "chrome",
|
||||
"url": "http://localhost:8100",
|
||||
"webRoot": "${workspaceFolder}/frontend/app/www"
|
||||
},
|
||||
{
|
||||
"type":"node",
|
||||
"request": "launch",
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 6b06de40: Updated nodemailer dependency
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -112,7 +112,7 @@ const menus = [
|
||||
icon: 'school',
|
||||
items: [
|
||||
{
|
||||
icon: 'star',
|
||||
icon: 'grade',
|
||||
route: '/favorites',
|
||||
title: 'favorites',
|
||||
translations: {
|
||||
|
||||
@@ -5,8 +5,8 @@ const userGroupSetting = {
|
||||
categories: ['profile'],
|
||||
defaultValue: 'students',
|
||||
description:
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
'The user group the app is going to be used.' +
|
||||
'This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'group',
|
||||
order: 1,
|
||||
@@ -25,7 +25,7 @@ const userGroupSetting = {
|
||||
},
|
||||
en: {
|
||||
description:
|
||||
'The user group the app is going to use primarily.' +
|
||||
'The user group the app is going to be used.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
name: 'Group',
|
||||
values: ['students', 'employees', 'guests'],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="star" route="/favorites"/>
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="star" route="/favorites"/>
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.0",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
@@ -22,8 +22,8 @@
|
||||
"typescript": "5.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "7.11.0",
|
||||
"@typescript-eslint/parser": "7.11.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/gitlab-api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/api-plugin@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
# @openstapps/app
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/api@4.0.2
|
||||
- @openstapps/collection-utils@4.0.0
|
||||
- @openstapps/core@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -27,7 +27,7 @@ include ':capacitor-filesystem'
|
||||
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/filesystem/android')
|
||||
|
||||
include ':capacitor-geolocation'
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@7.1.5_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation/android')
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation/android')
|
||||
|
||||
include ':capacitor-haptics'
|
||||
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/haptics/android')
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
"icon": "school",
|
||||
"items": [
|
||||
{
|
||||
"icon": "star",
|
||||
"icon": "grade",
|
||||
"route": "/favorites",
|
||||
"title": "favorites",
|
||||
"translations": {
|
||||
|
||||
@@ -33,9 +33,9 @@ describe('dashboard', async function () {
|
||||
describe('schedule section', function () {
|
||||
it('should lead to the week overview', function () {
|
||||
cy.get('.schedule')
|
||||
.contains('a', /Wochen.*ansicht/)
|
||||
.contains('a', /Wochen.*übersicht/)
|
||||
.click();
|
||||
cy.url().should('include', '/schedule/weekly-view');
|
||||
cy.url().should('include', '/schedule/week-overview');
|
||||
});
|
||||
|
||||
it('should lead to the calendar', function () {
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('schedule', function () {
|
||||
cy.get('ion-searchbar').click().type('a');
|
||||
cy.wait('@search');
|
||||
cy.wait('@chips');
|
||||
cy.wait(1000);
|
||||
cy.wait(200);
|
||||
cy.contains('ion-item', 'UNIcert (Test)')
|
||||
.contains('stapps-add-event-action-chip', 'Termine Auswählen')
|
||||
.click();
|
||||
|
||||
@@ -20,7 +20,7 @@ const config = {
|
||||
htmlGlob: 'src/**/*.html',
|
||||
scriptGlob: 'src/**/*.ts',
|
||||
additionalIcons: {
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet', 'expand_more', 'expand_all'],
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet'],
|
||||
navigation: [
|
||||
'home',
|
||||
'newspaper',
|
||||
@@ -30,7 +30,7 @@ const config = {
|
||||
'local_library',
|
||||
'inventory_2',
|
||||
'map',
|
||||
'star',
|
||||
'grade',
|
||||
'account_circle',
|
||||
'settings',
|
||||
'info',
|
||||
|
||||
@@ -19,7 +19,7 @@ def capacitor_pods
|
||||
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/device'
|
||||
pod 'CapacitorDialog', :path => '../../../../node_modules/.pnpm/@capacitor+dialog@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/dialog'
|
||||
pod 'CapacitorFilesystem', :path => '../../../../node_modules/.pnpm/@capacitor+filesystem@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/filesystem'
|
||||
pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.5_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation'
|
||||
pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation'
|
||||
pod 'CapacitorHaptics', :path => '../../../../node_modules/.pnpm/@capacitor+haptics@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/haptics'
|
||||
pod 'CapacitorKeyboard', :path => '../../../../node_modules/.pnpm/@capacitor+keyboard@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/keyboard'
|
||||
pod 'CapacitorLocalNotifications', :path => '../../../../node_modules/.pnpm/@capacitor+local-notifications@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/local-notifications'
|
||||
|
||||
@@ -19,9 +19,9 @@ PODS:
|
||||
- CapacitorFilesystem (7.1.4):
|
||||
- Capacitor
|
||||
- IONFilesystemLib (~> 1.0.1)
|
||||
- CapacitorGeolocation (7.1.5):
|
||||
- CapacitorGeolocation (7.1.4):
|
||||
- Capacitor
|
||||
- IONGeolocationLib (= 1.0.1)
|
||||
- IONGeolocationLib (~> 1.0)
|
||||
- CapacitorHaptics (7.0.2):
|
||||
- Capacitor
|
||||
- CapacitorKeyboard (7.0.2):
|
||||
@@ -44,7 +44,7 @@ PODS:
|
||||
- CordovaPlugins (7.4.2):
|
||||
- CapacitorCordova
|
||||
- IONFilesystemLib (1.0.1)
|
||||
- IONGeolocationLib (1.0.1)
|
||||
- IONGeolocationLib (1.0.0)
|
||||
- SwiftKeychainWrapper (4.0.1)
|
||||
- TransistorsoftCapacitorBackgroundFetch (7.1.0):
|
||||
- Capacitor
|
||||
@@ -60,7 +60,7 @@ DEPENDENCIES:
|
||||
- "CapacitorDevice (from `../../../../node_modules/.pnpm/@capacitor+device@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/device`)"
|
||||
- "CapacitorDialog (from `../../../../node_modules/.pnpm/@capacitor+dialog@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/dialog`)"
|
||||
- "CapacitorFilesystem (from `../../../../node_modules/.pnpm/@capacitor+filesystem@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/filesystem`)"
|
||||
- "CapacitorGeolocation (from `../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.5_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation`)"
|
||||
- "CapacitorGeolocation (from `../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation`)"
|
||||
- "CapacitorHaptics (from `../../../../node_modules/.pnpm/@capacitor+haptics@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/haptics`)"
|
||||
- "CapacitorKeyboard (from `../../../../node_modules/.pnpm/@capacitor+keyboard@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/keyboard`)"
|
||||
- "CapacitorLocalNotifications (from `../../../../node_modules/.pnpm/@capacitor+local-notifications@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/local-notifications`)"
|
||||
@@ -101,7 +101,7 @@ EXTERNAL SOURCES:
|
||||
CapacitorFilesystem:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+filesystem@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/filesystem"
|
||||
CapacitorGeolocation:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.5_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation"
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+geolocation@7.1.4_@capacitor+core@7.4.2/node_modules/@capacitor/geolocation"
|
||||
CapacitorHaptics:
|
||||
:path: "../../../../node_modules/.pnpm/@capacitor+haptics@7.0.2_@capacitor+core@7.4.2/node_modules/@capacitor/haptics"
|
||||
CapacitorKeyboard:
|
||||
@@ -136,7 +136,7 @@ SPEC CHECKSUMS:
|
||||
CapacitorDevice: 81ae78d5d1942707caad79276badd458bf6ec603
|
||||
CapacitorDialog: 5bf72a94b747fb339df6f64ef60812e5e4630ad2
|
||||
CapacitorFilesystem: f9bd850c41e048180e5dc0cbb90f2033ede9d2cc
|
||||
CapacitorGeolocation: 84f868bea4c2499aebc3bb3a88fd0a508f87ab87
|
||||
CapacitorGeolocation: 32a1f849c38c72b5071de36a28ebc548ef3bb611
|
||||
CapacitorHaptics: b3fb2869e72c4466e18ce9ccbeb60a3d8723b3d4
|
||||
CapacitorKeyboard: a86aa9e4741b6444a802df26440a92ae041b34a6
|
||||
CapacitorLocalNotifications: 665188ae8accd40806129073896fb2b39322d858
|
||||
@@ -148,10 +148,10 @@ SPEC CHECKSUMS:
|
||||
CapacitorSplashScreen: 157947576b59d913792063a8d442a79e6d283ee5
|
||||
CordovaPlugins: 7b9a4f380c92ca7f28630723befaca556461f4c3
|
||||
IONFilesystemLib: 89258b8e3e85465da93127d25d7ce37f977e8a6f
|
||||
IONGeolocationLib: 20f9d0248a0b5264511fb57a37e25dd2badf797a
|
||||
IONGeolocationLib: 81f33f88d025846946de2cf63b0c7628e7c6bc9d
|
||||
SwiftKeychainWrapper: 807ba1d63c33a7d0613288512399cd1eda1e470c
|
||||
TransistorsoftCapacitorBackgroundFetch: 28e561636145a899f05025d31f627019c16791f5
|
||||
|
||||
PODFILE CHECKSUM: 90bc09990a659848ea76c94331d39bad0b28024d
|
||||
PODFILE CHECKSUM: e0631161818ed4ac500327f0ee228d71857c0878
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/app",
|
||||
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
|
||||
@@ -48,13 +48,13 @@
|
||||
"test:integration": "sh integration-test.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "18.2.13",
|
||||
"@angular/cdk": "18.2.13",
|
||||
"@angular/common": "18.2.13",
|
||||
"@angular/core": "18.2.13",
|
||||
"@angular/forms": "18.2.13",
|
||||
"@angular/platform-browser": "18.2.13",
|
||||
"@angular/router": "18.2.13",
|
||||
"@angular/animations": "17.3.12",
|
||||
"@angular/cdk": "17.3.10",
|
||||
"@angular/common": "17.3.12",
|
||||
"@angular/core": "17.3.12",
|
||||
"@angular/forms": "17.3.12",
|
||||
"@angular/platform-browser": "17.3.12",
|
||||
"@angular/router": "17.3.12",
|
||||
"@awesome-cordova-plugins/calendar": "6.6.0",
|
||||
"@awesome-cordova-plugins/core": "6.6.0",
|
||||
"@capacitor-community/in-app-review": "7.0.1",
|
||||
@@ -66,7 +66,7 @@
|
||||
"@capacitor/device": "7.0.2",
|
||||
"@capacitor/dialog": "7.0.2",
|
||||
"@capacitor/filesystem": "7.1.4",
|
||||
"@capacitor/geolocation": "7.1.5",
|
||||
"@capacitor/geolocation": "7.1.4",
|
||||
"@capacitor/haptics": "7.0.2",
|
||||
"@capacitor/keyboard": "7.0.2",
|
||||
"@capacitor/local-notifications": "7.0.2",
|
||||
@@ -75,8 +75,9 @@
|
||||
"@capacitor/screen-orientation": "7.0.2",
|
||||
"@capacitor/share": "7.0.2",
|
||||
"@capacitor/splash-screen": "7.0.2",
|
||||
"@ionic/angular": "8.7.3",
|
||||
"@ionic/angular-server": "8.7.3",
|
||||
"@ionic-native/core": "5.36.0",
|
||||
"@ionic/angular": "8.6.1",
|
||||
"@ionic/angular-server": "8.6.1",
|
||||
"@ionic/storage-angular": "4.0.0",
|
||||
"@maplibre/ngx-maplibre-gl": "17.4.1",
|
||||
"@ngx-translate/core": "15.0.0",
|
||||
@@ -93,8 +94,8 @@
|
||||
"deepmerge": "4.3.1",
|
||||
"form-data": "4.0.4",
|
||||
"geojson": "0.5.0",
|
||||
"ionic-appauth": "2.1.0",
|
||||
"ionicons": "8.0.13",
|
||||
"ionic-appauth": "0.9.0",
|
||||
"ionicons": "7.4.0",
|
||||
"jsonpath-plus": "10.3.0",
|
||||
"maplibre-gl": "4.0.2",
|
||||
"material-symbols": "0.17.1",
|
||||
@@ -110,31 +111,31 @@
|
||||
"semver": "7.6.0",
|
||||
"swiper": "8.4.5",
|
||||
"tslib": "2.6.2",
|
||||
"zone.js": "0.14.10"
|
||||
"zone.js": "0.14.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/architect": "0.1802.20",
|
||||
"@angular-devkit/build-angular": "18.2.20",
|
||||
"@angular-devkit/core": "18.2.20",
|
||||
"@angular-devkit/schematics": "18.2.20",
|
||||
"@angular-eslint/builder": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin-template": "18.4.3",
|
||||
"@angular-eslint/schematics": "18.4.1",
|
||||
"@angular-eslint/template-parser": "18.4.3",
|
||||
"@angular/cli": "18.2.20",
|
||||
"@angular/compiler": "18.2.13",
|
||||
"@angular/compiler-cli": "18.2.13",
|
||||
"@angular/language-server": "18.2.0",
|
||||
"@angular/language-service": "18.2.13",
|
||||
"@angular/platform-browser-dynamic": "18.2.13",
|
||||
"@angular-devkit/architect": "0.1703.17",
|
||||
"@angular-devkit/build-angular": "17.3.17",
|
||||
"@angular-devkit/core": "17.3.17",
|
||||
"@angular-devkit/schematics": "17.3.17",
|
||||
"@angular-eslint/builder": "17.5.3",
|
||||
"@angular-eslint/eslint-plugin": "17.5.3",
|
||||
"@angular-eslint/eslint-plugin-template": "17.5.3",
|
||||
"@angular-eslint/schematics": "17.5.3",
|
||||
"@angular-eslint/template-parser": "17.5.3",
|
||||
"@angular/cli": "17.3.17",
|
||||
"@angular/compiler": "17.3.12",
|
||||
"@angular/compiler-cli": "17.3.12",
|
||||
"@angular/language-server": "17.3.2",
|
||||
"@angular/language-service": "17.3.12",
|
||||
"@angular/platform-browser-dynamic": "17.3.12",
|
||||
"@capacitor/android": "7.4.2",
|
||||
"@capacitor/assets": "3.0.5",
|
||||
"@capacitor/cli": "7.4.2",
|
||||
"@capacitor/ios": "7.4.2",
|
||||
"@compodoc/compodoc": "1.1.23",
|
||||
"@cypress/schematic": "4.1.1",
|
||||
"@ionic/angular-toolkit": "12.3.0",
|
||||
"@cypress/schematic": "3.0.0",
|
||||
"@ionic/angular-toolkit": "11.0.1",
|
||||
"@ionic/cli": "7.2.0",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
@@ -149,10 +150,10 @@
|
||||
"@types/karma-jasmine": "4.0.5",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/semver": "7.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.11.0",
|
||||
"@typescript-eslint/parser": "7.11.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"cordova-res": "0.15.4",
|
||||
"cypress": "15.0.0",
|
||||
"cypress": "14.5.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
"eslint-plugin-prettier": "5.1.3",
|
||||
|
||||
@@ -33,7 +33,7 @@ import {sampleAuthConfiguration} from './_helpers/data/sample-configuration';
|
||||
import {StorageProvider} from './modules/storage/storage.provider';
|
||||
import {SimpleBrowser} from './util/browser.factory';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {InAppReviewProvider} from './modules/settings/in-app-review/in-app-review.provider';
|
||||
import {InappRatingProvider} from './modules/settings/inapp-rating/inapp-rating.provider';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
let platformReadySpy: any;
|
||||
@@ -41,7 +41,7 @@ describe('AppComponent', () => {
|
||||
let translateServiceSpy: jasmine.SpyObj<TranslateService>;
|
||||
let thingTranslateServiceSpy: jasmine.SpyObj<ThingTranslateService>;
|
||||
let settingsProvider: jasmine.SpyObj<SettingsProvider>;
|
||||
let inAppReviewProvider: jasmine.SpyObj<InAppReviewProvider>;
|
||||
let inappRatingsProvider: jasmine.SpyObj<InappRatingProvider>;
|
||||
let configProvider: jasmine.SpyObj<ConfigProvider>;
|
||||
let ngxLogger: jasmine.SpyObj<NGXLogger>;
|
||||
let scheduleSyncServiceSpy: jasmine.SpyObj<ScheduleSyncService>;
|
||||
@@ -87,7 +87,7 @@ describe('AppComponent', () => {
|
||||
{provide: ThingTranslateService, useValue: thingTranslateServiceSpy},
|
||||
{provide: ScheduleSyncService, useValue: scheduleSyncServiceSpy},
|
||||
{provide: SettingsProvider, useValue: settingsProvider},
|
||||
{provide: InAppReviewProvider, useValue: inAppReviewProvider},
|
||||
{provide: InappRatingProvider, useValue: inappRatingsProvider},
|
||||
{provide: ConfigProvider, useValue: configProvider},
|
||||
{provide: NGXLogger, useValue: ngxLogger},
|
||||
{provide: StorageProvider, useValue: storageProvider},
|
||||
|
||||
@@ -17,7 +17,7 @@ import {Router} from '@angular/router';
|
||||
import {App, URLOpenListenerEvent} from '@capacitor/app';
|
||||
import {Platform, ToastController} from '@ionic/angular/standalone';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
import {InAppReviewProvider} from './modules/settings/in-app-review/in-app-review.provider';
|
||||
import {InappRatingProvider} from './modules/settings/inapp-rating/inapp-rating.provider';
|
||||
import {AuthHelperService} from './modules/auth/auth-helper.service';
|
||||
import {environment} from '../environments/environment';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
@@ -56,7 +56,7 @@ export class AppComponent implements AfterContentInit {
|
||||
constructor(
|
||||
private readonly platform: Platform,
|
||||
private readonly settingsProvider: SettingsProvider,
|
||||
private readonly inAppReviewProvider: InAppReviewProvider,
|
||||
private readonly inappRatingProvider: InappRatingProvider,
|
||||
private readonly router: Router,
|
||||
private readonly zone: NgZone,
|
||||
private readonly authHelper: AuthHelperService,
|
||||
@@ -88,8 +88,8 @@ export class AppComponent implements AfterContentInit {
|
||||
async hideSplash() {
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
void SplashScreen.hide();
|
||||
await this.inAppReviewProvider.increaseSessionCount();
|
||||
void this.inAppReviewProvider.startInAppReviewIfFeasible();
|
||||
void this.inappRatingProvider.increaseSessionCount();
|
||||
void this.inappRatingProvider.startInappRatingIfFeasible();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<div #schedule class="schedule">
|
||||
<a [routerLink]="['/schedule/weekly-view']">
|
||||
<a [routerLink]="['/schedule/week-overview']">
|
||||
<ion-icon [size]="36" [weight]="300" name="calendar_month"></ion-icon>
|
||||
<ion-label [innerHTML]="'schedule.recurring' | translate"></ion-label>
|
||||
</a>
|
||||
|
||||
@@ -127,7 +127,6 @@ export class AddEventActionChipComponent {
|
||||
.filter(it => it.selected)
|
||||
.map(it => it.item),
|
||||
},
|
||||
mode: 'md', // TODO Remove if Issue 239 is solved.
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ChipFilterComponent {
|
||||
/**
|
||||
* Emits when the chip has been activated/deactivated
|
||||
*/
|
||||
@Output() toggled = new EventEmitter<unknown>();
|
||||
@Output() toggle = new EventEmitter<unknown>();
|
||||
|
||||
/**
|
||||
* Value to emit when chip has been activated/deactivated
|
||||
@@ -47,6 +47,6 @@ export class ChipFilterComponent {
|
||||
* Signalize that the chip filter has been activated/deactivated
|
||||
*/
|
||||
emitToggle(value: unknown) {
|
||||
this.toggled.emit(value);
|
||||
this.toggle.emit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
[size]="24"
|
||||
[fill]="(isFavorite$ | async) || false"
|
||||
[class.selected]="isFavorite$ | async"
|
||||
name="star"
|
||||
name="grade"
|
||||
></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
slot="icon-only"
|
||||
[size]="32"
|
||||
color="medium"
|
||||
name="star"
|
||||
name="grade"
|
||||
></ion-icon>
|
||||
}
|
||||
<label class="thank-you">{{ 'ratings.thank_you' | translate }}</label>
|
||||
|
||||
@@ -383,7 +383,6 @@ export class SearchPageComponent implements OnInit {
|
||||
cssClass: 'context-menu-modal',
|
||||
showBackdrop: true,
|
||||
backdropDismiss: true,
|
||||
mode: 'md', // TODO has to be fixed to md for now. ios mode is unresponsive. Remove if Issue 239 is solved
|
||||
enterAnimation: (baseElement: HTMLElement) => enterAnimation(baseElement, this.animationController),
|
||||
leaveAnimation: (baseElement: HTMLElement) => leaveAnimation(baseElement, this.animationController),
|
||||
componentProps: {
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
>
|
||||
</ion-searchbar>
|
||||
@if (showContextMenu) {
|
||||
<!-- TODO has to be fixed to md for now. ios mode displays broken/missing icon -->
|
||||
<ion-menu-button mode="md" menu="context" auto-hide="false" slot="end" (click)="openContextMenu()">
|
||||
<ion-menu-button menu="context" auto-hide="false" slot="end" (click)="openContextMenu()">
|
||||
<ion-icon name="tune"></ion-icon>
|
||||
</ion-menu-button>
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import {FilterContext, SortContext} from './context-type';
|
||||
import {provideIonicAngular, ModalController} from '@ionic/angular/standalone';
|
||||
import {BehaviorSubject, of} from 'rxjs';
|
||||
import {addIcons} from 'ionicons';
|
||||
import {swapVertical, trash, menu} from 'ionicons/icons';
|
||||
import {swapVertical, trash} from 'ionicons/icons';
|
||||
|
||||
describe('ContextMenuModalComponent', () => {
|
||||
let fixture: ComponentFixture<ContextMenuModalComponent>;
|
||||
@@ -37,7 +37,6 @@ describe('ContextMenuModalComponent', () => {
|
||||
addIcons({
|
||||
delete: trash,
|
||||
sort: swapVertical,
|
||||
menu: menu,
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
||||
@@ -62,9 +62,7 @@ export class TabsComponent {
|
||||
void this.loadMenuEntries();
|
||||
this.router.events.subscribe((event: unknown) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
setTimeout(() => {
|
||||
this.selectTab(event.url);
|
||||
}, 300);
|
||||
this.selectTab(event.url);
|
||||
}
|
||||
});
|
||||
this.selectTab(router.url);
|
||||
|
||||
@@ -136,7 +136,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
onInit() {
|
||||
this.tabChoreographer = new SharedAxisChoreographer(this.activatedRoute.snapshot.paramMap.get('mode'), [
|
||||
'calendar',
|
||||
'weekly-view',
|
||||
'week-overview',
|
||||
'single',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@if (tabChoreographer.currentValue === 'calendar') {
|
||||
<ion-title [innerHTML]="'schedule.calendar' | translate | titlecase"></ion-title>
|
||||
}
|
||||
@if (tabChoreographer.currentValue === 'weekly-view') {
|
||||
@if (tabChoreographer.currentValue === 'week-overview') {
|
||||
<ion-title [innerHTML]="'schedule.recurring' | translate | titlecase"></ion-title>
|
||||
}
|
||||
@if (tabChoreographer.currentValue === 'single') {
|
||||
@@ -39,7 +39,7 @@
|
||||
<ion-label class="ion-text-wrap" [innerHTML]="'schedule.calendar' | translate"></ion-label>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="weekly-view" layout="icon-start">
|
||||
<ion-segment-button value="week-overview" layout="icon-start">
|
||||
<ion-label class="ion-text-wrap" [innerHTML]="'schedule.recurring' | translate"></ion-label>
|
||||
<ion-icon name="event_repeat"></ion-icon>
|
||||
</ion-segment-button>
|
||||
@@ -61,7 +61,7 @@
|
||||
<stapps-calendar-view [layout]="layout"></stapps-calendar-view>
|
||||
}
|
||||
<!-- Schedule view needs full week -->
|
||||
@case ('weekly-view') {
|
||||
@case ('week-overview') {
|
||||
<stapps-schedule-view [layout]="layout"></stapps-schedule-view>
|
||||
}
|
||||
@case ('single') {
|
||||
|
||||
@@ -66,7 +66,7 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
const settingsRoutes: Routes = [
|
||||
{path: 'schedule', redirectTo: 'schedule/calendar/now'},
|
||||
{path: 'schedule/calendar', redirectTo: 'schedule/calendar/now'},
|
||||
{path: 'schedule/weekly-view', redirectTo: 'schedule/weekly-view/now'},
|
||||
{path: 'schedule/week-overview', redirectTo: 'schedule/week-overview/now'},
|
||||
{path: 'schedule/single', redirectTo: 'schedule/single/now'},
|
||||
// calendar | recurring | single
|
||||
{path: 'schedule/:mode/:date', component: SchedulePageComponent},
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
/* eslint-disable unicorn/no-useless-undefined, @typescript-eslint/no-non-null-assertion */
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {StorageProvider} from '../../storage/storage.provider';
|
||||
import {
|
||||
InAppReviewProvider,
|
||||
IN_APP_REVIEW_COOLDOWN_DAYS,
|
||||
IN_APP_REVIEW_NECESSARY_SESSIONS,
|
||||
IN_APP_REVIEW_SETTINGS_KEY,
|
||||
IN_APP_REVIEW_SESSIONS_KEY,
|
||||
IN_APP_REVIEW_LAST_RATING_KEY,
|
||||
} from './in-app-review.provider';
|
||||
|
||||
describe('InappRatingProvider', () => {
|
||||
let storageProviderSpy: jasmine.SpyObj<StorageProvider>;
|
||||
let inappRatingProvider: InAppReviewProvider;
|
||||
const ONE_DAY_IN_MILLIS = 1000 * 3600 * 24;
|
||||
|
||||
beforeEach(async () => {
|
||||
storageProviderSpy = jasmine.createSpyObj('StorageProvider', ['init', 'get', 'has', 'put']);
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [],
|
||||
providers: [
|
||||
InAppReviewProvider,
|
||||
{
|
||||
provide: StorageProvider,
|
||||
useValue: storageProviderSpy,
|
||||
},
|
||||
],
|
||||
});
|
||||
// set settings returned from config
|
||||
inappRatingProvider = TestBed.inject(InAppReviewProvider);
|
||||
storageProviderSpy.has.and.returnValue(Promise.resolve(false));
|
||||
});
|
||||
|
||||
it('should set user sessions count starting with one', async () => {
|
||||
storageProviderSpy.get.and.returnValue(Promise.resolve(0));
|
||||
const sessionCount = await inappRatingProvider.increaseSessionCount();
|
||||
expect(sessionCount).toEqual(1);
|
||||
});
|
||||
|
||||
it('should start in app rating/review flow if contitions are met', async () => {
|
||||
const nowMinusCooldownDays = Date.now() - (IN_APP_REVIEW_COOLDOWN_DAYS + 1) * ONE_DAY_IN_MILLIS;
|
||||
spyOn(inappRatingProvider, 'requestReview').and.returnValue(Promise.resolve());
|
||||
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_SESSIONS_KEY}`)
|
||||
.and.returnValue(Promise.resolve(IN_APP_REVIEW_NECESSARY_SESSIONS));
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_LAST_RATING_KEY}`)
|
||||
.and.returnValue(Promise.resolve(nowMinusCooldownDays));
|
||||
await inappRatingProvider.startInAppReviewIfFeasible();
|
||||
expect(inappRatingProvider.requestReview).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('should not start in app rating/review flow if contitions are not met', async () => {
|
||||
const nowMinusCooldownDays = Date.now() - IN_APP_REVIEW_COOLDOWN_DAYS * ONE_DAY_IN_MILLIS;
|
||||
spyOn(inappRatingProvider, 'requestReview').and.returnValue(Promise.resolve());
|
||||
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_SESSIONS_KEY}`)
|
||||
.and.returnValue(Promise.resolve(IN_APP_REVIEW_NECESSARY_SESSIONS - 1));
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_LAST_RATING_KEY}`)
|
||||
.and.returnValue(Promise.resolve(nowMinusCooldownDays));
|
||||
|
||||
await inappRatingProvider.startInAppReviewIfFeasible();
|
||||
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_SESSIONS_KEY}`)
|
||||
.and.returnValue(Promise.resolve(IN_APP_REVIEW_NECESSARY_SESSIONS));
|
||||
storageProviderSpy.get
|
||||
.withArgs(`${IN_APP_REVIEW_SETTINGS_KEY}.${IN_APP_REVIEW_LAST_RATING_KEY}`)
|
||||
.and.returnValue(Promise.resolve(nowMinusCooldownDays + ONE_DAY_IN_MILLIS));
|
||||
|
||||
await inappRatingProvider.startInAppReviewIfFeasible();
|
||||
|
||||
expect(inappRatingProvider.requestReview).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
});
|
||||
@@ -1,120 +0,0 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {InAppReview} from '@capacitor-community/in-app-review';
|
||||
import {StorageProvider} from '../../storage/storage.provider';
|
||||
|
||||
export const IN_APP_REVIEW_COOLDOWN_DAYS = 365;
|
||||
export const IN_APP_REVIEW_NECESSARY_SESSIONS = 3;
|
||||
|
||||
export const IN_APP_REVIEW_SETTINGS_KEY = 'inapp-rating';
|
||||
export const IN_APP_REVIEW_SESSIONS_KEY = 'sessions';
|
||||
export const IN_APP_REVIEW_LAST_RATING_KEY = 'last-rating';
|
||||
export type IN_APP_REVIEW_KEYS = typeof IN_APP_REVIEW_SESSIONS_KEY | typeof IN_APP_REVIEW_LAST_RATING_KEY;
|
||||
|
||||
/**
|
||||
* Provider for In-App Review
|
||||
*/
|
||||
@Injectable()
|
||||
export class InAppReviewProvider {
|
||||
requestReview: () => Promise<void>;
|
||||
|
||||
/**
|
||||
* @param storageProvider TODO
|
||||
*/
|
||||
constructor(private readonly storageProvider: StorageProvider) {
|
||||
this.requestReview = InAppReview.requestReview;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private inappRatingSettingStorageKey(key: string): string {
|
||||
return `${IN_APP_REVIEW_SETTINGS_KEY}.${key}`;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInAppReviewSetting<T>(
|
||||
key: IN_APP_REVIEW_KEYS,
|
||||
defaultValue: T,
|
||||
): Promise<typeof defaultValue> {
|
||||
try {
|
||||
return await this.storageProvider.get<typeof defaultValue>(this.inappRatingSettingStorageKey(key));
|
||||
} catch {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInAppReviewSetting<T>(key: IN_APP_REVIEW_KEYS, value: T) {
|
||||
return this.storageProvider.put<typeof value>(this.inappRatingSettingStorageKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInAppReviewSessions(value: number) {
|
||||
return this.setInAppReviewSetting(IN_APP_REVIEW_SESSIONS_KEY, value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInAppReviewSessions(): Promise<number> {
|
||||
return this.getInAppReviewSetting(IN_APP_REVIEW_SESSIONS_KEY, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInAppReviewLastRating(value: Date) {
|
||||
return this.setInAppReviewSetting(IN_APP_REVIEW_LAST_RATING_KEY, value.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInAppReviewLastRating(): Promise<Date> {
|
||||
return this.getInAppReviewSetting(IN_APP_REVIEW_LAST_RATING_KEY, 0).then(timestamp => {
|
||||
return new Date(timestamp);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Increases session count to keep local info how often the app was used.
|
||||
*/
|
||||
public async increaseSessionCount(increment = 1): Promise<number> {
|
||||
try {
|
||||
const currentSessions = await this.getInAppReviewSessions();
|
||||
await this.setInAppReviewSessions(currentSessions + increment);
|
||||
return currentSessions + increment;
|
||||
} catch {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes In App Review Flow/Views depending on the OS iff conditions are met.
|
||||
*/
|
||||
public async startInAppReviewIfFeasible(): Promise<boolean> {
|
||||
try {
|
||||
const currentSessions = await this.getInAppReviewSessions();
|
||||
const lastRating = await this.getInAppReviewLastRating();
|
||||
const dateDiffMillis = Math.abs(lastRating.getTime() - Date.now());
|
||||
const dateDiffDays = Math.floor(dateDiffMillis / (1000 * 3600 * 24));
|
||||
|
||||
if (currentSessions < IN_APP_REVIEW_NECESSARY_SESSIONS || dateDiffDays < IN_APP_REVIEW_COOLDOWN_DAYS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this.requestReview();
|
||||
await this.setInAppReviewLastRating(new Date());
|
||||
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {InAppReview} from '@capacitor-community/in-app-review';
|
||||
import {StorageProvider} from '../../storage/storage.provider';
|
||||
|
||||
export const INAPP_RATING_COOLDOWN_DAYS = 365;
|
||||
export const INAPP_RATING_NECESSARY_SESSIONS = 2;
|
||||
|
||||
export const INAPP_RATING_SETTINGS_KEY = 'inapp-rating';
|
||||
export const INAPP_RATING_SESSIONS_KEY = 'sessions';
|
||||
export const INAPP_RATING_LAST_RATING_KEY = 'last-rating';
|
||||
export type INAPP_RATING_KEYS = typeof INAPP_RATING_SESSIONS_KEY | typeof INAPP_RATING_LAST_RATING_KEY;
|
||||
|
||||
/**
|
||||
* Provider for app settings
|
||||
*/
|
||||
@Injectable()
|
||||
export class InappRatingProvider {
|
||||
/**
|
||||
* @param storageProvider TODO
|
||||
*/
|
||||
constructor(private readonly storageProvider: StorageProvider) {}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private inappRatingSettingStorageKey(key: string): string {
|
||||
return `${INAPP_RATING_SETTINGS_KEY}.${key}`;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInappRatingSetting<T>(
|
||||
key: INAPP_RATING_KEYS,
|
||||
defaultValue: T,
|
||||
): Promise<typeof defaultValue> {
|
||||
try {
|
||||
return await this.storageProvider.get<typeof defaultValue>(this.inappRatingSettingStorageKey(key));
|
||||
} catch {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInappRatingSetting<T>(key: INAPP_RATING_KEYS, value: T) {
|
||||
return this.storageProvider.put<typeof value>(this.inappRatingSettingStorageKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInappRatingSessions(value: number) {
|
||||
return this.setInappRatingSetting(INAPP_RATING_SESSIONS_KEY, value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInappRatingSessions(): Promise<number> {
|
||||
return this.getInappRatingSetting(INAPP_RATING_SESSIONS_KEY, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async setInappRatingLastRating(value: Date) {
|
||||
return this.setInappRatingSetting(INAPP_RATING_SESSIONS_KEY, value.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private async getInappRatingLastRating(): Promise<Date> {
|
||||
return this.getInappRatingSetting(INAPP_RATING_SESSIONS_KEY, 0).then(timestamp => {
|
||||
return new Date(timestamp);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public async increaseSessionCount(increment = 1): Promise<number> {
|
||||
try {
|
||||
const currentSessions = await this.getInappRatingSessions();
|
||||
await this.setInappRatingSessions(currentSessions + increment);
|
||||
return currentSessions + increment;
|
||||
} catch {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public async startInappRatingIfFeasible(): Promise<boolean> {
|
||||
try {
|
||||
const currentSessions = await this.getInappRatingSessions();
|
||||
const lastRating = await this.getInappRatingLastRating();
|
||||
const dateDiffMillis = Math.abs(lastRating.getTime() - Date.now());
|
||||
const diffDays = Math.ceil(dateDiffMillis / (1000 * 3600 * 24));
|
||||
|
||||
if (currentSessions < INAPP_RATING_NECESSARY_SESSIONS || diffDays < INAPP_RATING_COOLDOWN_DAYS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
await InAppReview.requestReview();
|
||||
|
||||
await this.setInappRatingLastRating(new Date());
|
||||
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
<ion-card-content>
|
||||
@if (!compactView) {
|
||||
<ion-note>{{ 'description' | thingTranslate: setting }}</ion-note>
|
||||
<ion-note>{{ 'description' | thingTranslate: setting | titlecase }}</ion-note>
|
||||
}
|
||||
@if (isVisible) {
|
||||
<div>
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
IonToolbar,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
import {InAppReviewProvider} from './in-app-review/in-app-review.provider';
|
||||
import {InappRatingProvider} from './inapp-rating/inapp-rating.provider';
|
||||
|
||||
const settingsRoutes: Routes = [{path: 'settings', component: SettingsPageComponent}];
|
||||
|
||||
@@ -105,7 +105,7 @@ const settingsRoutes: Routes = [{path: 'settings', component: SettingsPageCompon
|
||||
providers: [
|
||||
ScheduleSyncService,
|
||||
SettingsProvider,
|
||||
InAppReviewProvider,
|
||||
InappRatingProvider,
|
||||
CalendarService,
|
||||
ScheduleProvider,
|
||||
ThingTranslatePipe,
|
||||
|
||||
@@ -304,8 +304,8 @@ describe('SettingsProvider', () => {
|
||||
},
|
||||
en: {
|
||||
description:
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
'The user group the app is going to be used.' +
|
||||
'This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
name: 'Group',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -150,7 +150,7 @@ const iconMap = new Map<string, MaterialSymbol>([
|
||||
[menuSharp, SCIcon.menu],
|
||||
[searchOutline, SCIcon.search],
|
||||
[searchSharp, SCIcon.search],
|
||||
[chevronExpand, SCIcon.expand_all],
|
||||
[chevronExpand, SCIcon.expand_more],
|
||||
[caretDownSharp, SCIcon.expand_more],
|
||||
[close, SCIcon.close],
|
||||
[closeSharp, SCIcon.close],
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -500,7 +500,7 @@
|
||||
"view": {
|
||||
"today": "Heute"
|
||||
},
|
||||
"recurring": "Wochen­ansicht",
|
||||
"recurring": "Wochen­übersicht",
|
||||
"calendar": "Kalender",
|
||||
"single": "Einzel­termine",
|
||||
"addEventPage": {
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
"view": {
|
||||
"today": "Today"
|
||||
},
|
||||
"recurring": "Weekly View",
|
||||
"recurring": "Week Overview",
|
||||
"calendar": "Calendar",
|
||||
"single": "Single Events",
|
||||
"addEventPage": {
|
||||
|
||||
Binary file not shown.
@@ -62,7 +62,7 @@ export const profilePageSections: SCSection[] = [
|
||||
links: [
|
||||
{
|
||||
name: 'Favorites',
|
||||
icon: SCIcon.star,
|
||||
icon: SCIcon.grade,
|
||||
link: ['/favorites'],
|
||||
translations: {
|
||||
de: {
|
||||
|
||||
@@ -17,13 +17,14 @@ $icon-size: 22px;
|
||||
app-root ion-searchbar[class*='sc-ion-searchbar-'] {
|
||||
--border-radius: var(--border-radius-default);
|
||||
--background: var(--ion-item-background) !important;
|
||||
--box-shadow: none;
|
||||
|
||||
height: 38px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
|
||||
&.filterable {
|
||||
--box-shadow: none;
|
||||
|
||||
position: relative;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/app-builder-image
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/app-builder-image",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
# @openstapps/api-cli
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api-cli",
|
||||
"description": "CLI client for @openstapps/api",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
# @openstapps/api-plugin
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api-plugin",
|
||||
"description": "Node.js library to interact with the StApps backend service",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/api
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @openstapps/core@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api",
|
||||
"description": "Node.js library to interact with the StApps backend service",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.1",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
# @openstapps/core-tools
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/easy-ast@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/core-tools",
|
||||
"description": "Tools to convert and validate StAppsCore",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core-tools.git",
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/core
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @openstapps/core-tools@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core.git",
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
# @openstapps/easy-ast
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/easy-ast",
|
||||
"description": "Tool to easily handle TypeScript AST",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core-tools.git",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"extension": ["ts"],
|
||||
"node-option": ["no-experimental-strip-types"],
|
||||
"require": "ts-node/register",
|
||||
"reporter": "mocha-junit-reporter",
|
||||
"reporter-option": ["mochaFile=coverage/report-junit.xml"],
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"noUnusedParameters": true,
|
||||
"outDir": "./lib/",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"target": "ES2020"
|
||||
},
|
||||
"exclude": ["./lib/", "./test/"]
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
# @openstapps/gitlab-api
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/gitlab-api",
|
||||
"description": "Wraps common GitLab API calls in a TypeScript class.",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/gitlab-api.git",
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# @openstapps/logger
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 6b06de40: Updated nodemailer dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/logger",
|
||||
"description": "A cli logger with colors, log-levels and the possibility to use a transport system for errors",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/logger.git",
|
||||
|
||||
3598
pnpm-lock.yaml
generated
3598
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -6,17 +6,19 @@ packages:
|
||||
- packages/*
|
||||
- images/*
|
||||
|
||||
forceLegacyDeploy: true
|
||||
|
||||
onlyBuiltDependencies:
|
||||
- '@compodoc/compodoc'
|
||||
- cpu-features
|
||||
- cypress
|
||||
- esbuild
|
||||
- lmdb
|
||||
- msgpackr-extract
|
||||
- nice-napi
|
||||
- re2
|
||||
- sharp
|
||||
- ssh2
|
||||
- swiper
|
||||
|
||||
# PNPM 8 defaults:
|
||||
forceLegacyDeploy: True
|
||||
# linkWorkspacePackages: true
|
||||
# hoistWorkspacePackages: false
|
||||
# dedupePeerDependents: false
|
||||
Reference in New Issue
Block a user