93 Commits

Author SHA1 Message Date
Athozus
31645f263b
Fix #93 (thanks to whosit) 2023-06-16 17:39:10 +02:00
Athozus
2e106e3df7
Add trash (#100)
* Add trash

* Add break at end of deleting loop

* Show trash tab only when trashing enabled

* Update translations
2023-06-15 19:28:04 +02:00
Athozus
fab6f1a1e5
Fix long strings 2023-06-04 15:49:31 +02:00
Athozus
660d460af2
Make get_setting outside loop (performance) 2023-06-04 15:45:50 +02:00
Athozus
c655ff32e2
Fix drafts deleting/duplicating (#96) 2023-06-04 15:45:50 +02:00
Athozus
7822ff3038
Replace sent by outbox (consistency with inbox) 2023-06-04 15:45:49 +02:00
Athozus
869cc2bbc3
Show number of results (x of x' selected) 2023-06-04 15:45:49 +02:00
Athozus
9679251249
Remove unnecessary condition
On (un)select all, both unselect and select start with the same block, then it is better to remove conditions that reduce performance and aren't useful.
2023-05-23 17:49:17 +02:00
Athozus
f8ace25104
Remove duplicated variable 2023-05-20 20:29:00 +02:00
BuckarooBanzay
02853fc3d0 deploy workaround for #84 2023-05-17 16:16:42 +02:00
Athozus
2f01739d35
Add simplified Chinese translation (TheTrueBeginner) 2023-05-07 12:29:33 +02:00
Athozus
955f7d123f
Add sound notification (#86)
* Add sound notification

* Change sound

Update translations
2023-05-06 21:30:18 +02:00
Athozus
a79ebd94b8
Add Brazilian Portuguese (APercy) 2023-05-06 15:46:21 +02:00
Athozus
f70ce537a7
Add Spanish translation (Chache) 2023-05-05 23:28:32 +02:00
Athozus
5e3cfedc5e
Translate formatted strings 2023-05-05 16:05:07 +02:00
Athozus
95ab299016
Fix strings (translations and checks) 2023-05-05 13:13:09 +02:00
Athozus
720029a73e
Add settings (#85)
* Add settings

* Fix luacheck

* Fix unupdatable sorting fields values (settings)

* Better settings names

* Better sort settings behaviour

* Rework set_setting()

* Rework settings storage

* Better get sorting filters (inbox/outbox)

* Fix reseting/saving settings
2023-05-05 11:38:19 +02:00
Athozus
a8632255b3
Update contributors & version (1.1.4) 2023-05-02 15:57:57 +02:00
Athozus
c670d48622
Update selection list after an action (fix #80, #81, #83) 2023-05-02 10:42:23 +02:00
imre84
ec92aaba05
crash fixes (#82) 2023-04-30 23:19:22 +03:00
Athozus
7449aaca52
Message reply fixes (#78)
* Fix reply buttons in message list

* Give a default boxtab value (fix trivial issues)
2023-04-26 12:11:27 +02:00
Athozus
1a84c66346
Update about.lua 2023-04-21 23:43:47 +02:00
Athozus
fc90443952
Fix message infos (#75)
* Fix weird showing of message informations in outbox.lua

* Fix reply button on message view
2023-04-21 23:24:52 +02:00
Athozus
2290c2838e
Fix wrong message view in outbox 2023-04-20 08:47:59 +02:00
Athozus
17d4c2e441 Fix re-open of message view
After sending a message from drafts and closed the formspec, at next  call.
2023-04-15 22:10:45 +02:00
Athozus
7e17ff4805 Fix lag with multiple selection action (#69)
Reduce significantly time of action on several messages (20 sec to less than 0.5) (#69)
2023-04-15 22:10:45 +02:00
Athozus
79d5ad803e
1.1.x (#68)
* Fix close button which makes the formspec blinking (#65)

* Fix header click + use them as sorting (#66)

* Abort checking messages when clicking on a header row (indexing a nil value)

* Use headers clicks to change sorting

* Fix oversized selected number #67  (#67)

* about.lua to 1.1.1
2023-04-15 12:54:12 +02:00
Athozus
83e451d4c8
Update about (#62) 2023-04-12 17:16:44 +02:00
Athozus
191e511a05
Add multiple selection (#60)
* Add multiple selection

* Fix wrong messages issues

* Update translations

* Mix colors for unread/cc in inbox with selected green

* Fix duplicates when clicking on select all with already one selected, and add the number of selected items

* Fixes

* Remove old translations files

* Fix filter priority
2023-04-12 17:08:34 +02:00
SX
67bda9a788
Simplify sorting and make it more readable (#58)
* Simplify sorting and make it more readable

* Make sorter local

* Fix sorters dropdowns go back to default

* Fix luacheck

* Move sorting dropdown values to selected_idxs

* Show previous sorters when going back from message/contacts/...

* Use shallow copy instead of original table

* Open mail interface with previous tab/dropdowns

* Rework mail.sort_messages

* Combine filter and sort, make filtering safe

* Remove checks and logging from sorters

---------

Co-authored-by: Athozus <athozus@gmail.com>
2023-04-10 15:16:23 +03:00
Athozus
da05b5d108
Message filters/sorters (#56)
* Add sorters for inbox/outbox

* Add ascending/descending, fix selection issue

* Add filters

* Update translations

* Fix UI

* Fix luacheck

* Fix fields disappearing after clicking on tabs/buttons

* Fix luacheck (2)

* Fix first message not sorted correctly
2023-04-07 10:19:30 +02:00
Athozus
def93bdd0f
Better about page (#55)
* Better layout for about page

* Move version label

* Fix layout/labels
2023-04-03 20:12:42 +02:00
Athozus
474d2b76e1
Update HUD in mail.mark_read 2023-04-03 16:40:22 +02:00
Athozus
0f3499f8bc
HUD in message view 2023-04-03 16:36:55 +02:00
Athozus
e4716b432a
Update HUD when marking read in inbox list 2023-04-03 16:34:44 +02:00
Athozus
9238029dd8
Fix blank messages (#54)
* Fix blank messages : store as a draft if it is invalid

* Fix line too long luacheck

* Fix duplication of id variable (luacheck)
2023-04-02 19:00:53 +02:00
Athozus
c94c82e5c1
Fix permanent HUD (#53)
Fix HUD staying there even you had read the message
2023-04-02 18:40:01 +02:00
Athozus
418cda1adc
Fix maillists issues (#49)
* Fix maillist deletion

* Fix duplicating of maillist while changing its name

* Permit sub-lists

* Fix messages with no mailing lists
2023-04-02 10:37:58 +02:00
BuckarooBanzay
af03f9439b declare the translator in every module instead of a global 2023-03-31 18:12:48 +02:00
Athozus
4d4fd90eee
Minor fixes (#34)
* Minor fixes

* Security fix

* Minor button fix
2023-03-31 18:08:51 +02:00
Athozus
0ea3777b51
Implement drafts (#31)
* Add drafts

* Update translations

* Fix luacheck

* Fix luacheck (2)
2023-03-31 17:14:52 +02:00
Athozus
eae547b2f7
Add internationalization (and French translation) (#30)
* Add translation tags

* Add translating template.txt

* Add French translation

* Rework buttons size to fix UI due to big translations

* Add translations for selecting contacts
2023-03-29 19:23:16 +02:00
Athozus
b3e0c158f7
View sent messages (new database, add maillists) (#26)
* Add tabheader & sent formspec

* Add show_sent function and show sent messages

* Remove comment on selected_idxs test (show_sent)

* Add variable to keep the previous tab instead of going back to the first one

* Remove index variable verification on mark read/unread buttons since they are necessarily clicked on inbox view

* Resize messages table to be aligned with close button at the bottom

* Show date time (#27)

* Show date in message reading

* Fix wrong registered dates

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Rework header layout to add better space for date

---------

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Add insertion of messages into global storage mail.messages.json

* Receive player messages from global storage

* Add automatic generation of status for a new message (unread)

* Mark read/unread/delete a message

* Fix messages loading

* Show every message received/sent via specific functions

* Use global contacts functions and reconfigure add/remove functions

* Create mail lists formspec based on contacts

* Add deleting contact

* Add ability to create mail lists

* Fix inability to edit contact

* Rework on editing/deletion of contacts/maillists

* Add at symbol as prefix on maillists view

* Add ability to choose default status (to/cc/bcc)

Signed-off-by: Athozus <athozus@gmail.com>

* Add ability to add multiples players and choose their default status (to/cc/bcc)

* Add ability to use maillist in messages and receive messages from them

* Fix repetition of code causing a crash

* Avoid multiples occurences of the same messages due to player both in maillist and receivers

* Fix selected indexes for inbox/sent

Now separated, fixed show_message() func selection of id from table dcl/read btn

* Fix many issues related to maillists

Notably : edit, delete, selection, creation, registration of players

* Set up database version v3 and its migration from v2

+ Check versions to choose v1->v2 or v2->v3

* Fix mtt.lua

Due to old function getMessages(), replaced by getPlayerInboxMessages()

* Add 10 seconds security to mtt.lua

* Fix migrate.lua non-declared variable

* Send msg table with string keys in mtt

* Better log messages

* Add message check

* Fix mtt crash

* Better syntax in storage.lua

* Fix bcc forgotten in mail.send()

* Fix mtt issue

* Better compatibility for messages storage

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Replace mail.split by builtin func

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Use builtin split func

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Use builtin split func in storage.lua

* re-add mtt if

* luacheck on PR

* add check for an ancient issue with missing `to` field

* Fix luacheck on storage.lua

* Fix luacheck warnings in migrate.lua

* Fix luacheck warnings in gui.lua

* Fix luacheck (too long lines) in storage.lua

* Unused loop values in migrate.lua

* Whitespace line in gui.lua

* Whitespace line (init.lua)

* Whitespace line (api.lua)

* Significantly improve maillist behaviour

Replace maillist by its players when sending a message
List of players separated by ,
Avoid doublons when editing more than 2 times a maillist

* Fix luacheck

* Fix table insertions at first index when no needed

* Use funcs

* Do not add maillist as a new contact when sending a mail

* Fix removing elements from tables

* Check maillists not added in contacts

* storage rewrite wip

* storage format docs

* refactor ui components

* show_compose cleanup

* remove unused channel.lua

* error -> err

* status refactoring

* contacts refactoring

* maillist refactoring

* docs

* tests

* fix some issues

* re-enable migrations

* contributors

* prefix mail entries in the mod storage

* internalize old mail-paths to migration module

* add v1 and v2 player db examples and migration test

* Ui improvements & fixes

Move events code (if fields.x then) to events.lua (instead of inbox.lua), fix tab selection when going backward

* Show most recent messages at first (outbox)

* unified-inv fix

---------

Signed-off-by: Athozus <athozus@gmail.com>
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2023-03-29 17:25:01 +02:00