Browse Source

Merge pull request #18981 from abpframework/auto-merge/prerel-8-1/2476

Merge branch dev with prerel-8.1
pull/18991/head
maliming 2 years ago
committed by GitHub
parent
commit
123e8a211f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
  2. 1
      npm/ng-packs/packages/theme-shared/src/lib/components/toast/toast.component.scss

10
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -5,7 +5,7 @@ import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { finalize, filter } from 'rxjs/operators';
import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
import { AuthService } from '@abp/ng.core';
import { AuthService, ConfigStateService } from '@abp/ng.core';
import { RE_LOGIN_CONFIRMATION_TOKEN } from '../../tokens';
import {
EXTENSIONS_IDENTIFIER,
@ -44,6 +44,7 @@ export class PersonalSettingsComponent
private manageProfileState: ManageProfileStateService,
private readonly authService: AuthService,
private confirmationService: ConfirmationService,
private configState: ConfigStateService,
@Inject(RE_LOGIN_CONFIRMATION_TOKEN)
private isPersonalSettingsChangedConfirmationActive: boolean,
protected injector: Injector,
@ -65,13 +66,20 @@ export class PersonalSettingsComponent
submit() {
if (this.form.invalid) return;
const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
const isRefreshTokenExists = this.authService.getRefreshToken();
this.inProgress = true;
this.profileService
.update(this.form.value)
.pipe(finalize(() => (this.inProgress = false)))
.subscribe(profile => {
this.manageProfileState.setProfile(profile);
this.configState.refreshAppState();
this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
if(isRefreshTokenExists){
return this.authService.refreshToken();
}
if (isLogOutConfirmMessageVisible) {
this.showLogoutConfirmMessage();
}

1
npm/ng-packs/packages/theme-shared/src/lib/components/toast/toast.component.scss

@ -49,6 +49,7 @@ $toastClass: abp-toast;
position: relative;
display: flex;
align-self: center;
flex-direction: column;
word-break: break-word;
.#{$toastClass}-close-button {
position: absolute;

Loading…
Cancel
Save