mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
added trash box
This commit is contained in:
parent
7e9db02882
commit
be39e498d7
@ -10,6 +10,7 @@ const Messages = {
|
||||
sent: [],
|
||||
outbox: [],
|
||||
drafts: [],
|
||||
trash: [],
|
||||
load() {
|
||||
rs.rsJsonApiRequest('/rsMsgs/getMessageSummaries', {}, (data) => {
|
||||
Messages.all = data.msgList;
|
||||
@ -25,6 +26,9 @@ const Messages = {
|
||||
Messages.drafts = Messages.all.filter(
|
||||
(msg) => (msg.msgflags & util.RS_MSG_BOXMASK) === util.RS_MSG_DRAFTBOX
|
||||
);
|
||||
Messages.trash = Messages.all.filter(
|
||||
(msg) => (msg.msgflags & util.RS_MSG_BOXMASK) === util.RS_MSG_TRASH
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
@ -34,6 +38,7 @@ const sections = {
|
||||
outbox: require('mail/mail_outbox'),
|
||||
drafts: require('mail/mail_draftbox'),
|
||||
sent: require('mail/mail_sentbox'),
|
||||
trash: require('mail/mail_trashbox'),
|
||||
};
|
||||
const tagselect = {
|
||||
showval: 'Tags',
|
||||
|
||||
27
webui-src/app/mail/mail_trashbox.js
Normal file
27
webui-src/app/mail/mail_trashbox.js
Normal file
@ -0,0 +1,27 @@
|
||||
const m = require('mithril');
|
||||
const util = require('mail/mail_util');
|
||||
|
||||
const Layout = () => {
|
||||
return {
|
||||
view: (v) => [
|
||||
m('.widget', [
|
||||
m('h3', 'Trash'),
|
||||
m('hr'),
|
||||
m(
|
||||
util.Table,
|
||||
m(
|
||||
'tbody',
|
||||
v.attrs.list.map((msg) =>
|
||||
m(util.MessageSummary, {
|
||||
details: msg,
|
||||
category: 'trash',
|
||||
})
|
||||
)
|
||||
)
|
||||
),
|
||||
]),
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = Layout;
|
||||
@ -7,7 +7,7 @@ const RS_MSG_INBOX = 0x00;
|
||||
const RS_MSG_SENTBOX = 0x01;
|
||||
const RS_MSG_OUTBOX = 0x03;
|
||||
const RS_MSG_DRAFTBOX = 0x05;
|
||||
|
||||
const RS_MSG_TRASH = 0x000020;
|
||||
const RS_MSG_NEW = 0x10;
|
||||
const RS_MSG_UNREAD_BY_USER = 0x40;
|
||||
const RS_MSG_STAR = 0x200;
|
||||
@ -217,4 +217,5 @@ module.exports = {
|
||||
RS_MSG_NEW,
|
||||
RS_MSG_UNREAD_BY_USER,
|
||||
RS_MSG_STAR,
|
||||
RS_MSG_TRASH,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user