|
@ -6,6 +6,7 @@ import { TokenStorageService } from '@ghostfolio/client/services/token-storage.s |
|
|
import { InfoItem } from '@ghostfolio/common/interfaces'; |
|
|
import { InfoItem } from '@ghostfolio/common/interfaces'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { LineChartItem } from '@ghostfolio/ui/line-chart/interfaces/line-chart.interface'; |
|
|
import { LineChartItem } from '@ghostfolio/ui/line-chart/interfaces/line-chart.interface'; |
|
|
|
|
|
import { Role } from '@prisma/client'; |
|
|
import { format } from 'date-fns'; |
|
|
import { format } from 'date-fns'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { Subject } from 'rxjs'; |
|
|
import { Subject } from 'rxjs'; |
|
@ -62,19 +63,21 @@ export class RegisterPageComponent implements OnDestroy, OnInit { |
|
|
this.dataService |
|
|
this.dataService |
|
|
.postUser() |
|
|
.postUser() |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.subscribe(({ accessToken, authToken }) => { |
|
|
.subscribe(({ accessToken, authToken, role }) => { |
|
|
this.openShowAccessTokenDialog(accessToken, authToken); |
|
|
this.openShowAccessTokenDialog(accessToken, authToken, role); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public openShowAccessTokenDialog( |
|
|
public openShowAccessTokenDialog( |
|
|
accessToken: string, |
|
|
accessToken: string, |
|
|
authToken: string |
|
|
authToken: string, |
|
|
|
|
|
role: Role |
|
|
): void { |
|
|
): void { |
|
|
const dialogRef = this.dialog.open(ShowAccessTokenDialog, { |
|
|
const dialogRef = this.dialog.open(ShowAccessTokenDialog, { |
|
|
data: { |
|
|
data: { |
|
|
accessToken, |
|
|
accessToken, |
|
|
authToken |
|
|
authToken, |
|
|
|
|
|
role |
|
|
}, |
|
|
}, |
|
|
disableClose: true, |
|
|
disableClose: true, |
|
|
width: '30rem' |
|
|
width: '30rem' |
|
|