Browse Source

Merge branch 'main' into task/migrate-backend-logger-to-instance-pattern

pull/6966/head
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
b89cb294f6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      CHANGELOG.md
  2. 4
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss
  3. 12
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
  4. 20
      apps/client/src/app/components/admin-users/admin-users.component.ts
  5. 25
      apps/client/src/styles.scss
  6. 1
      libs/common/src/lib/interfaces/product.ts
  7. 382
      libs/common/src/lib/personal-finance-tools.ts

8
CHANGELOG.md

@ -7,10 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Added
- Added an automatic refresh every 30 seconds to the users table in the admin control panel
### Changed ### Changed
- Refactored the backend logging to use the instance-based `Logger` - Refactored the backend logging to use the instance-based `Logger`
### Fixed
- Fixed a layout issue in the asset profile dialog of the admin control by truncating long titles
## 3.7.0 - 2026-06-02 ## 3.7.0 - 2026-06-02
### Added ### Added

4
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss

@ -14,4 +14,8 @@
top: 0; top: 0;
} }
} }
.mat-mdc-dialog-title {
padding-right: 0.5rem !important;
}
} }

12
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

@ -1,10 +1,10 @@
<div class="d-flex flex-column h-100"> <div class="d-flex flex-column h-100">
<div class="d-flex mb-3"> <h1 class="align-items-center d-flex mb-3" mat-dialog-title>
<h1 class="flex-grow-1 m-0" mat-dialog-title> <span class="flex-grow-1 text-truncate">{{
<span>{{ assetProfile?.name ?? data.symbol }}</span> assetProfile?.name ?? data.symbol
</h1> }}</span>
<button <button
class="mx-1 no-min-width px-2" class="ml-1 no-min-width px-2"
mat-button mat-button
type="button" type="button"
[matMenuTriggerFor]="assetProfileActionsMenu" [matMenuTriggerFor]="assetProfileActionsMenu"
@ -87,7 +87,7 @@
<ng-container i18n>Delete</ng-container> <ng-container i18n>Delete</ng-container>
</button> </button>
</mat-menu> </mat-menu>
</div> </h1>
<div class="flex-grow-1" mat-dialog-content> <div class="flex-grow-1" mat-dialog-content>
<gf-line-chart <gf-line-chart

20
apps/client/src/app/components/admin-users/admin-users.component.ts

@ -59,8 +59,10 @@ import {
personOutline, personOutline,
trashOutline trashOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
import ms from 'ms';
import { DeviceDetectorService } from 'ngx-device-detector'; import { DeviceDetectorService } from 'ngx-device-detector';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { interval } from 'rxjs';
import { switchMap, tap } from 'rxjs/operators'; import { switchMap, tap } from 'rxjs/operators';
@Component({ @Component({
@ -184,6 +186,15 @@ export class GfAdminUsersComponent implements OnInit {
public ngOnInit() { public ngOnInit() {
this.fetchUsers(); this.fetchUsers();
interval(ms('30 seconds'))
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(() => {
this.fetchUsers({
pageIndex: this.paginator().pageIndex,
showLoading: false
});
});
} }
protected formatDistanceToNow(aDateString: string) { protected formatDistanceToNow(aDateString: string) {
@ -267,8 +278,13 @@ export class GfAdminUsersComponent implements OnInit {
); );
} }
private fetchUsers({ pageIndex }: { pageIndex: number } = { pageIndex: 0 }) { private fetchUsers({
pageIndex = 0,
showLoading = true
}: { pageIndex?: number; showLoading?: boolean } = {}) {
if (showLoading) {
this.isLoading = true; this.isLoading = true;
}
if (pageIndex === 0 && this.paginator()) { if (pageIndex === 0 && this.paginator()) {
this.paginator().pageIndex = 0; this.paginator().pageIndex = 0;
@ -281,7 +297,7 @@ export class GfAdminUsersComponent implements OnInit {
}) })
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(({ count, users }) => { .subscribe(({ count, users }) => {
this.dataSource = new MatTableDataSource(users); this.dataSource.data = users;
this.totalItems = count; this.totalItems = count;
this.isLoading = false; this.isLoading = false;

25
apps/client/src/styles.scss

@ -1,10 +1,11 @@
@use '@angular/material' as mat; @use '@angular/material' as mat;
@use 'sass:color';
@import './styles/bootstrap'; @use './styles/bootstrap';
@import './styles/table'; @use './styles/table' as table;
@import './styles/variables'; @use './styles/variables' as variables;
@import 'svgmap/style.min'; @use 'svgmap/style.min';
:root { :root {
--dark-background: rgb(25, 25, 25); --dark-background: rgb(25, 25, 25);
@ -12,8 +13,10 @@
--light-background: rgb(255, 255, 255); --light-background: rgb(255, 255, 255);
--dark-primary-text: --dark-primary-text:
#{red($dark-primary-text)}, #{green($dark-primary-text)}, #{color.channel(variables.$dark-primary-text, 'red')},
#{blue($dark-primary-text)}, #{alpha($dark-primary-text)}; #{color.channel(variables.$dark-primary-text, 'green')},
#{color.channel(variables.$dark-primary-text, 'blue')},
#{color.channel(variables.$dark-primary-text, 'alpha')};
--dark-secondary-text: 0, 0, 0, 0.54; --dark-secondary-text: 0, 0, 0, 0.54;
--dark-accent-text: 0, 0, 0, 0.87; --dark-accent-text: 0, 0, 0, 0.87;
--dark-warn-text: 0, 0, 0, 0.87; --dark-warn-text: 0, 0, 0, 0.87;
@ -21,8 +24,10 @@
--dark-dividers: 0, 0, 0, 0.12; --dark-dividers: 0, 0, 0, 0.12;
--dark-focused: 0, 0, 0, 0.12; --dark-focused: 0, 0, 0, 0.12;
--light-primary-text: --light-primary-text:
#{red($light-primary-text)}, #{green($light-primary-text)}, #{color.channel(variables.$light-primary-text, 'red')},
#{blue($light-primary-text)}, #{alpha($light-primary-text)}; #{color.channel(variables.$light-primary-text, 'green')},
#{color.channel(variables.$light-primary-text, 'blue')},
#{color.channel(variables.$light-primary-text, 'alpha')};
--light-secondary-text: 255, 255, 255, 0.7; --light-secondary-text: 255, 255, 255, 0.7;
--light-accent-text: 255, 255, 255, 1; --light-accent-text: 255, 255, 255, 1;
--light-warn-text: 255, 255, 255, 1; --light-warn-text: 255, 255, 255, 1;
@ -240,7 +245,7 @@ body {
} }
.gf-table { .gf-table {
@include gf-table(true); @include table.gf-table(true);
} }
.mat-mdc-dialog-container { .mat-mdc-dialog-container {
@ -353,7 +358,7 @@ ngx-skeleton-loader {
} }
.gf-table { .gf-table {
@include gf-table; @include table.gf-table;
} }
.gf-text-wrap-balance { .gf-text-wrap-balance {

1
libs/common/src/lib/interfaces/product.ts

@ -13,5 +13,6 @@ export interface Product {
pricingPerYear?: string; pricingPerYear?: string;
regions?: string[]; regions?: string[];
slogan?: string; slogan?: string;
url?: string;
useAnonymously?: boolean; useAnonymously?: boolean;
} }

382
libs/common/src/lib/personal-finance-tools.ts

File diff suppressed because it is too large
Loading…
Cancel
Save