1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 19:53:59 +00:00

Merge remote-tracking branch 'origin/main' into uif/CL-927/anon-layout-header-actions-slot

This commit is contained in:
Bryan Cunningham
2025-12-04 16:08:23 -05:00
3 changed files with 37 additions and 19 deletions

View File

@@ -627,11 +627,11 @@ export default class NotificationBackground {
}
const username: string | null = data.username || null;
const currentPassword = data.password || null;
const newPassword = data.newPassword || null;
const currentPasswordFieldValue = data.password || null;
const newPasswordFieldValue = data.newPassword || null;
if (authStatus === AuthenticationStatus.Locked && newPassword !== null) {
await this.pushChangePasswordToQueue(null, loginDomain, newPassword, tab, true);
if (authStatus === AuthenticationStatus.Locked && newPasswordFieldValue !== null) {
await this.pushChangePasswordToQueue(null, loginDomain, newPasswordFieldValue, tab, true);
return true;
}
@@ -657,35 +657,49 @@ export default class NotificationBackground {
const [cipher] = ciphers;
if (
username !== null &&
newPassword === null &&
newPasswordFieldValue === null &&
cipher.login.username.toLowerCase() === normalizedUsername &&
cipher.login.password === currentPassword
cipher.login.password === currentPasswordFieldValue
) {
// Assumed to be a login
return false;
}
}
if (currentPassword && !newPassword) {
if (
ciphers.length > 0 &&
currentPasswordFieldValue?.length &&
// Only use current password for change if no new password present.
if (ciphers.length > 0) {
await this.pushChangePasswordToQueue(
ciphers.map((cipher) => cipher.id),
loginDomain,
currentPassword,
tab,
);
return true;
!newPasswordFieldValue
) {
const currentPasswordMatchesAnExistingValue = ciphers.some(
(cipher) =>
cipher.login?.password?.length && cipher.login.password === currentPasswordFieldValue,
);
// The password entered matched a stored cipher value with
// the same username (no change)
if (currentPasswordMatchesAnExistingValue) {
return false;
}
await this.pushChangePasswordToQueue(
ciphers.map((cipher) => cipher.id),
loginDomain,
currentPasswordFieldValue,
tab,
);
return true;
}
if (newPassword) {
if (newPasswordFieldValue) {
// Otherwise include all known ciphers.
if (ciphers.length > 0) {
await this.pushChangePasswordToQueue(
ciphers.map((cipher) => cipher.id),
loginDomain,
newPassword,
newPasswordFieldValue,
tab,
);

View File

@@ -23,7 +23,11 @@
(keydown)="handleKeyDown($event)"
>
<ng-content></ng-content>
<div class="tw-sticky tw-bottom-0 tw-left-0 tw-z-20 tw-mt-auto tw-w-full tw-bg-background-alt3">
<!-- 53rem = ~850px -->
<!-- This is a magic number. This number was selected by going to the UI and finding the number that felt the best to me and design. No real rhyme or reason :) -->
<div
class="[@media(min-height:53rem)]:tw-sticky tw-bottom-0 tw-left-0 tw-z-20 tw-mt-auto tw-w-full tw-bg-background-alt3"
>
<bit-nav-divider></bit-nav-divider>
@if (data.open) {
<ng-content select="[slot=footer]"></ng-content>

View File

@@ -10,7 +10,7 @@
<div class="tw-flex tw-items-center tw-justify-center" style="width: 40px; height: 40px">
<app-vault-icon [cipher]="cipher()" [coloredIcon]="true"></app-vault-icon>
</div>
<h2 bitTypography="h4" class="tw-ml-2 tw-mt-2" data-testid="item-name">
<h2 bitTypography="h4" class="tw-ml-2 tw-mt-2 tw-select-auto" data-testid="item-name">
{{ cipher().name }}
</h2>
</div>