refactor ui components

This commit is contained in:
BuckarooBanzay 2023-03-28 13:47:45 +02:00 committed by Athozus
parent 9b2883030a
commit 1a0f0d02ff
No known key found for this signature in database
GPG key ID: B50895022E8484BF
13 changed files with 981 additions and 966 deletions

View file

@ -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()