mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-06 14:40:30 -04:00
refactor ui components
This commit is contained in:
parent
9b2883030a
commit
1a0f0d02ff
13 changed files with 981 additions and 966 deletions
36
init.lua
36
init.lua
|
@ -10,9 +10,32 @@ mail = {
|
|||
contactsdir = minetest.get_worldpath().."/mails/contacts",
|
||||
|
||||
-- mod storage
|
||||
storage = minetest.get_mod_storage()
|
||||
storage = minetest.get_mod_storage(),
|
||||
|
||||
-- ui theme prepend
|
||||
theme = "",
|
||||
|
||||
-- ui forms
|
||||
ui = {},
|
||||
|
||||
-- per-user ephemeral data
|
||||
selected_idxs = {
|
||||
inbox = {},
|
||||
sent = {},
|
||||
contacts = {},
|
||||
maillists = {},
|
||||
to = {},
|
||||
cc = {},
|
||||
bcc = {},
|
||||
boxtab = {}
|
||||
},
|
||||
|
||||
message_drafts = {}
|
||||
}
|
||||
|
||||
if minetest.get_modpath("default") then
|
||||
mail.theme = default.gui_bg .. default.gui_bg_img
|
||||
end
|
||||
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
dofile(MP .. "/util/normalize.lua")
|
||||
|
@ -23,6 +46,17 @@ dofile(MP .. "/storage.lua")
|
|||
dofile(MP .. "/api.lua")
|
||||
dofile(MP .. "/gui.lua")
|
||||
dofile(MP .. "/onjoin.lua")
|
||||
dofile(MP .. "/ui/mail.lua")
|
||||
dofile(MP .. "/ui/inbox.lua")
|
||||
dofile(MP .. "/ui/outbox.lua")
|
||||
dofile(MP .. "/ui/message.lua")
|
||||
dofile(MP .. "/ui/contacts.lua")
|
||||
dofile(MP .. "/ui/edit_contact.lua")
|
||||
dofile(MP .. "/ui/select_contact.lua")
|
||||
dofile(MP .. "/ui/maillists.lua")
|
||||
dofile(MP .. "/ui/edit_maillists.lua")
|
||||
dofile(MP .. "/ui/compose.lua")
|
||||
dofile(MP .. "/ui/about.lua")
|
||||
|
||||
-- migrate storage
|
||||
mail.migrate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue