Merge branch 'main' into vault/pm-6825/list-item-containers

This commit is contained in:
Shane Melton 2024-05-17 15:39:18 -07:00
commit fc83dd1c35
No known key found for this signature in database
4 changed files with 70 additions and 28 deletions

View File

@ -1214,7 +1214,22 @@ export default class MainBackground {
);
// can be removed once password generation history is migrated to state providers
await this.stateService.clearDecryptedData(currentlyActiveAccount);
// HACK to ensure account is switched before proceeding
const switchPromise = firstValueFrom(
this.accountService.activeAccount$.pipe(
filter((account) => (account?.id ?? null) === (userId ?? null)),
timeout({
first: 1_000,
with: () => {
throw new Error(
"The account switch process did not complete in a reasonable amount of time.",
);
},
}),
),
);
await this.accountService.switchAccount(userId);
await switchPromise;
// Clear sequentialized caches
clearCaches();

View File

@ -196,8 +196,6 @@ export default class RuntimeBackground {
}
await this.notificationsService.updateConnection(msg.command === "loggedIn");
await this.main.refreshBadge();
await this.main.refreshMenu(false);
this.systemService.cancelProcessReload();
if (item) {
@ -209,6 +207,13 @@ export default class RuntimeBackground {
item,
);
}
// @TODO these need to happen last to avoid blocking `tabSendMessageData` above
// The underlying cause exists within `cipherService.getAllDecrypted` via
// `getAllDecryptedForUrl` and is anticipated to be refactored
await this.main.refreshBadge();
await this.main.refreshMenu(false);
break;
}
case "addToLockedVaultPendingNotifications":

View File

@ -142,10 +142,22 @@
<ng-container *ngIf="userOrg.canEditSubscription">
<h2 bitTypography="h2" class="tw-mt-7">{{ "manageSubscription" | i18n }}</h2>
<p bitTypography="body1" *ngIf="customerDiscount?.id === 'sm-standalone'">
{{ "smStandaloneTrialSeatCountUpdateMessageFragment1" | i18n }}
{{ "passwordManager" | i18n }}
{{ "smStandaloneTrialSeatCountUpdateMessageFragment2" | i18n }}
<a href="https://bitwarden.com/contact/" target="_blank" rel="noreferrer"
>{{ "contactSupportShort" | i18n }}.
</a>
</p>
<p bitTypography="body1">{{ subscriptionDesc }}</p>
<ng-container
*ngIf="
subscription && canAdjustSeats && !subscription.cancelled && !subscriptionMarkedForCancel
subscription &&
canAdjustSeats &&
!subscription.cancelled &&
!subscriptionMarkedForCancel &&
(!customerDiscount || customerDiscount.id != 'sm-standalone')
"
>
<h3 bitTypography="h3" class="tw-mt-7">{{ "passwordManager" | i18n }}</h3>
@ -168,32 +180,36 @@
>
{{ "removeSponsorship" | i18n }}
</button>
<h4 bitTypography="h4" class="tw-mt-9">{{ "storage" | i18n }}</h4>
<p bitTypography="body1">
{{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }}
</p>
<bit-progress [barWidth]="storagePercentage" bgColor="success"></bit-progress>
<ng-container *ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel">
<div class="tw-mt-3">
<div class="tw-flex tw-space-x-2">
<button
bitButton
buttonType="secondary"
type="button"
[bitAction]="adjustStorage(true)"
>
{{ "addStorage" | i18n }}
</button>
<button
bitButton
buttonType="secondary"
type="button"
[bitAction]="adjustStorage(false)"
>
{{ "removeStorage" | i18n }}
</button>
<ng-container *ngIf="!customerDiscount || customerDiscount.id != 'sm-standalone'">
<h4 bitTypography="h4" class="tw-mt-9">{{ "storage" | i18n }}</h4>
<p bitTypography="body1">
{{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }}
</p>
<bit-progress [barWidth]="storagePercentage" bgColor="success"></bit-progress>
<ng-container
*ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel"
>
<div class="tw-mt-3">
<div class="tw-flex tw-space-x-2">
<button
bitButton
buttonType="secondary"
type="button"
[bitAction]="adjustStorage(true)"
>
{{ "addStorage" | i18n }}
</button>
<button
bitButton
buttonType="secondary"
type="button"
[bitAction]="adjustStorage(false)"
>
{{ "removeStorage" | i18n }}
</button>
</div>
</div>
</div>
</ng-container>
</ng-container>
<ng-container *ngIf="showAdjustSecretsManager">
<h3 bitTypography="h3" class="tw-mt-9">{{ "secretsManager" | i18n }}</h3>

View File

@ -3565,6 +3565,12 @@
"subscriptionUserSeatsUnlimitedAutoscale": {
"message": "Adjustments to your subscription will result in prorated changes to your billing totals. If newly invited members exceed your subscription seats, you will immediately receive a prorated charge for the additional members."
},
"smStandaloneTrialSeatCountUpdateMessageFragment1": {
"message": "If you want to add additional"
},
"smStandaloneTrialSeatCountUpdateMessageFragment2": {
"message": "seats without the bundled offer, please contact"
},
"subscriptionUserSeatsLimitedAutoscale": {
"message": "Adjustments to your subscription will result in prorated changes to your billing totals. If newly invited members exceed your subscription seats, you will immediately receive a prorated charge for the additional members until your $MAX$ seat limit is reached.",
"placeholders": {