Add extra info for publish and search
This commit is contained in:
parent
f9e22ae2a5
commit
7cdf74c558
|
@ -1,10 +1,13 @@
|
|||
'use strict'
|
||||
|
||||
const {
|
||||
a,
|
||||
button,
|
||||
form,
|
||||
label,
|
||||
section,
|
||||
header,
|
||||
strong,
|
||||
textarea
|
||||
} = require('hyperaxe')
|
||||
const template = require('./components/template')
|
||||
|
@ -17,7 +20,16 @@ module.exports = ({ messages, prefix = null }) => {
|
|||
prefix,
|
||||
section(
|
||||
form({ action: publishForm, method: 'post' },
|
||||
label({ for: 'text' }, 'Publish a public message (cannot be edited or deleted)'),
|
||||
header(strong('Publish')),
|
||||
label(
|
||||
{ for: 'text' },
|
||||
'Write a new message in ',
|
||||
a({
|
||||
href: 'https://commonmark.org/help/',
|
||||
target: '_blank'
|
||||
}, 'Markdown'),
|
||||
'. Messages cannot be edited or deleted.'
|
||||
),
|
||||
textarea({ required: true, name: 'text' }),
|
||||
button({ type: 'submit' }, 'submit')
|
||||
)
|
||||
|
|
|
@ -7,13 +7,16 @@ const {
|
|||
input,
|
||||
button,
|
||||
label,
|
||||
section
|
||||
section,
|
||||
strong,
|
||||
header
|
||||
} = require('hyperaxe')
|
||||
|
||||
module.exports = ({ messages, query }) => template(
|
||||
section(
|
||||
form({ action: '/search', method: 'get' },
|
||||
label({ for: 'query' }, 'Search for messages that contain some word(s)'),
|
||||
header(strong('Search')),
|
||||
label({ for: 'query' }, 'Add word(s) to look for in downloaded messages.'),
|
||||
input({ required: true, type: 'search', name: 'query', value: query }),
|
||||
button({
|
||||
type: 'submit'
|
||||
|
|
Loading…
Reference in New Issue