mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 13:42:45 +08:00
UX: only show red count in IP lookup when greater than 0 (#30584)
This commit is contained in:
parent
78e8316cf0
commit
1ae341fa38
|
@ -4,6 +4,7 @@ import { action } from "@ember/object";
|
|||
import { LinkTo } from "@ember/routing";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { gt } from "truth-helpers";
|
||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import avatar from "discourse/helpers/avatar";
|
||||
|
@ -204,7 +205,12 @@ export default class IpLookup extends Component {
|
|||
|
||||
<dt class="other-accounts">
|
||||
{{i18n "ip_lookup.other_accounts"}}
|
||||
<span class="count">{{this.totalOthersWithSameIP}}</span>
|
||||
<span
|
||||
class="count
|
||||
{{if (gt this.totalOthersWithSameIP 0) '--nonzero'}}"
|
||||
>
|
||||
{{this.totalOthersWithSameIP}}
|
||||
</span>
|
||||
{{#if this.otherAccounts}}
|
||||
<DButton
|
||||
@action={{this.deleteOtherAccounts}}
|
||||
|
|
|
@ -472,7 +472,9 @@ $mobile-breakpoint: 700px;
|
|||
.count {
|
||||
font-weight: bold;
|
||||
margin-left: 0.25em;
|
||||
color: var(--danger);
|
||||
&.--nonzero {
|
||||
color: var(--danger);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user