Commit graph

22 commits

Author SHA1 Message Date
wrd
a9ae27ef87 Fix logic error when handling Contact updates in the SendMailModel
The mail was always marked as changed when receiving a contact type

entity update, even though there might not have been a change

Close #9788
2025-10-22 10:03:50 +02:00
paw
435fb98bd0 Use offline storage for autosaved drafts
We want to use offline storage (SQLite) for autosaved drafts as it will
allow the locally saved draft to be accessible when offline. This means
we refactor ConfigurationDatabase.

We still want to use the same encoding methods, as it provides a simple
way to put in data without having to worry about making some complex
schema.

Closes #9743

Co-authored-by: ivk <ivk@tutao.de>
2025-10-02 13:17:57 +02:00
paw
2cf2329aef Fix race conditions causing draft dialog conflict warnings
We want to avoid that an autosave is created while the user is saving.

It is not quite enough to check that the mail is sending before doing an
autosave, since you can also send while doing an autosave. As such, we
should additionally clear the autosave once the mail has been sent.

We also want to avoid saving if the mail has not actually been changed.

Closes #9735
2025-09-30 16:45:05 +02:00
paw
d956f2b2e9 Autosave drafts
Every five seconds while the user is typing, save a local copy of the
draft to ConfigurationDatabase.

If the draft has not been touched for five minutes, it gets uploaded to
the server.

If the user restarts the client with an autosaved draft, it will open
automatically. Only one draft can be autosaved at a time.

Additionally, if an entity update for a draft is received while the user
has that draft open for editing, saving will prompt a confirmation
dialog to overwrite the draft on the server, as this draft data may be
outdated.

Next, if the user attempts to open a new draft while there is an
autosaved draft, display a confirmation dialog to the user to delete
it.

And lastly, if the user has two separate drafts open on different
windows, we handle this by preventing saving over them.

Closes #4419
2025-09-26 10:35:24 +02:00
and
a512a6da2a Update and Cancel emails
Co-authored-by: Murilo Pereira <34790144+murilopereirame@users.noreply.github.com>
2025-08-28 17:03:31 +02:00
ivk
70f62079d6
Fix external image replacement serialization
Chromium changed how HTML is serialized:

https://developer.chrome.com/release-notes/138?

https://chromestatus.com/feature/6264983847174144

https://github.com/whatwg/html/issues/6235

Which caused some of our HTML sanitizing tests to fail.

To prevent any possible issues with serialization we instead create
a Blob URL for our svg. This way we sidestep DOM serialization
peculiarities. As a side effect DOM should be smaller.

Close #9465

Co-authored-by: paw <paw-hub@users.noreply.github.com>
2025-08-14 14:54:11 +02:00
hec
d76dde02eb
Add multi recipients key recovery
When answering to a calendar event or sending a mail we show a popup
where the user can select which key to recover

Co-authored-by: mab <mab@tutao.de>

tuta#2239
2025-08-07 10:05:57 +02:00
mab
b148062572
Remove lazy/eager option for resolving recipients
Recipients will now only get resolved when `resolve()` is called
explicitly.
2025-08-07 09:59:21 +02:00
mab
05eda8dbe5
Handle KeyVerificationMismatchError gracefully when sharing calendars 2025-08-07 09:51:21 +02:00
hrb-hub
6cca94d879 Fix uncaught conversation entry NotFoundError
Close #9270
2025-07-10 16:03:16 +02:00
bed
e0fb71e38e Mark suddenly unverified recipients after hitting "send"
For recipients that have been displayed as verified in the mail editor
and lose the status before sending, the verification shield icon will
be replaced by a failure icon.

Co-authored-by: mab <mab@tutao.de>
2025-04-02 14:02:01 +02:00
mab
2d35ab0d6e Introduce key verification (squash) 2025-03-19 09:29:34 +01:00
Kinan
e1baa01f63 refactor LanguageViewModel to use new translation types
The reason for this refactor is to make it possible to put "data-testid"
attributes on HTML tags. Those attributes can be used with UI test
frameworks to make automated testing independent of the translation
language or text.

The idea is to get rid of the lazy<string> types and instead use a new type
called Translation wherever possible. Translation replaces the old
TranslationText and contains both translation key and translation text.

The type MaybeTranslation is a legacy type left to make the transition feasible.
It can be replaced with either TranslationKey or Translation in the future.

Co-authored-by: map <mpfau@users.noreply.github.com>
2025-01-17 14:48:32 +01:00
wrd
88355bd5d1 Splits MailModel into two, adding MailboxModel
close pi#214

Calendar only needs access to MailboxModel, MailModel handles deleting
and moving mails
2024-09-23 16:49:37 +02:00
map
2d24bab6f9 MailSet support (static mail listIds)
In order to allow importing of mails we replace legacy MailFolders
(non-static mail listIds) with new MailSets (static mail listIds).
From now on, mails have static mail listIds and static mail elementIds.
To move mails between new MailSets we introduce MailSetEntries
("entries" property on a MailSet), which are index entries sorted by
the received date of the referenced mails (customId). This commit adds
support for new MailSets, while still supporting legacy MailFolders
(mail lists) to support migrating gradually.

* TutanotaModelV74 adds:
  * MailSet support
  * and defaultAlarmList on GroupSettings

* SystemModelV107 adds model changes for counter (unread mails) updates

* Adapt mail list to show MailSet and legacy mails
  The list model is now largely unaware about listIds since it can
  display mails from multiple MailBags. MailBags are static mailLists
  from which a mail is only removed from when the mail is permanently
  deleted.

* Adapt offline storage for mail sets
  Offline storage gained the ability to provide cached entities
  from a list of ids.
2024-08-20 16:19:58 +02:00
mup
bbb0b62e3b Moves common functions between worker and app
This commit moves some functions that are used in both App and Worker.
Also renames CommonMailUtils to SharedMailUtils.ts because there share
functionalities between both apps and creates a new file CommonMailUtils
to store functions that are common between app and worker.
2024-07-30 14:27:45 +02:00
wrd
4919979a7c sys-v105 Model changes for calendar app notifications
Co-authored-by: mup <34790144+murilopereirame@users.noreply.github.com>

Also moves the new isDraft function to CommonMailUtils
and other code clean-up
2024-07-26 17:42:25 +02:00
wrd
6a8fcab804 [Calendar] Code improvement for calendar app
Fix files changed in merge
Remove unneeded code from calendar app
Fixes migrations and build file names

small changes
2024-07-26 16:43:01 +02:00
and
418b9bc3f9 [Calendar] Clean project code
Co-authored-by: Murilo Pereira <34790144+murilopereirame@users.noreply.github.com>

This commit fixes the Build scripts and missing imports
from rebase. Fixes tests after apps split, and This commit fixes the
Android project changing the gradle task used to build the Android app.
Also fixes some import errors caused by the rebase.
2024-07-26 16:43:00 +02:00
and
9a783ae7dd [Calendar] Fixes TypeScript imports and Android project
This commit fixes the Android project changing the gradle task
used to build the Android app.

Also fixes some import errors caused by the rebase.

Co-authored-by: Murilo Pereira <34790144+murilopereirame@users.noreply.github.com>
2024-07-26 16:43:00 +02:00
wrd
6a58c93e43 Move files to new folder structure
Co-authored-by: @rih-tutao

Move files to new folder structure

Co-authored-by: @rih-tutao
2024-07-26 16:43:00 +02:00
wrd
aa960b1041 Move mail and contacts functionality that cal needs to common folder
Co-authored-by: rih <rih@tutao.de>
2024-07-26 16:42:15 +02:00
Renamed from src/mail-app/mail/editor/SendMailModel.ts (Browse further)