|
|
|
@ -280,61 +280,81 @@ |
|
|
|
<div class="align-items-center d-flex py-1"> |
|
|
|
<div class="pr-1 w-50"></div> |
|
|
|
<div class="pl-1 text-monospace w-50"> |
|
|
|
<button color="primary" mat-flat-button (click)="onExport()"> |
|
|
|
<span i18n>Export Data</span> |
|
|
|
<button color="primary" i18n mat-flat-button (click)="onExport()"> |
|
|
|
Export Data |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@if (hasPermissionToDeleteOwnUser) { |
|
|
|
@if ( |
|
|
|
hasPermissionToDeleteOwnUser || hasPermissionToRequestOwnUserDeletion |
|
|
|
) { |
|
|
|
<hr class="mt-5" /> |
|
|
|
<form |
|
|
|
class="w-100" |
|
|
|
[formGroup]="deleteOwnUserForm" |
|
|
|
(ngSubmit)="onCloseAccount()" |
|
|
|
> |
|
|
|
<div class="d-flex py-1"> |
|
|
|
<div class="pr-1 text-danger w-50" i18n>Danger Zone</div> |
|
|
|
<div class="pl-1 w-50"> |
|
|
|
<mat-form-field |
|
|
|
appearance="outline" |
|
|
|
class="without-hint w-100" |
|
|
|
[hideRequiredMarker]="true" |
|
|
|
<div class="d-flex py-1"> |
|
|
|
<div class="pr-1 text-danger w-50" i18n>Danger Zone</div> |
|
|
|
<div class="pl-1 w-50"> |
|
|
|
@if (hasPermissionToDeleteOwnUser) { |
|
|
|
<form |
|
|
|
class="w-100" |
|
|
|
[formGroup]="deleteOwnUserForm" |
|
|
|
(ngSubmit)="onCloseAccount()" |
|
|
|
> |
|
|
|
<mat-label i18n>Security Token</mat-label> |
|
|
|
<input |
|
|
|
formControlName="accessToken" |
|
|
|
matInput |
|
|
|
[type]="isAccessTokenHidden ? 'password' : 'text'" |
|
|
|
/> |
|
|
|
<button |
|
|
|
class="mx-2" |
|
|
|
mat-icon-button |
|
|
|
matSuffix |
|
|
|
type="button" |
|
|
|
(click)="isAccessTokenHidden = !isAccessTokenHidden" |
|
|
|
<mat-form-field |
|
|
|
appearance="outline" |
|
|
|
class="without-hint w-100" |
|
|
|
[hideRequiredMarker]="true" |
|
|
|
> |
|
|
|
<ion-icon |
|
|
|
class="mat-icon" |
|
|
|
[name]=" |
|
|
|
isAccessTokenHidden ? 'eye-outline' : 'eye-off-outline' |
|
|
|
" |
|
|
|
<mat-label i18n>Security Token</mat-label> |
|
|
|
<input |
|
|
|
formControlName="accessToken" |
|
|
|
matInput |
|
|
|
[type]="isAccessTokenHidden ? 'password' : 'text'" |
|
|
|
/> |
|
|
|
<button |
|
|
|
class="mx-2" |
|
|
|
mat-icon-button |
|
|
|
matSuffix |
|
|
|
type="button" |
|
|
|
(click)="isAccessTokenHidden = !isAccessTokenHidden" |
|
|
|
> |
|
|
|
<ion-icon |
|
|
|
class="mat-icon" |
|
|
|
[name]=" |
|
|
|
isAccessTokenHidden ? 'eye-outline' : 'eye-off-outline' |
|
|
|
" |
|
|
|
/> |
|
|
|
</button> |
|
|
|
</mat-form-field> |
|
|
|
<button |
|
|
|
class="mt-2" |
|
|
|
color="warn" |
|
|
|
i18n |
|
|
|
mat-flat-button |
|
|
|
type="submit" |
|
|
|
[disabled]=" |
|
|
|
!(deleteOwnUserForm.dirty && deleteOwnUserForm.valid) |
|
|
|
" |
|
|
|
> |
|
|
|
Close Account |
|
|
|
</button> |
|
|
|
</mat-form-field> |
|
|
|
<button |
|
|
|
class="mt-2" |
|
|
|
color="warn" |
|
|
|
mat-flat-button |
|
|
|
type="submit" |
|
|
|
[disabled]=" |
|
|
|
!(deleteOwnUserForm.dirty && deleteOwnUserForm.valid) |
|
|
|
" |
|
|
|
> |
|
|
|
<span i18n>Close Account</span> |
|
|
|
</form> |
|
|
|
} @else if ( |
|
|
|
hasPermissionToRequestOwnUserDeletion && |
|
|
|
(user?.accounts?.length > 0 || user?.activitiesCount > 0) |
|
|
|
) { |
|
|
|
<button color="warn" i18n mat-flat-button [disabled]="true"> |
|
|
|
Close Account |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<div class="hint-text mt-2 text-muted" i18n> |
|
|
|
For security reasons, please delete all activities and accounts |
|
|
|
first before your Ghostfolio account can be closed. |
|
|
|
</div> |
|
|
|
} @else if (hasPermissionToRequestOwnUserDeletion) { |
|
|
|
<a color="warn" i18n mat-flat-button [href]="closeUserAccountMail" |
|
|
|
>Close Account</a |
|
|
|
> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|