mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 22:54:00 +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 { LinkTo } from "@ember/routing";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
|
import { gt } from "truth-helpers";
|
||||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||||
import DButton from "discourse/components/d-button";
|
import DButton from "discourse/components/d-button";
|
||||||
import avatar from "discourse/helpers/avatar";
|
import avatar from "discourse/helpers/avatar";
|
||||||
|
@ -204,7 +205,12 @@ export default class IpLookup extends Component {
|
||||||
|
|
||||||
<dt class="other-accounts">
|
<dt class="other-accounts">
|
||||||
{{i18n "ip_lookup.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}}
|
{{#if this.otherAccounts}}
|
||||||
<DButton
|
<DButton
|
||||||
@action={{this.deleteOtherAccounts}}
|
@action={{this.deleteOtherAccounts}}
|
||||||
|
|
|
@ -472,7 +472,9 @@ $mobile-breakpoint: 700px;
|
||||||
.count {
|
.count {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-left: 0.25em;
|
margin-left: 0.25em;
|
||||||
color: var(--danger);
|
&.--nonzero {
|
||||||
|
color: var(--danger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user