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 {
display: flex;
align-items: center;
justify-content: center;
height: 24px;
font-size: 12px;
padding: 0 12px;

View File

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

View File

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

View File

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

View File

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