|
@ -11,6 +11,7 @@ import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { Subject } from 'rxjs'; |
|
|
import { Subject } from 'rxjs'; |
|
|
import { takeUntil } from 'rxjs/operators'; |
|
|
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 { ShowAccessTokenDialog } from './show-access-token-dialog/show-access-token-dialog.component'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
@ -24,6 +25,7 @@ export class RegisterPageComponent implements OnDestroy, OnInit { |
|
|
public demoAuthToken: string; |
|
|
public demoAuthToken: string; |
|
|
public deviceType: string; |
|
|
public deviceType: string; |
|
|
public hasPermissionForSocialLogin: boolean; |
|
|
public hasPermissionForSocialLogin: boolean; |
|
|
|
|
|
public hasPermissionForSubscription: boolean; |
|
|
public hasPermissionToCreateUser: boolean; |
|
|
public hasPermissionToCreateUser: boolean; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public info: InfoItem; |
|
|
public info: InfoItem; |
|
@ -52,6 +54,10 @@ export class RegisterPageComponent implements OnDestroy, OnInit { |
|
|
globalPermissions, |
|
|
globalPermissions, |
|
|
permissions.enableSocialLogin |
|
|
permissions.enableSocialLogin |
|
|
); |
|
|
); |
|
|
|
|
|
this.hasPermissionForSubscription = hasPermission( |
|
|
|
|
|
globalPermissions, |
|
|
|
|
|
permissions.enableSubscription |
|
|
|
|
|
); |
|
|
this.hasPermissionToCreateUser = hasPermission( |
|
|
this.hasPermissionToCreateUser = hasPermission( |
|
|
globalPermissions, |
|
|
globalPermissions, |
|
|
permissions.createUserAccount |
|
|
permissions.createUserAccount |
|
@ -70,6 +76,10 @@ export class RegisterPageComponent implements OnDestroy, OnInit { |
|
|
|
|
|
|
|
|
public openShowAccessTokenDialog() { |
|
|
public openShowAccessTokenDialog() { |
|
|
const dialogRef = this.dialog.open(ShowAccessTokenDialog, { |
|
|
const dialogRef = this.dialog.open(ShowAccessTokenDialog, { |
|
|
|
|
|
data: { |
|
|
|
|
|
deviceType: this.deviceType, |
|
|
|
|
|
needsToAcceptTermsOfService: this.hasPermissionForSubscription |
|
|
|
|
|
} as ShowAccessTokenDialogParams, |
|
|
disableClose: true, |
|
|
disableClose: true, |
|
|
height: this.deviceType === 'mobile' ? '98vh' : undefined, |
|
|
height: this.deviceType === 'mobile' ? '98vh' : undefined, |
|
|
width: this.deviceType === 'mobile' ? '100vw' : '30rem' |
|
|
width: this.deviceType === 'mobile' ? '100vw' : '30rem' |
|
|