improve linter info popup

* show rule id so the user can configure it
* add "configure" button to show the linter config UI
* add margins between items
This commit is contained in:
tophf 2021-02-09 09:36:34 +03:00
parent 1746235d0d
commit 2a4e55dfec
2 changed files with 10 additions and 3 deletions

View File

@ -729,6 +729,12 @@ body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-high
#help-popup .rules { #help-popup .rules {
padding: 0 15px; padding: 0 15px;
} }
#help-popup .rules li {
padding-top: .5em;
}
#help-popup .rules p {
margin: .25em 0;
}
#help-popup button { #help-popup button {
margin-right: 3px; margin-right: 3px;
} }

View File

@ -74,9 +74,9 @@
const rule = RULES.csslint.find(rule => rule.id === ruleID); const rule = RULES.csslint.find(rule => rule.id === ruleID);
return rule && return rule &&
$create('li', [ $create('li', [
$create('b', $createLink(rule.url || baseUrl, rule.name)), $create('b', ruleID + ': '),
$create('br'), rule.url ? $createLink(`"${rule.url}"`, rule.name) : $create('span', `"${rule.name}"`),
rule.desc, $create('p', rule.desc),
]); ]);
}; };
} else { } else {
@ -91,6 +91,7 @@
$create([ $create([
header[0], headerLink, header[1], header[0], headerLink, header[1],
$create('ul.rules', [...activeRules].map(template)), $create('ul.rules', [...activeRules].map(template)),
$create('button', {onclick: linterMan.showLintConfig}, t('configureStyle')),
])); ]));
}; };