mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
fix copy, padding, cleanup observable logic
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
<div class="tw-flex tw-flex-col">
|
<div class="tw-flex tw-flex-col">
|
||||||
@let showBadge = firstTimeDialog();
|
@let showBadge = firstTimeDialog();
|
||||||
@if (showBadge) {
|
@if (showBadge) {
|
||||||
<span bitBadge variant="info" class="tw-w-28 tw-my-2"> {{ "availableNow" | i18n }}</span>
|
<span bitBadge variant="info" class="tw-w-[99px] tw-my-2"> {{ "availableNow" | i18n }}</span>
|
||||||
}
|
}
|
||||||
<span>
|
<span>
|
||||||
{{ (firstTimeDialog ? "autoConfirm" : "editPolicy") | i18n }}
|
{{ (firstTimeDialog ? "autoConfirm" : "editPolicy") | i18n }}
|
||||||
|
|||||||
@@ -47,12 +47,12 @@
|
|||||||
<bit-icon class="tw-w-[233px]" [icon]="autoConfirmSvg"></bit-icon>
|
<bit-icon class="tw-w-[233px]" [icon]="autoConfirmSvg"></bit-icon>
|
||||||
</div>
|
</div>
|
||||||
<ol>
|
<ol>
|
||||||
<li>1. {{ "autoConfirmStep1" | i18n }}</li>
|
<li>1. {{ "autoConfirmExtension1" | i18n }}</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
2. {{ "autoConfirmStep2a" | i18n }}
|
2. {{ "autoConfirmExtension2" | i18n }}
|
||||||
<strong>
|
<strong>
|
||||||
{{ "autoConfirmStep2b" | i18n }}
|
{{ "autoConfirmExtension3" | i18n }}
|
||||||
</strong>
|
</strong>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {
|
|||||||
take,
|
take,
|
||||||
takeUntil,
|
takeUntil,
|
||||||
tap,
|
tap,
|
||||||
|
withLatestFrom,
|
||||||
} from "rxjs/operators";
|
} from "rxjs/operators";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -642,25 +643,7 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
);
|
);
|
||||||
void this.unifiedUpgradePromptService.displayUpgradePromptConditionally();
|
void this.unifiedUpgradePromptService.displayUpgradePromptConditionally();
|
||||||
|
|
||||||
zip([
|
this.setupAutoConfirm();
|
||||||
this.configService.getFeatureFlag$(FeatureFlag.AutoConfirm),
|
|
||||||
this.userId$.pipe(switchMap((userId) => this.autoConfirmService.configuration$(userId))),
|
|
||||||
this.organizations$.pipe(map((organizations) => organizations[0])),
|
|
||||||
])
|
|
||||||
.pipe(
|
|
||||||
filter(
|
|
||||||
([enabled, autoConfirmState, organization]) =>
|
|
||||||
enabled &&
|
|
||||||
autoConfirmState.showSetupDialog &&
|
|
||||||
!!organization &&
|
|
||||||
organization.canManageUsers,
|
|
||||||
),
|
|
||||||
first(),
|
|
||||||
takeUntil(this.destroy$),
|
|
||||||
)
|
|
||||||
.subscribe(([enabled, autoConfirmState, organization]) =>
|
|
||||||
this.openAutoConfirmFeatureDialog(organization),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@@ -1589,6 +1572,39 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private setupAutoConfirm() {
|
||||||
|
zip([
|
||||||
|
this.organizations$.pipe(map((organizations) => organizations[0])),
|
||||||
|
this.configService.getFeatureFlag$(FeatureFlag.AutoConfirm),
|
||||||
|
this.userId$.pipe(switchMap((userId) => this.autoConfirmService.configuration$(userId))),
|
||||||
|
this.userId$.pipe(
|
||||||
|
switchMap((userId) => this.policyService.policies$(userId)),
|
||||||
|
withLatestFrom(this.organizations$.pipe(map((organizations) => organizations[0]))),
|
||||||
|
map(([policies, organization]) =>
|
||||||
|
policies.some(
|
||||||
|
(p) =>
|
||||||
|
p.type === PolicyType.AutoConfirm &&
|
||||||
|
p.enabled &&
|
||||||
|
p.organizationId === organization.id,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
.pipe(
|
||||||
|
filter(
|
||||||
|
([organization, flagEnabled, autoConfirmState, policyEnabled]) =>
|
||||||
|
flagEnabled &&
|
||||||
|
!policyEnabled &&
|
||||||
|
autoConfirmState.showSetupDialog &&
|
||||||
|
!!organization &&
|
||||||
|
organization.canManageUsers,
|
||||||
|
),
|
||||||
|
first(),
|
||||||
|
takeUntil(this.destroy$),
|
||||||
|
)
|
||||||
|
.subscribe(([organization]) => this.openAutoConfirmFeatureDialog(organization));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5801,16 +5801,16 @@
|
|||||||
"howToTurnOnAutoConfirm": {
|
"howToTurnOnAutoConfirm": {
|
||||||
"message": "How to turn on automatic user confirmation"
|
"message": "How to turn on automatic user confirmation"
|
||||||
},
|
},
|
||||||
"autoConfirmStep1": {
|
"autoConfirmExtension1": {
|
||||||
"message": "Open your Bitwarden extension."
|
"message": "Open your Bitwarden extension"
|
||||||
},
|
},
|
||||||
"autoConfirmStep2a": {
|
"autoConfirmExtension2": {
|
||||||
"message": "Select",
|
"message": "Select",
|
||||||
"description": "This is a fragment of a larger sencence. The whole sentence will read: 'Select Turn on.'"
|
"description": "This is a fragment of a larger sencence. The whole sentence will read: 'Select Turn on'"
|
||||||
},
|
},
|
||||||
"autoConfirmStep2b": {
|
"autoConfirmExtension3": {
|
||||||
"message": " Turn on.",
|
"message": " Turn on",
|
||||||
"description": "This is a fragment of a larger sencence. The whole sentence will read: 'Select Turn on.'"
|
"description": "This is a fragment of a larger sencence. The whole sentence will read: 'Select Turn on'"
|
||||||
},
|
},
|
||||||
"autoConfirmExtensionOpened": {
|
"autoConfirmExtensionOpened": {
|
||||||
"message": "Successfully opened the Bitwarden browser extension. You can now activate the automatic user confirmation setting."
|
"message": "Successfully opened the Bitwarden browser extension. You can now activate the automatic user confirmation setting."
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ export class DefaultPolicyService implements PolicyService {
|
|||||||
case PolicyType.RemoveUnlockWithPin:
|
case PolicyType.RemoveUnlockWithPin:
|
||||||
// Remove Unlock with PIN policy
|
// Remove Unlock with PIN policy
|
||||||
return false;
|
return false;
|
||||||
|
case PolicyType.AutoConfirm:
|
||||||
|
return false;
|
||||||
case PolicyType.OrganizationDataOwnership:
|
case PolicyType.OrganizationDataOwnership:
|
||||||
// organization data ownership policy applies to everyone except admins and owners
|
// organization data ownership policy applies to everyone except admins and owners
|
||||||
return organization.isAdmin;
|
return organization.isAdmin;
|
||||||
|
|||||||
Reference in New Issue
Block a user