Browse Source

Merge remote-tracking branch 'origin/main' into bug/import_activities_dialog_extends_off_page

pull/5527/head
Sven Günther 4 days ago
parent
commit
72c7898ec1
  1. 5
      CHANGELOG.md
  2. 12
      apps/client/src/app/pages/register/register-page.component.ts
  3. 34
      apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts
  4. 34
      apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.module.ts
  5. 2
      libs/common/src/lib/permissions.ts
  6. 1
      libs/ui/src/lib/activities-table/activities-table.component.html

5
CHANGELOG.md

@ -11,8 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Refactored the show access token dialog component to standalone
- Upgraded `prisma` from version `6.15.0` to `6.16.1`
### Fixed
- Removed a temporary element from the activities table component
## 2.199.0 - 2025-09-14
### Added

12
apps/client/src/app/pages/register/register-page.component.ts

@ -19,17 +19,11 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ShowAccessTokenDialogParams } from './show-access-token-dialog/interfaces/interfaces';
import { ShowAccessTokenDialog } from './show-access-token-dialog/show-access-token-dialog.component';
import { ShowAccessTokenDialogModule } from './show-access-token-dialog/show-access-token-dialog.module';
import { GfShowAccessTokenDialogComponent } from './show-access-token-dialog/show-access-token-dialog.component';
@Component({
host: { class: 'page' },
imports: [
GfLogoComponent,
MatButtonModule,
RouterModule,
ShowAccessTokenDialogModule
],
imports: [GfLogoComponent, MatButtonModule, RouterModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
selector: 'gf-register-page',
styleUrls: ['./register-page.scss'],
@ -90,7 +84,7 @@ export class GfRegisterPageComponent implements OnDestroy, OnInit {
}
public openShowAccessTokenDialog() {
const dialogRef = this.dialog.open(ShowAccessTokenDialog, {
const dialogRef = this.dialog.open(GfShowAccessTokenDialogComponent, {
data: {
deviceType: this.deviceType,
needsToAcceptTermsOfService: this.hasPermissionForSubscription

34
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts

@ -1,15 +1,26 @@
import { DataService } from '@ghostfolio/client/services/data.service';
import { publicRoutes } from '@ghostfolio/common/routes/routes';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { TextFieldModule } from '@angular/cdk/text-field';
import { CommonModule } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
CUSTOM_ELEMENTS_SCHEMA,
Inject,
ViewChild
} from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatStepper } from '@angular/material/stepper';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatStepper, MatStepperModule } from '@angular/material/stepper';
import { RouterModule } from '@angular/router';
import { IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import {
arrowForwardOutline,
@ -23,12 +34,27 @@ import { ShowAccessTokenDialogParams } from './interfaces/interfaces';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
ClipboardModule,
CommonModule,
FormsModule,
IonIcon,
MatButtonModule,
MatCheckboxModule,
MatDialogModule,
MatFormFieldModule,
MatInputModule,
MatStepperModule,
ReactiveFormsModule,
RouterModule,
TextFieldModule
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
selector: 'gf-show-access-token-dialog',
standalone: false,
styleUrls: ['./show-access-token-dialog.scss'],
templateUrl: 'show-access-token-dialog.html'
})
export class ShowAccessTokenDialog {
export class GfShowAccessTokenDialogComponent {
@ViewChild(MatStepper) stepper!: MatStepper;
public accessToken: string;

34
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.module.ts

@ -1,34 +0,0 @@
import { ClipboardModule } from '@angular/cdk/clipboard';
import { TextFieldModule } from '@angular/cdk/text-field';
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatStepperModule } from '@angular/material/stepper';
import { RouterModule } from '@angular/router';
import { ShowAccessTokenDialog } from './show-access-token-dialog.component';
@NgModule({
declarations: [ShowAccessTokenDialog],
imports: [
ClipboardModule,
CommonModule,
FormsModule,
MatButtonModule,
MatCheckboxModule,
MatDialogModule,
MatFormFieldModule,
MatInputModule,
MatStepperModule,
ReactiveFormsModule,
RouterModule,
TextFieldModule
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class ShowAccessTokenDialogModule {}

2
libs/common/src/lib/permissions.ts

@ -197,5 +197,5 @@ export function hasRole(aUser: UserWithSettings, aRole: Role) {
}
export function isRestrictedView(aUser: UserWithSettings) {
return aUser.settings.settings.isRestrictedView ?? false;
return aUser?.settings?.settings?.isRestrictedView ?? false;
}

1
libs/ui/src/lib/activities-table/activities-table.component.html

@ -129,7 +129,6 @@
[symbol]="element.SymbolProfile?.symbol"
[tooltip]="element.SymbolProfile?.name"
/>
<div>{{ element.dataSource }}</div>
</td>
</ng-container>

Loading…
Cancel
Save