Skip to content

Commit

Permalink
Merge branch 'main' into ac/pm-13761/truncate-email-in-confirmation-m…
Browse files Browse the repository at this point in the history
…odal
  • Loading branch information
r-tome authored Jan 28, 2025
2 parents f48e354 + 582beaf commit cfdb264
Show file tree
Hide file tree
Showing 31 changed files with 296 additions and 84 deletions.
22 changes: 22 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,28 @@
"commitMessagePrefix": "[deps] Architecture:",
"reviewers": ["team:dept-architecture"]
},
{
"matchPackageNames": [
"@angular-eslint/eslint-plugin-template",
"@angular-eslint/eslint-plugin",
"@angular-eslint/schematics",
"@angular-eslint/template-parser",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"eslint-config-prettier",
"eslint-import-resolver-typescript",
"eslint-plugin-import",
"eslint-plugin-rxjs-angular",
"eslint-plugin-rxjs",
"eslint-plugin-storybook",
"eslint-plugin-tailwindcss",
"eslint",
"husky",
"lint-staged"
],
"groupName": "Linting minor-patch",
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchPackageNames": [
"@emotion/css",
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ jobs:
fail-on-error: true

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ needs.check-test-secrets.outputs.available == 'true' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2

- name: Upload results to codecov.io
uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
Expand Down
6 changes: 0 additions & 6 deletions apps/browser/src/auth/popup/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { DialogService, ToastService } from "@bitwarden/components";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
import { KeyService } from "@bitwarden/key-management";

@Component({
Expand All @@ -34,9 +32,7 @@ export class RegisterComponent extends BaseRegisterComponent {
i18nService: I18nService,
keyService: KeyService,
apiService: ApiService,
stateService: StateService,
platformUtilsService: PlatformUtilsService,
passwordGenerationService: PasswordGenerationServiceAbstraction,
environmentService: EnvironmentService,
logService: LogService,
auditService: AuditService,
Expand All @@ -51,9 +47,7 @@ export class RegisterComponent extends BaseRegisterComponent {
i18nService,
keyService,
apiService,
stateService,
platformUtilsService,
passwordGenerationService,
environmentService,
logService,
auditService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@

<div
*ngIf="showOverlay"
class="tw-absolute tw-w-full tw-h-full tw-bg-background-alt tw-inset-0 tw-bg-opacity-80 tw-z-50"
class="tw-absolute tw-size-full tw-bg-background-alt tw-inset-0 tw-bg-opacity-80 tw-z-50"
></div>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<ng-content select="[slot=above-scroll-area]"></ng-content>
</div>
<div
class="tw-max-w-screen-sm tw-mx-auto tw-overflow-y-auto tw-flex tw-flex-col tw-w-full tw-h-full tw-styled-scrollbar"
class="tw-max-w-screen-sm tw-mx-auto tw-overflow-y-auto tw-flex tw-flex-col tw-size-full tw-styled-scrollbar"
data-testid="popup-layout-scroll-region"
(scroll)="handleScroll($event)"
[ngClass]="{ 'tw-invisible': loading }"
>
<div
class="tw-max-w-screen-sm tw-mx-auto tw-flex-1 tw-flex tw-flex-col tw-h-full tw-w-full"
class="tw-max-w-screen-sm tw-mx-auto tw-flex-1 tw-flex tw-flex-col tw-size-full"
[ngClass]="{ 'tw-p-3 bit-compact:tw-p-2': !disablePadding }"
>
<ng-content></ng-content>
Expand Down
30 changes: 18 additions & 12 deletions apps/browser/src/tools/popup/settings/settings-v2.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,44 @@

<bit-item-group>
<bit-item>
<a bit-item-content routerLink="/account-security"
>{{ "accountSecurity" | i18n }}
<a bit-item-content routerLink="/account-security">
<i slot="start" class="bwi bwi-lock" aria-hidden="true"></i>
{{ "accountSecurity" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
<bit-item>
<a bit-item-content routerLink="/autofill"
>{{ "autofill" | i18n }}
<a bit-item-content routerLink="/autofill">
<i slot="start" class="bwi bwi-check-circle" aria-hidden="true"></i>
{{ "autofill" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
<bit-item>
<a bit-item-content routerLink="/notifications"
>{{ "notifications" | i18n }}
<a bit-item-content routerLink="/notifications">
<i slot="start" class="bwi bwi-file-text" aria-hidden="true"></i>
{{ "notifications" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
<bit-item>
<a bit-item-content routerLink="/vault-settings"
>{{ "vault" | i18n }}
<a bit-item-content routerLink="/vault-settings">
<i slot="start" class="bwi bwi-vault" aria-hidden="true"></i>
{{ "vault" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
<bit-item>
<a bit-item-content routerLink="/appearance"
>{{ "appearance" | i18n }}
<a bit-item-content routerLink="/appearance">
<i slot="start" class="bwi bwi-eye" aria-hidden="true"></i>
{{ "appearance" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
<bit-item>
<a bit-item-content routerLink="/about"
>{{ "about" | i18n }}
<a bit-item-content routerLink="/about">
<i slot="start" class="bwi bwi-info-circle" aria-hidden="true"></i>
{{ "about" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>
</bit-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</p>
<div
*ngIf="showBadge$ | async"
class="tw-flex tw-items-center tw-justify-center tw-z-10 tw-absolute tw-rounded-full tw-h-[15px] tw-w-[15px] tw-top-[1px] tw-right-[1px] tw-text-notification-600 tw-text-[8px] tw-border-notification-600 tw-border-[0.5px] tw-border-solid tw-bg-notification-100 tw-leading-normal"
class="tw-flex tw-items-center tw-justify-center tw-z-10 tw-absolute tw-rounded-full tw-size-[15px] tw-top-[1px] tw-right-[1px] tw-text-notification-600 tw-text-[8px] tw-border-notification-600 tw-border-[0.5px] tw-border-solid tw-bg-notification-100 tw-leading-normal"
data-testid="filter-badge"
>
{{ numberOfAppliedFilters$ | async }}
Expand Down
6 changes: 0 additions & 6 deletions apps/desktop/src/auth/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { DialogService, ToastService } from "@bitwarden/components";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
import { KeyService } from "@bitwarden/key-management";

const BroadcasterSubscriptionId = "RegisterComponent";
Expand All @@ -32,9 +30,7 @@ export class RegisterComponent extends BaseRegisterComponent implements OnInit,
i18nService: I18nService,
keyService: KeyService,
apiService: ApiService,
stateService: StateService,
platformUtilsService: PlatformUtilsService,
passwordGenerationService: PasswordGenerationServiceAbstraction,
environmentService: EnvironmentService,
private broadcasterService: BroadcasterService,
private ngZone: NgZone,
Expand All @@ -51,9 +47,7 @@ export class RegisterComponent extends BaseRegisterComponent implements OnInit,
i18nService,
keyService,
apiService,
stateService,
platformUtilsService,
passwordGenerationService,
environmentService,
logService,
auditService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div
class="tw-flex tw-h-32 tw-bg-secondary-100 tw-items-center tw-justify-center tw-pb-2 tw-px-6 lg:tw-pb-4 lg:tw-px-12"
>
<div class="tw-flex tw-items-center tw-justify-center tw-h-28 tw-w-28 lg:tw-w-40">
<div class="tw-flex tw-items-center tw-justify-center tw-size-28 lg:tw-w-40">
<img
#imageEle
[src]="image"
Expand All @@ -19,7 +19,7 @@
<div class="tw-p-5">
<h3 class="tw-text-main tw-text-lg tw-font-semibold">{{ name }}</h3>
<a
class="tw-block tw-mb-0 tw-font-bold hover:tw-no-underline focus:tw-outline-none after:tw-content-[''] after:tw-block after:tw-absolute after:tw-w-full after:tw-h-full after:tw-left-0 after:tw-top-0"
class="tw-block tw-mb-0 tw-font-bold hover:tw-no-underline focus:tw-outline-none after:tw-content-[''] after:tw-block after:tw-absolute after:tw-size-full after:tw-left-0 after:tw-top-0"
[href]="linkURL"
rel="noopener noreferrer"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { DialogService, ToastService } from "@bitwarden/components";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
import { KeyService } from "@bitwarden/key-management";

import { AcceptOrganizationInviteService } from "../organization-invite/accept-organization.service";
Expand All @@ -45,9 +43,7 @@ export class RegisterFormComponent extends BaseRegisterComponent implements OnIn
i18nService: I18nService,
keyService: KeyService,
apiService: ApiService,
stateService: StateService,
platformUtilsService: PlatformUtilsService,
passwordGenerationService: PasswordGenerationServiceAbstraction,
private policyService: PolicyService,
environmentService: EnvironmentService,
logService: LogService,
Expand All @@ -64,9 +60,7 @@ export class RegisterFormComponent extends BaseRegisterComponent implements OnIn
i18nService,
keyService,
apiService,
stateService,
platformUtilsService,
passwordGenerationService,
environmentService,
logService,
auditService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'!tw-outline-[3px] tw-outline-primary-600 hover:tw-outline-[3px] hover:tw-outline-primary-600':
customColorSelected,
}"
class="tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-600 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-600"
class="tw-relative tw-flex tw-size-24 tw-cursor-pointer tw-place-content-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-600 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-600"
[style.background-color]="customColor$ | async"
>
<i
Expand All @@ -37,7 +37,7 @@
></i>
<input
tabindex="-1"
class="tw-absolute tw-bottom-0 tw-right-0 tw-h-px tw-w-px tw-border-none tw-bg-transparent tw-opacity-0"
class="tw-absolute tw-bottom-0 tw-right-0 tw-size-px tw-border-none tw-bg-transparent tw-opacity-0"
#colorPicker
type="color"
[ngModel]="customColor$ | async"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>{{ "devices" | i18n }}</h1>
<button
[bitPopoverTriggerFor]="infoPopover"
type="button"
class="tw-border-none tw-bg-transparent tw-text-primary-600 tw-flex tw-items-center tw-h-4 tw-w-4"
class="tw-border-none tw-bg-transparent tw-text-primary-600 tw-flex tw-items-center tw-size-4"
[position]="'right-start'"
>
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
Expand All @@ -15,7 +15,7 @@ <h1>{{ "devices" | i18n }}</h1>
</bit-popover>
<i
*ngIf="asyncActionLoading"
class="bwi bwi-spinner bwi-spin tw-flex tw-items-center tw-h-4 tw-w-4"
class="bwi bwi-spinner bwi-spin tw-flex tw-items-center tw-size-4"
aria-hidden="true"
></i>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 class="tw-mb-3 tw-text-base tw-font-semibold">{{ "billingPlanLabel" | i18n }
<div class="tw-mb-1 tw-items-center" *ngIf="annualPlan !== null">
<label class="tw- tw-block tw-text-main" for="annual">
<input
class="tw-h-4 tw-w-4 tw-align-middle"
class="tw-size-4 tw-align-middle"
id="annual"
name="cadence"
type="radio"
Expand All @@ -34,7 +34,7 @@ <h2 class="tw-mb-3 tw-text-base tw-font-semibold">{{ "billingPlanLabel" | i18n }
<div class="tw-mb-1 tw-items-center" *ngIf="monthlyPlan !== null">
<label class="tw- tw-block tw-text-main" for="monthly">
<input
class="tw-h-4 tw-w-4 tw-align-middle"
class="tw-size-4 tw-align-middle"
id="monthly"
name="cadence"
type="radio"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@
<th bitCell bitSortable="organizationId" *ngIf="!isAdminConsoleActive">
{{ "owner" | i18n }}
</th>
<th bitCell class="tw-text-right" bitSortable="score" default>
<th
bitCell
class="tw-text-right"
bitSortable="score"
default
(sortChange)="onSortChange('score', $event)"
>
{{ "weakness" | i18n }}
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
this.weakPasswordCiphers = [];
this.filterStatus = [0];
this.findWeakPasswords(allCiphers);
this.weakPasswordCiphers = this.sortCiphers(this.weakPasswordCiphers, "score", false);
}

protected findWeakPasswords(ciphers: CipherView[]): void {
Expand Down Expand Up @@ -112,6 +113,29 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
this.filterCiphersByOrg(this.weakPasswordCiphers);
}

onSortChange(field: string, event: Event) {
const target = event.target as HTMLInputElement;
const ascending = target.checked;
this.weakPasswordCiphers = this.sortCiphers(this.weakPasswordCiphers, field, ascending);
}

protected sortCiphers(
ciphers: ReportResult[],
field: string,
ascending: boolean,
): ReportResult[] {
return ciphers.sort((a, b) => {
const aValue = a[field as keyof ReportResult];
const bValue = b[field as keyof ReportResult];

if (aValue === bValue) {
return 0;
}
const comparison = aValue > bValue ? 1 : -1;
return ascending ? comparison : -comparison;
});
}

protected canManageCipher(c: CipherView): boolean {
// this will only ever be false from the org view;
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ConfigService } from "@bitwarden/common/platform/abstractions/config/co
import { isEnterpriseOrgGuard } from "@bitwarden/web-vault/app/admin-console/organizations/guards/is-enterprise-org.guard";
import { organizationPermissionsGuard } from "@bitwarden/web-vault/app/admin-console/organizations/guards/org-permissions.guard";
import { OrganizationLayoutComponent } from "@bitwarden/web-vault/app/admin-console/organizations/layouts/organization-layout.component";
import { deepLinkGuard } from "@bitwarden/web-vault/app/auth/guards/deep-link.guard";

import { SsoComponent } from "../../auth/sso/sso.component";

Expand All @@ -18,7 +19,7 @@ const routes: Routes = [
{
path: "organizations/:organizationId",
component: OrganizationLayoutComponent,
canActivate: [authGuard, organizationPermissionsGuard()],
canActivate: [deepLinkGuard(), authGuard, organizationPermissionsGuard()],
children: [
{
path: "settings",
Expand Down
4 changes: 0 additions & 4 deletions libs/angular/src/auth/components/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { DialogService, ToastService } from "@bitwarden/components";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
import { DEFAULT_KDF_CONFIG, KeyService } from "@bitwarden/key-management";

import {
Expand Down Expand Up @@ -91,9 +89,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
i18nService: I18nService,
protected keyService: KeyService,
protected apiService: ApiService,
protected stateService: StateService,
platformUtilsService: PlatformUtilsService,
protected passwordGenerationService: PasswordGenerationServiceAbstraction,
environmentService: EnvironmentService,
protected logService: LogService,
protected auditService: AuditService,
Expand Down
2 changes: 1 addition & 1 deletion libs/angular/src/vault/components/icon.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[src]="data.image"
[appFallbackSrc]="data.fallbackImage"
*ngIf="data.imageEnabled && data.image"
class="tw-h-6 tw-w-6 tw-rounded-md"
class="tw-size-6 tw-rounded-md"
alt=""
decoding="async"
loading="lazy"
Expand Down
Loading

0 comments on commit cfdb264

Please sign in to comment.