Add: config dialog heading - feedback link

This commit is contained in:
eight 2017-10-15 03:03:01 +08:00
parent 7c2248933a
commit c1d2857953
3 changed files with 26 additions and 3 deletions

View File

@ -301,6 +301,10 @@
"message": "Support",
"description": "Label for the external link to style's support site"
},
"externalFeedback": {
"message": "Feedback",
"description": "Label for the external link to send feedback for the style"
},
"externalUsercssDocument": {
"message": "Documentation for Usercss",
"description": "Label for the external link to usercss documentation"

View File

@ -1,4 +1,4 @@
/* global usercss messageBox */
/* global usercss messageBox makeLink */
'use strict';
@ -7,9 +7,22 @@ function configDialog(style) {
const form = buildConfigForm();
return messageBox({
title: style.name,
title: `${style.name} v${style.usercssData.version}`,
className: 'config-dialog',
contents: form.el,
contents: [
$element({
className: 'config-heading',
appendChild: style.usercssData.supportURL && makeLink({
className: 'external-support',
href: style.usercssData.supportURL,
textContent: t('externalFeedback')
})
}),
$element({
className: 'config-body',
appendChild: form.el
})
],
buttons: [
t('confirmSave'),
{

View File

@ -653,6 +653,12 @@ fieldset > *:not(legend) {
}
/* config dialog */
.config-dialog .config-heading {
float: right;
margin: -1.25rem 0 0 0;
font-size: 0.9em;
}
.config-dialog label {
display: flex;
padding: .75em 0;