mirror of
https://github.com/bitwarden/browser
synced 2026-02-13 06:54:07 +00:00
consolidate @if statements, use @else where appropriate
This commit is contained in:
@@ -16,19 +16,15 @@
|
||||
<div class="tw-mt-4">
|
||||
@if (error) {
|
||||
<p>{{ "reportError" | i18n }}...</p>
|
||||
}
|
||||
@if (!error) {
|
||||
} @else {
|
||||
@if (!breachedAccounts.length) {
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "breachUsernameNotFound" | i18n: checkedUsername }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (breachedAccounts.length) {
|
||||
} @else {
|
||||
<bit-callout type="danger" title="{{ 'breachFound' | i18n }}">
|
||||
{{ "breachUsernameFound" | i18n: checkedUsername : breachedAccounts.length }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (breachedAccounts.length) {
|
||||
<ul
|
||||
class="tw-list-none tw-flex-col tw-divide-x-0 tw-divide-y tw-divide-solid tw-divide-secondary-300 tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-p-0"
|
||||
>
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "noExposedPasswords" | i18n }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (ciphers.length) {
|
||||
} @else {
|
||||
<bit-callout
|
||||
type="danger"
|
||||
title="{{ 'exposedPasswordsFound' | i18n }}"
|
||||
|
||||
@@ -11,15 +11,13 @@
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (hasLoaded) {
|
||||
} @else {
|
||||
<div class="tw-mt-4">
|
||||
@if (!ciphers.length) {
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "noInactive2fa" | i18n }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (ciphers.length) {
|
||||
} @else {
|
||||
<bit-callout type="danger" title="{{ 'inactive2faFound' | i18n }}">
|
||||
{{ "inactive2faFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }}
|
||||
</bit-callout>
|
||||
|
||||
@@ -11,15 +11,13 @@
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (hasLoaded) {
|
||||
} @else {
|
||||
<div class="tw-mt-4">
|
||||
@if (!ciphers.length) {
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "noReusedPasswords" | i18n }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (ciphers.length) {
|
||||
} @else {
|
||||
<bit-callout type="danger" title="{{ 'reusedPasswordsFound' | i18n }}">
|
||||
{{ "reusedPasswordsFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }}
|
||||
</bit-callout>
|
||||
|
||||
@@ -11,15 +11,13 @@
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (hasLoaded) {
|
||||
} @else {
|
||||
<div class="tw-mt-4">
|
||||
@if (!ciphers.length) {
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "noUnsecuredWebsites" | i18n }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (ciphers.length) {
|
||||
} @else {
|
||||
<bit-callout type="danger" title="{{ 'unsecuredWebsitesFound' | i18n }}">
|
||||
{{ "unsecuredWebsitesFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }}
|
||||
</bit-callout>
|
||||
|
||||
@@ -11,15 +11,13 @@
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (hasLoaded) {
|
||||
} @else {
|
||||
<div class="tw-mt-4">
|
||||
@if (!ciphers.length) {
|
||||
<bit-callout type="success" title="{{ 'goodNews' | i18n }}">
|
||||
{{ "noWeakPasswords" | i18n }}
|
||||
</bit-callout>
|
||||
}
|
||||
@if (ciphers.length) {
|
||||
} @else {
|
||||
<bit-callout type="danger" title="{{ 'weakPasswordsFound' | i18n }}">
|
||||
{{ "weakPasswordsFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }}
|
||||
</bit-callout>
|
||||
|
||||
Reference in New Issue
Block a user