in admin pages, make the literal instruction text on the dnscheck page visible, and set a max-width for easier readability

This commit is contained in:
Mechiel Lukkien 2023-08-23 15:10:02 +02:00
parent b3dd4a55c3
commit da9f1d9d0d
No known key found for this signature in database
2 changed files with 6 additions and 5 deletions

View file

@ -13,7 +13,7 @@ h1 { font-size: 1.2rem; }
h2 { font-size: 1.1rem; } h2 { font-size: 1.1rem; }
h3, h4 { font-size: 1rem; } h3, h4 { font-size: 1rem; }
ul { padding-left: 1rem; } ul { padding-left: 1rem; }
.literal { background-color: #fdfdfd; padding: .5em 1em; border: 1px solid #eee; border-radius: 4px; white-space: pre-wrap; font-family: monospace; font-size: 15px; tab-size: 4; } .literal { background-color: #eee; padding: .5em 1em; border: 1px solid #eee; border-radius: 4px; white-space: pre-wrap; font-family: monospace; font-size: 15px; tab-size: 4; }
table td, table th { padding: .2em .5em; } table td, table th { padding: .2em .5em; }
table > tbody > tr:nth-child(odd) { background-color: #f8f8f8; } table > tbody > tr:nth-child(odd) { background-color: #f8f8f8; }
.text { max-width: 50em; } .text { max-width: 50em; }

View file

@ -13,7 +13,7 @@ h1 { font-size: 1.2rem; }
h2 { font-size: 1.1rem; } h2 { font-size: 1.1rem; }
h3, h4 { font-size: 1rem; } h3, h4 { font-size: 1rem; }
ul { padding-left: 1rem; } ul { padding-left: 1rem; }
.literal { background-color: #fdfdfd; padding: .5em 1em; border: 1px solid #eee; border-radius: 4px; white-space: pre-wrap; font-family: monospace; font-size: 15px; tab-size: 4; } .literal { background-color: #eee; padding: .5em 1em; margin: 1ex 0; border: 1px solid #eee; border-radius: 4px; white-space: pre-wrap; font-family: monospace; font-size: 15px; tab-size: 4; }
table td, table th { padding: .2em .5em; } table td, table th { padding: .2em .5em; }
table table td, table table th { padding: 0 0.1em; } table table td, table table th { padding: 0 0.1em; }
table.long >tbody >tr >td { padding: 1em .5em; } table.long >tbody >tr >td { padding: 1em .5em; }
@ -856,10 +856,11 @@ const domainDNSRecords = async (d) => {
'DNS Records', 'DNS Records',
), ),
dom.h1('Required DNS records'), dom.h1('Required DNS records'),
dom('pre.literal', records.join('\n')), dom('pre.literal', style({maxWidth: '70em'}), records.join('\n')),
dom.br(), dom.br(),
) )
} }
const domainDNSCheck = async (d) => { const domainDNSCheck = async (d) => {
const [checks, dnsdomain] = await Promise.all([ const [checks, dnsdomain] = await Promise.all([
api.CheckDomain(d), api.CheckDomain(d),
@ -881,7 +882,7 @@ const domainDNSCheck = async (d) => {
instructions = dom.div(style({margin: '.5ex 0'})) instructions = dom.div(style({margin: '.5ex 0'}))
const instrs = [ const instrs = [
r.Instructions.map(s => [ r.Instructions.map(s => [
dom('pre.literal', style({display: 'inline-block'}), s), dom('pre.literal', style({display: 'inline-block', maxWidth: '60em'}), s),
dom.br(), dom.br(),
]), ]),
] ]
@ -951,7 +952,7 @@ const domainDNSCheck = async (d) => {
const detailsMTASTS = empty(checks.MTASTS.CNAMEs) && !checks.MTASTS.TXT && !checks.MTASTS.PolicyText ? [] : [ const detailsMTASTS = empty(checks.MTASTS.CNAMEs) && !checks.MTASTS.TXT && !checks.MTASTS.PolicyText ? [] : [
dom.div('CNAMEs followed: ' + (checks.MTASTS.CNAMEs.join(', ') || '(none)')), dom.div('CNAMEs followed: ' + (checks.MTASTS.CNAMEs.join(', ') || '(none)')),
!checks.MTASTS.TXT ? [] : dom.div('MTA-STS record: ' + checks.MTASTS.TXT), !checks.MTASTS.TXT ? [] : dom.div('MTA-STS record: ' + checks.MTASTS.TXT),
!checks.MTASTS.PolicyText ? [] : dom.div('MTA-STS policy: ', dom('pre.literal', checks.MTASTS.PolicyText)), !checks.MTASTS.PolicyText ? [] : dom.div('MTA-STS policy: ', dom('pre.literal', style({maxWidth: '60em'}), checks.MTASTS.PolicyText)),
] ]
const detailsSRVConf = !Object.entries(checks.SRVConf.SRVs) ? [] : [ const detailsSRVConf = !Object.entries(checks.SRVConf.SRVs) ? [] : [
dom.table( dom.table(