From c9047e7c17b9de26162d0ac6e5514078b87f21ca Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Fri, 27 Dec 2024 10:12:45 +0100
Subject: [PATCH 1/3] Feature/add user interface for received access (#4146)
* Add user interface for received access
* Update changelog
---
CHANGELOG.md | 4 ++++
apps/api/src/app/user/user.service.ts | 4 +++-
.../user-account-access.component.ts | 15 +++++++++++++--
.../user-account-access/user-account-access.html | 10 ++++++----
libs/common/src/lib/interfaces/user.interface.ts | 7 ++-----
5 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fdc0994e5..c9cd8d29a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Added
+
+- Added the user interface for received access from others
+
### Changed
- Upgraded `husky` from version `9.1.6` to `9.1.7`
diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts
index bac6ed19b..33e9a67da 100644
--- a/apps/api/src/app/user/user.service.ts
+++ b/apps/api/src/app/user/user.service.ts
@@ -89,6 +89,7 @@ export class UserService {
}),
this.tagService.getTagsForUser(id)
]);
+
const access = userData[0];
const firstActivity = userData[1];
let tags = userData[2];
@@ -119,7 +120,8 @@ export class UserService {
access: access.map((accessItem) => {
return {
alias: accessItem.alias,
- id: accessItem.id
+ id: accessItem.id,
+ permissions: accessItem.permissions
};
}),
accounts: Account,
diff --git a/apps/client/src/app/components/user-account-access/user-account-access.component.ts b/apps/client/src/app/components/user-account-access/user-account-access.component.ts
index 16a7627c9..02f7d1b8d 100644
--- a/apps/client/src/app/components/user-account-access/user-account-access.component.ts
+++ b/apps/client/src/app/components/user-account-access/user-account-access.component.ts
@@ -27,7 +27,8 @@ import { CreateOrUpdateAccessDialog } from './create-or-update-access-dialog/cre
templateUrl: './user-account-access.html'
})
export class UserAccountAccessComponent implements OnDestroy, OnInit {
- public accesses: Access[];
+ public accessesGet: Access[];
+ public accessesGive: Access[];
public deviceType: string;
public hasPermissionToCreateAccess: boolean;
public hasPermissionToDeleteAccess: boolean;
@@ -125,11 +126,21 @@ export class UserAccountAccessComponent implements OnDestroy, OnInit {
}
private update() {
+ this.accessesGet = this.user.access.map(({ alias, id, permissions }) => {
+ return {
+ alias,
+ id,
+ permissions,
+ grantee: $localize`Me`,
+ type: 'PRIVATE'
+ };
+ });
+
this.dataService
.fetchAccesses()
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((accesses) => {
- this.accesses = accesses;
+ this.accessesGive = accesses;
this.changeDetectorRef.markForCheck();
});
diff --git a/apps/client/src/app/components/user-account-access/user-account-access.html b/apps/client/src/app/components/user-account-access/user-account-access.html
index e5d43cadc..efb918984 100644
--- a/apps/client/src/app/components/user-account-access/user-account-access.html
+++ b/apps/client/src/app/components/user-account-access/user-account-access.html
@@ -1,14 +1,16 @@
-
+ @if (accessesGet.length > 0) {
+ Received Access
+
+ }
+
Granted Access
@if (user?.subscription?.type === 'Basic') {
}
[];
accounts: Account[];
dateOfFirstActivity: Date;
id: string;
From 15639cb3d09714fb75dc73daf14d150483286af5 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 28 Dec 2024 09:54:05 +0100
Subject: [PATCH 2/3] Feature/move set Ghostfolio API key to experimental
(#4147)
* Move set Ghostfolio API key to experimental
---
.../admin-settings.component.ts | 3 ++-
.../ghostfolio-premium-api-dialog.html | 24 ++++++++++---------
.../interfaces/interfaces.ts | 3 +++
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/apps/client/src/app/components/admin-settings/admin-settings.component.ts b/apps/client/src/app/components/admin-settings/admin-settings.component.ts
index 1ff67e01a..38b47813e 100644
--- a/apps/client/src/app/components/admin-settings/admin-settings.component.ts
+++ b/apps/client/src/app/components/admin-settings/admin-settings.component.ts
@@ -100,7 +100,8 @@ export class AdminSettingsComponent implements OnDestroy, OnInit {
autoFocus: false,
data: {
deviceType: this.deviceType,
- pricingUrl: this.pricingUrl
+ pricingUrl: this.pricingUrl,
+ user: this.user
},
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
diff --git a/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html b/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html
index f2f753750..ac777ffda 100644
--- a/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html
+++ b/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html
@@ -31,17 +31,19 @@
mat-flat-button
>Notify me
-
- or
-
-
+ @if (data.user?.settings?.isExperimentalFeatures) {
+
+ or
+
+
+ }
diff --git a/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/interfaces/interfaces.ts b/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/interfaces/interfaces.ts
index 0c629599e..157a6f414 100644
--- a/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/interfaces/interfaces.ts
+++ b/apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/interfaces/interfaces.ts
@@ -1,4 +1,7 @@
+import { User } from '@ghostfolio/common/interfaces';
+
export interface GhostfolioPremiumApiDialogParams {
deviceType: string;
pricingUrl: string;
+ user: User;
}
From 81f874bbc2273d7d5543e624cfaaef6a49023ede Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 28 Dec 2024 09:54:39 +0100
Subject: [PATCH 3/3] Feature/improve language localization for de 20241227
(#4148)
* Update translations
* Update changelog
---
CHANGELOG.md | 1 +
apps/client/src/locales/messages.ca.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.de.xlf | 20 ++++++++++++++++++--
apps/client/src/locales/messages.es.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.fr.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.it.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.nl.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.pl.xlf | 20 ++++++++++++++++++--
apps/client/src/locales/messages.pt.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.tr.xlf | 18 +++++++++++++++++-
apps/client/src/locales/messages.xlf | 16 +++++++++++++++-
apps/client/src/locales/messages.zh.xlf | 18 +++++++++++++++++-
12 files changed, 188 insertions(+), 13 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9cd8d29a..2f8b661e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Improved the language localization for German (`de`)
- Upgraded `husky` from version `9.1.6` to `9.1.7`
## 2.131.0 - 2024-12-25
diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf
index 69bf055b3..357e27442 100644
--- a/apps/client/src/locales/messages.ca.xlf
+++ b/apps/client/src/locales/messages.ca.xlf
@@ -3307,7 +3307,7 @@
Granted Access
apps/client/src/app/components/user-account-access/user-account-access.html
- 5
+ 7
@@ -7616,6 +7616,22 @@
82
+
+ Me
+ Me
+
+ apps/client/src/app/components/user-account-access/user-account-access.component.ts
+ 134
+
+
+
+ Received Access
+ Received Access
+
+ apps/client/src/app/components/user-account-access/user-account-access.html
+ 3
+
+