Skip to content

Commit

Permalink
refactor: Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Sep 10, 2024
1 parent d413a7d commit aaa0e4c
Show file tree
Hide file tree
Showing 45 changed files with 65 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'tw-bg-background-alt tw-border-transparent':
this.background === 'alt' && !pageContentScrolled(),
'tw-bg-background tw-border-secondary-300':
(this.background === 'alt' && pageContentScrolled()) || this.background === 'default',
(this.background === 'alt' && pageContentScrolled()) || this.background === 'default'
}"
>
<div class="tw-max-w-screen-sm tw-mx-auto tw-flex tw-justify-between tw-w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[ngClass]="{
'tw-invisible': loading || nonScrollable.childElementCount === 0,
'tw-border-secondary-300': scrolled(),
'tw-border-transparent': !scrolled(),
'tw-border-transparent': !scrolled()
}"
>
<ng-content select="[slot=above-scroll-area]"></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'background-color': backgroundColor,
color: 'white',
'text-align': 'center',
'font-weight': 'bold',
'font-weight': 'bold'
}"
>
{{ initials }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2 class="box-header">
class="box-content"
[ngStyle]="{
'margin-top.px':
cipher.type !== cipherType.Paper && cipher.type !== cipherType.Contact ? 0 : -15,
cipher.type !== cipherType.Paper && cipher.type !== cipherType.Contact ? 0 : -15
}"
>
<!-- Cozy customization end -->
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/tools/export.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ExportCommand {
// format is 'undefined' => Defaults to 'csv'
// Any other case => returns the options.format
const format =
password && options.format == "json" ? "encrypted_json" : (options.format ?? "csv");
password && options.format == "json" ? "encrypted_json" : options.format ?? "csv";

if (!this.isSupportedExportFormat(format)) {
return Response.badRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed(collectionsGrouping),
'bwi-angle-down': !isCollapsed(collectionsGrouping),
'bwi-angle-down': !isCollapsed(collectionsGrouping)
}"
></i>
&nbsp;{{ collectionsGrouping.name | i18n }}
Expand Down Expand Up @@ -42,7 +42,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed(c.node),
'bwi-angle-down': !isCollapsed(c.node),
'bwi-angle-down': !isCollapsed(c.node)
}"
></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed(foldersGrouping),
'bwi-angle-down': !isCollapsed(foldersGrouping),
'bwi-angle-down': !isCollapsed(foldersGrouping)
}"
></i>
&nbsp;{{ foldersGrouping.name | i18n }}
Expand All @@ -33,7 +33,7 @@ <h2>
<li
*ngFor="let f of folders"
[ngClass]="{
active: f.node.id === activeFilter.selectedFolderId && activeFilter.selectedFolder,
active: f.node.id === activeFilter.selectedFolderId && activeFilter.selectedFolder
}"
class="filter-option"
>
Expand All @@ -52,7 +52,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed(f.node),
'bwi-angle-down': !isCollapsed(f.node),
'bwi-angle-down': !isCollapsed(f.node)
}"
></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed,
'bwi-angle-down': !isCollapsed,
'bwi-angle-down': !isCollapsed
}"
></i>
</button>
Expand Down Expand Up @@ -74,7 +74,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed,
'bwi-angle-down': !isCollapsed,
'bwi-angle-down': !isCollapsed
}"
></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h2>
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': isCollapsed,
'bwi-angle-down': !isCollapsed,
'bwi-angle-down': !isCollapsed
}"
></i>
&nbsp;{{ typesNode.name | i18n }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
title="{{ 'customColor' | i18n }}"
[ngClass]="{
'!tw-outline-[3px] tw-outline-primary-600 hover:tw-outline-[3px] hover:tw-outline-primary-600':
customColorSelected,
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"
[style.background-color]="customColor$ | async"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
[organizationInfo]="{
name: orgInfoFormGroup.value.name,
email: orgInfoFormGroup.value.billingEmail,
type: trialOrganizationType,
type: trialOrganizationType
}"
[subscriptionProduct]="
product === ProductType.SecretsManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[organizationInfo]="{
name: formGroup.get('name').value,
email: formGroup.get('email').value,
type: productType,
type: productType
}"
[subscriptionProduct]="SubscriptionProduct.SecretsManager"
(steppedBack)="steppedBack()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2 class="tw-pb-4 tw-pl-4 tw-pt-5 tw-text-base tw-font-bold tw-uppercase">
[organizationInfo]="{
name: orgInfoFormGroup.get('name').value,
email: orgInfoFormGroup.get('email').value,
type: trialOrganizationType,
type: trialOrganizationType
}"
[subscriptionProduct]="SubscriptionProduct.PasswordManager"
(steppedBack)="previousStep()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[disabled]="disabled"
class="tw-flex tw-w-full tw-items-center tw-border-none tw-bg-transparent"
[ngClass]="{
'hover:tw-bg-secondary-100': !disabled && step.editable,
'hover:tw-bg-secondary-100': !disabled && step.editable
}"
[attr.aria-expanded]="selected"
>
Expand All @@ -16,7 +16,7 @@
[ngClass]="{
'tw-bg-primary-600 tw-text-contrast': selected,
'tw-bg-secondary-300 tw-text-main': !selected && !disabled && step.editable,
'tw-bg-transparent tw-text-muted': disabled,
'tw-bg-transparent tw-text-muted': disabled
}"
>
{{ stepNumber }}
Expand All @@ -30,13 +30,13 @@
<div
class="tw-txt-main tw-mt-3.5 tw-h-12 tw-text-left tw-leading-snug"
[ngClass]="{
'tw-font-bold': selected,
'tw-font-bold': selected
}"
>
<p
class="main-label text tw-mb-1 tw-text-main"
[ngClass]="{
'tw-mt-1': !step.subLabel,
'tw-mt-1': !step.subLabel
}"
>
{{ step.label }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="tw-inline-block tw-w-11/12 tw-pl-7"
[ngClass]="{
'tw-border-0 tw-border-l tw-border-solid tw-border-secondary-300': applyBorder,
'tw-pt-6': addSubLabelSpacing,
'tw-pt-6': addSubLabelSpacing
}"
>
<ng-content></ng-content>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/layouts/header/web-header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="-tw-m-6 tw-mb-3 tw-flex tw-flex-col tw-p-6"
[ngClass]="{
'tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300 tw-bg-background-alt tw-pb-0':
tabsContainer.childElementCount !== 0,
tabsContainer.childElementCount !== 0
}"
>
<div class="tw-flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<section
[ngStyle]="{
'--num-products': products.bento.length,
'grid-template-columns': 'repeat(min(var(--num-products,1),3),auto)',
'grid-template-columns': 'repeat(min(var(--num-products,1),3),auto)'
}"
class="tw-grid tw-gap-2"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<i class="bwi bwi-fw !tw-mr-4" [ngClass]="completed ? 'bwi-check tw-text-success' : icon"></i
><span
[ngClass]="{
'tw-text-primary-700 tw-line-through tw-decoration-primary-700 tw-opacity-50': completed,
'tw-text-primary-700 tw-line-through tw-decoration-primary-700 tw-opacity-50': completed
}"
>{{ title }}<i class="bwi bwi-angle-right tw-ml-1"></i
></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ <h1 class="modal-title" id="cipherAddEditTitle">{{ title }}</h1>
aria-hidden="true"
[ngClass]="{
'bwi-eye': !showCardNumber,
'bwi-eye-slash': showCardNumber,
'bwi-eye-slash': showCardNumber
}"
></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RoutedVaultFilterService implements OnDestroy {
collectionId: filter.collectionId ?? null,
folderId: filter.folderId ?? null,
organizationId:
filter.organizationIdParamType === "path" ? null : (filter.organizationId ?? null),
filter.organizationIdParamType === "path" ? null : filter.organizationId ?? null,
type: filter.type ?? null,
},
queryParamsHandling: "merge",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
>
<h3
[ngClass]="{
active: isAllVaultsSelected || isNodeSelected(headerNode),
active: isAllVaultsSelected || isNodeSelected(headerNode)
}"
>
&nbsp;{{ headerNode.node.name | i18n }}
Expand All @@ -44,7 +44,7 @@ <h3 *ngIf="!headerInfo.isSelectable" class="filter-title">
<li
*ngFor="let f of filters"
[ngClass]="{
active: isNodeSelected(f),
active: isNodeSelected(f)
}"
class="filter-option"
>
Expand All @@ -62,7 +62,7 @@ <h3 *ngIf="!headerInfo.isSelectable" class="filter-title">
class="bwi bwi-fw"
[ngClass]="{
'bwi-angle-right': isCollapsed(f.node),
'bwi-angle-down': !isCollapsed(f.node),
'bwi-angle-down': !isCollapsed(f.node)
}"
aria-hidden="true"
></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ <h3 class="mb-0 mr-2" id="customizations-header">
aria-hidden="true"
[ngClass]="{
'bwi-angle-right': !showOpenIdCustomizations,
'bwi-angle-down': showOpenIdCustomizations,
'bwi-angle-down': showOpenIdCustomizations
}"
></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h3 class="tw-text-2xl tw-font-bold tw-uppercase">{{ planCard.name }}</h3>
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ng-container
*ngIf="{
selectedRegion: selectedRegion$ | async,
selectedRegion: selectedRegion$ | async
} as data"
>
<div class="environment-selector-btn">
Expand Down
4 changes: 2 additions & 2 deletions libs/common/src/platform/services/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,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;
}
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/platform/state/derive-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/platform/state/key-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/platform/state/user-key-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tools/integration/integration-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class IntegrationContext<Settings extends object> {
options: { base64?: boolean; suffix?: string } = null,
): Settings extends ApiSettings ? string : never {
// normalize `token` then assert it has a value
let token = "token" in this.settings ? ((this.settings.token as string) ?? "") : "";
let token = "token" in this.settings ? (this.settings.token as string) ?? "" : "";
if (token === "") {
const error = this.i18n.t("forwaderInvalidToken", this.metadata.name);
throw error;
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tools/integration/rpc/rest-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class RestClient {
const message = parsed.message?.toString() ?? null;

// `false` signals no message found
const result = error && message ? `${error}: ${message}` : (error ?? message ?? false);
const result = error && message ? `${error}: ${message}` : error ?? message ?? false;

return result;
}
Expand Down
6 changes: 3 additions & 3 deletions libs/components/src/chip-select/chip-select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
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 -->
<button
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"
Expand All @@ -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()"
>
Expand Down
2 changes: 1 addition & 1 deletion libs/components/src/dialog/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 bitDialogTitleContainer bitTypography="h3" noMargin class="tw-mb-0 tw-trunca
'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>
Expand Down
Loading

0 comments on commit aaa0e4c

Please sign in to comment.