Fix: display count on rule provider

This commit is contained in:
Dreamacro 2020-06-06 23:59:56 +08:00
parent 7be76d374a
commit fe608889d8
5 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,7 @@
.tag { .tag {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
height: 24px; height: 24px;
font-size: 12px; font-size: 12px;
padding: 0 12px; padding: 0 12px;

View File

@ -16,7 +16,7 @@ export function Provider (props: ProvidersProps) {
const { useTranslation, lang } = useI18n() const { useTranslation, lang } = useI18n()
const { provider } = props const { provider } = props
const { t } = useTranslation('Proxies') const { t } = useTranslation('Rules')
const { visible, hide, show } = useVisible() const { visible, hide, show } = useVisible()
@ -34,6 +34,7 @@ export function Provider (props: ProvidersProps) {
<span className="rule-provider-name">{ provider.name }</span> <span className="rule-provider-name">{ provider.name }</span>
<Tag>{ provider.vehicleType }</Tag> <Tag>{ provider.vehicleType }</Tag>
<Tag className="rule-provider-behavior">{ provider.behavior }</Tag> <Tag className="rule-provider-behavior">{ provider.behavior }</Tag>
<span className="rule-provider-update">{ `${t('ruleCount')}: ${provider.ruleCount}` }</span>
</div> </div>
<div className="rule-provider-header-part"> <div className="rule-provider-header-part">
{ {

View File

@ -29,7 +29,8 @@
} }
.rule-provider-behavior { .rule-provider-behavior {
margin-left: 12px; width: 80px;
margin: 0 20px 0 12px;
background-color: $color-primary-dark; background-color: $color-primary-dark;
color: #fff; color: #fff;
} }

View File

@ -43,7 +43,8 @@ export default {
Rules: { Rules: {
title: 'Rules', title: 'Rules',
providerTitle: 'Providers', providerTitle: 'Providers',
providerUpdateTime: 'Last updated at' providerUpdateTime: 'Last updated at',
ruleCount: 'Rule count'
}, },
Connections: { Connections: {
title: 'Connections', title: 'Connections',

View File

@ -43,7 +43,8 @@ export default {
Rules: { Rules: {
title: '规则', title: '规则',
providerTitle: '规则集', providerTitle: '规则集',
providerUpdateTime: '最后更新于' providerUpdateTime: '最后更新于',
ruleCount: '规则条数'
}, },
Connections: { Connections: {
title: '连接', title: '连接',