mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 18:50:49 +08:00
feat(ui): show empty state for payload rules editor
This commit is contained in:
@@ -711,6 +711,20 @@ function PayloadFilterRulesEditor({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
{rules.length === 0 && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
border: '1px dashed var(--border-color)',
|
||||||
|
borderRadius: 12,
|
||||||
|
padding: 16,
|
||||||
|
color: 'var(--text-secondary)',
|
||||||
|
textAlign: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('config_management.visual.payload_rules.no_rules')}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
<Button variant="secondary" size="sm" onClick={addRule} disabled={disabled}>
|
<Button variant="secondary" size="sm" onClick={addRule} disabled={disabled}>
|
||||||
{t('config_management.visual.payload_rules.add_rule')}
|
{t('config_management.visual.payload_rules.add_rule')}
|
||||||
|
|||||||
Reference in New Issue
Block a user