Compare commits
3 Commits
ae870fb601
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f785e7defc | |||
| 742aa4d2fc | |||
| 9ab3621658 |
@@ -29,7 +29,7 @@ app.get('/api/messages', async (req, res) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const [rows] = await db.execute(
|
const [rows] = await db.execute(
|
||||||
'SELECT id, sender, recipient, subject, body, received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC',
|
'SELECT id, sender, recipient, subject, body, CAST(received_at AS CHAR) as received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC',
|
||||||
[`%${recipient}%`]
|
[`%${recipient}%`]
|
||||||
);
|
);
|
||||||
res.json(rows);
|
res.json(rows);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const messages = {
|
|||||||
selectMail: '请从选择一封邮件查看',
|
selectMail: '请从选择一封邮件查看',
|
||||||
from: '发件人',
|
from: '发件人',
|
||||||
to: '收件人',
|
to: '收件人',
|
||||||
|
received_at: '收件时间',
|
||||||
attachments: '附件',
|
attachments: '附件',
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
clearInbox: '清空收件箱',
|
clearInbox: '清空收件箱',
|
||||||
@@ -68,6 +69,7 @@ const messages = {
|
|||||||
selectMail: 'Please select an email to view',
|
selectMail: 'Please select an email to view',
|
||||||
from: 'From',
|
from: 'From',
|
||||||
to: 'To',
|
to: 'To',
|
||||||
|
received_at: 'Received At',
|
||||||
attachments: 'Attachments',
|
attachments: 'Attachments',
|
||||||
delete: 'Delete',
|
delete: 'Delete',
|
||||||
clearInbox: 'Clear Inbox',
|
clearInbox: 'Clear Inbox',
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<h3>{{ selectedMessage.subject }}</h3>
|
<h3>{{ selectedMessage.subject }}</h3>
|
||||||
<p class="from-line"><strong>{{ $t('home.from') }}:</strong> {{ selectedMessage.sender }}</p>
|
<p class="from-line"><strong>{{ $t('home.from') }}:</strong> {{ selectedMessage.sender }}</p>
|
||||||
<p><strong>{{ $t('home.to') }}:</strong> {{ selectedMessage.recipient }}</p>
|
<p><strong>{{ $t('home.to') }}:</strong> {{ selectedMessage.recipient }}</p>
|
||||||
|
<p><strong>{{ $t('home.received_at') }}:</strong> {{ selectedMessage.received_at }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<button @click="deleteMessage(selectedMessage.id)" :title="$t('home.delete')">
|
<button @click="deleteMessage(selectedMessage.id)" :title="$t('home.delete')">
|
||||||
|
|||||||
BIN
sample.png
BIN
sample.png
Binary file not shown.
|
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 103 KiB |
Reference in New Issue
Block a user