Commit Graph

22 Commits

Author SHA1 Message Date
Athozus
cd9e9ec8e1 Add (Un)mark spam buttons
Resize boxes view, and modify the layout of message view
2024-02-01 14:23:03 +01:00
Athozus
77de24e467
Use interleaved style (#124)
* Generate interleaved style when replying/forwarding a message (#120)

* Simplify interleaving function

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

---------

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2023-12-09 00:01:21 +01:00
Athozus
3bad371353
Add colors utilities (#121)
* Add colors utilities

Local function get_base_color(), conversions hex <=> rgb, rgb color mixer, and global function get_color()

* Round numbers to avoid eventual float in string.format

* Simplify inbox/outbox mixing of color

Use a single if statement for each property and concatenate to displayed_color then execute mail.get_color(displayed_color) instead of making many combined if statements

* Convert 3-chars hex colors to 6-chars hex colors

Could break the code, the hex convert to rgb always run on 6-chars

* Rework color utility using tables

Instead of one-letter symbols, it now supports tables of identifiers or single strings
2023-12-06 10:11:12 +01:00
BuckarooBanzay
2111db2ff9 check if message is found in mail.show_message 2023-10-24 00:34:12 +02:00
Athozus
80ae9c3342
Add message id in player selections storage (fix #110, fix #114) 2023-10-16 20:32:06 +02:00
Athozus
be8f0e590f
Add a setting to choose date format 2023-07-17 16:45:57 +02:00
Athozus
0248b051ef
Add a setting for automatic marking read
When a message is opened
2023-07-16 22:59:56 +02:00
Athozus
e038993f27
Add tooltips for detailling actions
Reply / Reply all / Forward buttons and Notifications settings
2023-07-16 20:05:23 +02:00
Athozus
37fad48ec8
Add a tooltip for elapsed time since the delivery
It adds the file util/time_ago.lua in order to re-use the function further
2023-07-16 19:42:08 +02:00
Athozus
67cbef88f7
Add a window to show long receivers list 2023-06-25 19:59:38 +02:00
Athozus
95475c7c59
Store colors and use a lighter selection color 2023-06-25 19:12:20 +02:00
Athozus
d53b07451c
Fix events while reading message in trash 2023-06-17 16:49:12 +02:00
Athozus
65764ee318
Rework message.lua events 2023-06-17 16:24:21 +02:00
Athozus
7822ff3038
Replace sent by outbox (consistency with inbox) 2023-06-04 15:45:49 +02:00
BuckarooBanzay
02853fc3d0 deploy workaround for #84 2023-05-17 16:16:42 +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
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
Athozus
0f3499f8bc
HUD in message view 2023-04-03 16:36:55 +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
BuckarooBanzay
af03f9439b declare the translator in every module instead of a global 2023-03-31 18:12:48 +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