small changes
This commit is contained in:
parent
e4cdc78e1f
commit
c3bc8d767e
|
@ -35,7 +35,7 @@
|
|||
|
||||
.gb_hidden_mail {
|
||||
display:inline-block;
|
||||
height:9.5pt;
|
||||
height:10pt;
|
||||
border-radius:4px;
|
||||
background:#666d65;
|
||||
transform: translateY(1px);
|
||||
|
|
|
@ -16,7 +16,7 @@ async function handler(req, res, next) {
|
|||
|
||||
const errors = req.query.error;
|
||||
|
||||
let sqldata = await Sequelize.Guestbook.findAll({
|
||||
const data = await Sequelize.Guestbook.findAll({
|
||||
where: {
|
||||
hidden: false
|
||||
},
|
||||
|
@ -24,13 +24,8 @@ async function handler(req, res, next) {
|
|||
['id', 'DESC']
|
||||
]
|
||||
});
|
||||
if (!sqldata) throw new Error('Failed to get guestbook entries');
|
||||
if (!data) throw new Error('Failed to get guestbook entries');
|
||||
|
||||
/*for (let i = 0; i != sqldata.length; i++) {
|
||||
data[sqldata[i].id] = sqldata[i];
|
||||
}*/
|
||||
|
||||
const data = sqldata;
|
||||
|
||||
res.send(await Helpers.ViewLoader.load('guestbook.pug', {
|
||||
current_route: req.originalUrl,
|
||||
|
|
|
@ -87,11 +87,11 @@ block content
|
|||
else
|
||||
table(class='gb_entries')
|
||||
each entry, i in data
|
||||
tr(id='gb_entry_' + id)
|
||||
tr(id='gb_entry_' + entry.id)
|
||||
td(width='20%' class='gb_sender_data')
|
||||
p(style='font-size:9pt')
|
||||
| ID:
|
||||
a(href='gb_entry_' + entry.id) ##{entry.id}
|
||||
a(href='#gb_entry_' + entry.id) ##{entry.id}
|
||||
br
|
||||
| Sender: #{entry.name}
|
||||
br
|
||||
|
@ -108,7 +108,7 @@ block content
|
|||
|
||||
if (ip == entry.ip && Math.floor(Date.now() / 1000) - entry.time <= (60 * 60 * 24))
|
||||
p(style='margin:0;padding:0;padding-bottom:12px')
|
||||
a(href='/guestbook/del/' + id class='gb_record_del_btn' title='you can delete your own messages') delete
|
||||
a(href='/guestbook/del/' + entry.id class='gb_record_del_btn' title='you can delete your own messages') delete
|
||||
td(width='80%' class='gb_entry_text')
|
||||
p(class='gb_entry_text_title') Message:
|
||||
p(style='margin:0;padding:0;font-size:10pt').
|
||||
|
|
Loading…
Reference in New Issue