mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-05 22:20:37 -04:00
Add trash (#100)
* Add trash * Add break at end of deleting loop * Show trash tab only when trashing enabled * Update translations
This commit is contained in:
parent
de07f6b24b
commit
2e106e3df7
17 changed files with 454 additions and 201 deletions
|
@ -1,22 +1,28 @@
|
|||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
|
||||
local drafts_formspec = "size[8.5,10;]" .. mail.theme .. [[
|
||||
tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Outbox").. "," .. S("Drafts") .. [[;3;false;false]
|
||||
|
||||
button[6,0.10;2.5,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.95;2.5,0.5;edit;]] .. S("Edit") .. [[]
|
||||
button[6,1.70;2.5,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,6.8;2.5,0.5;contacts;]] .. S("Contacts") .. [[]
|
||||
button[6,7.6;2.5,0.5;maillists;]] .. S("Mail lists") .. [[]
|
||||
button[6,8.7;2.5,0.5;options;]] .. S("Options") .. [[]
|
||||
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
||||
|
||||
tablecolumns[color;text;text]
|
||||
table[0,0.7;5.75,9.35;drafts;#999,]] .. S("To") .. "," .. S("Subject")
|
||||
|
||||
|
||||
function mail.show_drafts(name)
|
||||
local trash_tab = ""
|
||||
if mail.get_setting(name, "trash_move_enable") then
|
||||
trash_tab = "," .. S("Trash")
|
||||
end
|
||||
|
||||
local drafts_formspec = "size[8.5,10;]" .. mail.theme .. [[
|
||||
tabheader[0.3,1;boxtab;]] ..
|
||||
S("Inbox") .. "," .. S("Outbox").. "," .. S("Drafts") .. trash_tab .. [[;3;false;false]
|
||||
|
||||
button[6,0.10;2.5,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.95;2.5,0.5;edit;]] .. S("Edit") .. [[]
|
||||
button[6,1.70;2.5,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,6.8;2.5,0.5;contacts;]] .. S("Contacts") .. [[]
|
||||
button[6,7.6;2.5,0.5;maillists;]] .. S("Mail lists") .. [[]
|
||||
button[6,8.7;2.5,0.5;options;]] .. S("Options") .. [[]
|
||||
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
||||
|
||||
tablecolumns[color;text;text]
|
||||
table[0,0.7;5.75,9.35;drafts;#999,]] .. S("To") .. "," .. S("Subject")
|
||||
|
||||
local formspec = { drafts_formspec }
|
||||
local entry = mail.get_storage_entry(name)
|
||||
local messages = entry.drafts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue