1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-13 06:54:07 +00:00

run prettier again after giving node more memory (lol)

This commit is contained in:
William Martin
2024-07-25 14:06:43 -04:00
parent 61759567aa
commit 625da0776d
21 changed files with 34 additions and 34 deletions

View File

@@ -259,7 +259,7 @@
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': !showOpenIdCustomizations,
'bwi-angle-down': showOpenIdCustomizations
'bwi-angle-down': showOpenIdCustomizations,
}"
></i>
</button>

View File

@@ -61,7 +61,7 @@
class="tw-text-muted tw-grid tw-grid-flow-col tw-gap-1 tw-grid-cols-1"
[ngClass]="{
'tw-grid-rows-1': additionalSeatsPurchased <= 0,
'tw-grid-rows-2': additionalSeatsPurchased > 0
'tw-grid-rows-2': additionalSeatsPurchased > 0,
}"
>
<span class="tw-col-span-1"

View File

@@ -21,7 +21,7 @@
class="tw-grid tw-grid-flow-col tw-gap-1 tw-grid-cols-1"
[ngClass]="{
'tw-grid-rows-1': additionalSeatsPurchased === 0,
'tw-grid-rows-2': purchasingSeats || sellingSeats
'tw-grid-rows-2': purchasingSeats || sellingSeats,
}"
>
<span class="tw-col-span-1">

View File

@@ -1,6 +1,6 @@
<ng-container
*ngIf="{
selectedRegion: selectedRegion$ | async
selectedRegion: selectedRegion$ | async,
} as data"
>
<div class="environment-selector-btn">

View File

@@ -414,11 +414,11 @@ export class StateService<
}
const account = options?.useSecureStorage
? (await this.secureStorageService.get<TAccount>(options.userId, options)) ??
? ((await this.secureStorageService.get<TAccount>(options.userId, options)) ??
(await this.storageService.get<TAccount>(
options.userId,
this.reconcileOptions(options, { htmlStorageLocation: HtmlStorageLocation.Local }),
))
)))
: await this.storageService.get<TAccount>(options.userId, options);
return account;
}

View File

@@ -164,7 +164,7 @@ export class DeriveDefinition<TFrom, TTo, TDeps extends DerivedStateDependencies
}
get cleanupDelayMs() {
return this.options.cleanupDelayMs < 0 ? 0 : this.options.cleanupDelayMs ?? 1000;
return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);
}
get clearOnCleanup() {

View File

@@ -68,7 +68,7 @@ export class KeyDefinition<T> {
* Gets the number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.
*/
get cleanupDelayMs() {
return this.options.cleanupDelayMs < 0 ? 0 : this.options.cleanupDelayMs ?? 1000;
return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);
}
/**

View File

@@ -51,7 +51,7 @@ export class UserKeyDefinition<T> {
* Gets the number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.
*/
get cleanupDelayMs() {
return this.options.cleanupDelayMs < 0 ? 0 : this.options.cleanupDelayMs ?? 1000;
return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);
}
/**

View File

@@ -5,7 +5,7 @@
selectedOption
? 'tw-bg-text-muted tw-text-contrast tw-gap-1'
: 'tw-bg-transparent tw-text-muted tw-gap-1.5',
focusVisibleWithin() ? 'tw-ring-2 tw-ring-primary-500 tw-ring-offset-1' : ''
focusVisibleWithin() ? 'tw-ring-2 tw-ring-primary-500 tw-ring-offset-1' : '',
]"
>
<!-- Primary button -->
@@ -13,7 +13,7 @@
type="button"
class="fvw-target tw-inline-flex tw-gap-1.5 tw-items-center tw-bg-transparent hover:tw-bg-transparent tw-border-none tw-outline-none tw-max-w-full tw-py-1 tw-pl-3 last:tw-pr-3 tw-truncate tw-text-[inherit]"
[ngClass]="{
'tw-cursor-not-allowed': disabled
'tw-cursor-not-allowed': disabled,
}"
[bitMenuTriggerFor]="menu"
[disabled]="disabled"
@@ -37,7 +37,7 @@
[disabled]="disabled"
class="tw-bg-transparent hover:tw-bg-transparent tw-outline-none tw-rounded-full tw-p-1 tw-my-1 tw-mr-1 tw-text-[inherit] tw-border-solid tw-border tw-border-text-muted hover:tw-border-text-contrast hover:disabled:tw-border-transparent tw-aspect-square tw-flex tw-items-center tw-justify-center tw-h-fit focus-visible:tw-ring-2 tw-ring-text-contrast focus-visible:hover:tw-border-transparent"
[ngClass]="{
'tw-cursor-not-allowed': disabled
'tw-cursor-not-allowed': disabled,
}"
(click)="clear()"
>

View File

@@ -32,7 +32,7 @@
<div
class="tw-relative tw-flex tw-flex-col tw-overflow-hidden"
[ngClass]="{
'tw-min-h-60': loading
'tw-min-h-60': loading,
}"
>
<div
@@ -47,7 +47,7 @@
'tw-overflow-y-auto': !loading,
'tw-invisible tw-overflow-y-hidden': loading,
'tw-bg-background': background === 'default',
'tw-bg-background-alt': background === 'alt'
'tw-bg-background-alt': background === 'alt',
}"
>
<ng-content select="[bitDialogContent]"></ng-content>

View File

@@ -30,7 +30,7 @@
class="default-content tw-w-full tw-relative tw-py-2 has-[bit-select]:tw-p-0 has-[bit-multi-select]:tw-p-0 has-[input:read-only:not([hidden])]:tw-bg-secondary-100 has-[textarea:read-only:not([hidden])]:tw-bg-secondary-100"
[ngClass]="[
prefixSlot.childElementCount === 0 ? 'tw-rounded-l-lg tw-pl-3' : '',
suffixSlot.childElementCount === 0 ? 'tw-rounded-r-lg tw-pr-3' : ''
suffixSlot.childElementCount === 0 ? 'tw-rounded-r-lg tw-pr-3' : '',
]"
>
<ng-container *ngTemplateOutlet="defaultContent"></ng-container>
@@ -86,7 +86,7 @@
'tw-border-secondary-300/50 tw-border-b':
!disableReadOnlyBorder && !defaultContentIsFocused(),
'tw-border-b-2 tw-border-transparent': disableReadOnlyBorder && !defaultContentIsFocused(),
'tw-border-b-2 tw-border-primary-500': defaultContentIsFocused()
'tw-border-b-2 tw-border-primary-500': defaultContentIsFocused(),
}"
>
<div

View File

@@ -25,7 +25,7 @@
<!-- overlay backdrop for side-nav -->
<div
*ngIf="{
open: sideNavService.open$ | async
open: sideNavService.open$ | async,
} as data"
class="tw-pointer-events-none tw-fixed tw-inset-0 tw-z-10 tw-bg-black tw-bg-opacity-0 motion-safe:tw-transition-colors md:tw-hidden"
[ngClass]="[data.open ? 'tw-bg-opacity-30 md:tw-bg-opacity-0' : 'tw-bg-opacity-0']"

View File

@@ -1,6 +1,6 @@
<ng-container
*ngIf="{
open: sideNavService.open$ | async
open: sideNavService.open$ | async,
} as data"
>
<div
@@ -10,12 +10,12 @@
showActiveStyles
? 'tw-bg-background-alt4'
: 'tw-bg-background-alt3 hover:tw-bg-primary-300/60',
fvwStyles$ | async
fvwStyles$ | async,
]"
>
<div
[ngStyle]="{
'padding-left': data.open ? (variant === 'tree' ? 2.5 : 1) + treeDepth * 1.5 + 'rem' : '0'
'padding-left': data.open ? (variant === 'tree' ? 2.5 : 1) + treeDepth * 1.5 + 'rem' : '0',
}"
class="tw-relative tw-flex"
>
@@ -30,7 +30,7 @@
<div
*ngIf="slotStart.childElementCount === 0"
[ngClass]="{
'tw-w-0': variant !== 'tree'
'tw-w-0': variant !== 'tree',
}"
>
<button
@@ -52,7 +52,7 @@
class="tw-truncate"
[ngClass]="[
variant === 'tree' ? 'tw-py-1' : 'tw-py-2',
data.open ? 'tw-pr-4' : 'tw-text-center'
data.open ? 'tw-pr-4' : 'tw-text-center',
]"
>
<i
@@ -105,7 +105,7 @@
class="tw-flex -tw-ml-3 tw-pr-4 tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:tw-text-alt2"
[ngClass]="[
variant === 'tree' ? 'tw-py-1' : 'tw-py-2',
endSlot.childElementCount === 0 ? 'tw-hidden' : ''
endSlot.childElementCount === 0 ? 'tw-hidden' : '',
]"
>
<ng-content select="[slot=end]"></ng-content>

View File

@@ -1,7 +1,7 @@
<nav
*ngIf="{
open: sideNavService.open$ | async,
isOverlay: sideNavService.isOverlay$ | async
isOverlay: sideNavService.isOverlay$ | async,
} as data"
id="bit-side-nav"
class="tw-fixed md:tw-sticky tw-inset-y-0 tw-left-0 tw-z-30 tw-flex tw-h-screen tw-flex-col tw-overscroll-none tw-overflow-auto tw-bg-background-alt3 tw-outline-none"
@@ -10,7 +10,7 @@
variant === 'secondary' && {
'--color-text-alt2': 'var(--color-text-main)',
'--color-background-alt3': 'var(--color-secondary-100)',
'--color-background-alt4': 'var(--color-secondary-300)'
'--color-background-alt4': 'var(--color-secondary-300)',
}
"
[cdkTrapFocus]="data.isOverlay"

View File

@@ -9,7 +9,7 @@ import { Component, Input } from "@angular/core";
template: `
<section
[ngClass]="{
'tw-mb-6 md:tw-mb-12': !disableMargin
'tw-mb-6 md:tw-mb-12': !disableMargin,
}"
>
<ng-content></ng-content>

View File

@@ -42,7 +42,7 @@ export class CryptoServiceRandomizer implements Randomizer {
throw new Error("items must have at least one entry.");
}
const shuffled = options?.copy ?? true ? [...items] : items;
const shuffled = (options?.copy ?? true) ? [...items] : items;
for (let i = shuffled.length - 1; i > 0; i--) {
const j = await this.uniform(0, i);

View File

@@ -39,7 +39,7 @@ export class EmailCalculator {
* @returns an email address or `null` if the calculation fails.
*/
concatenate(username: string, domain: string) {
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : domain ?? "";
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : (domain ?? "");
if (emailDomain.length < 1) {
return null;
}

View File

@@ -47,7 +47,7 @@ export class EmailRandomizer {
* is empty, resolves to null instead.
*/
async randomAsciiCatchall(domain: string, options?: { length?: number }) {
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : domain ?? "";
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : (domain ?? "");
if (emailDomain.length < 1) {
return null;
}
@@ -75,7 +75,7 @@ export class EmailRandomizer {
domain: string,
options?: { numberOfWords?: number; words?: Array<string> },
) {
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : domain ?? "";
const emailDomain = domain?.startsWith("@") ? domain.substring(1, Infinity) : (domain ?? "");
if (emailDomain.length < 1) {
return null;
}

View File

@@ -90,7 +90,7 @@ export class PassphraseGeneratorOptionsEvaluator
const wordSeparator =
options.wordSeparator === ""
? ""
: options.wordSeparator?.[0] ?? DefaultPassphraseGenerationOptions.wordSeparator;
: (options.wordSeparator?.[0] ?? DefaultPassphraseGenerationOptions.wordSeparator);
return {
...options,

View File

@@ -32,11 +32,11 @@ export class EffUsernameGeneratorStrategy
// algorithm
async generate(options: EffUsernameGenerationOptions) {
const casing =
options.wordCapitalize ?? DefaultEffUsernameOptions.wordCapitalize
(options.wordCapitalize ?? DefaultEffUsernameOptions.wordCapitalize)
? "TitleCase"
: "lowercase";
const digits =
options.wordIncludeNumber ?? DefaultEffUsernameOptions.wordIncludeNumber
(options.wordIncludeNumber ?? DefaultEffUsernameOptions.wordIncludeNumber)
? UsernameDigits.enabled
: UsernameDigits.disabled;
const word = await this.randomizer.randomWords({ numberOfWords: 1, casing, digits });

View File

@@ -14,7 +14,7 @@
[formGroupName]="i"
class="tw-flex tw-p-3 -tw-mx-3 tw-gap-4 tw-bg-background tw-rounded-lg first:-tw-mt-3 last-of-type:tw-mb-3"
[ngClass]="{
'tw-items-center': field.value.type === FieldType.Boolean
'tw-items-center': field.value.type === FieldType.Boolean,
}"
[attr.data-testid]="field.value.name + '-entry'"
cdkDrag