mirror of
https://github.com/suitenumerique/messages.git
synced 2026-09-26 11:44:55 +02:00
✨(frontend) add starred/important thread feature
The backend already scopes the starred flag per mailbox via ThreadAccess.starred_at. This commit exposes the feature in the frontend: a useStarred hook, a toggle button in the thread action bar, a starred badge in thread items, an important icon in the thread view subject, and a search filter checkbox for starred threads (is:starred / est:important). Also fixes the undo toast in use-flag to propagate mailboxId so that mailbox-scoped flags (unread, starred) can be properly undone.
This commit is contained in:
@@ -5652,13 +5652,19 @@
|
||||
"mailbox_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Mailbox UUID. Required when flag is 'unread'."
|
||||
"description": "Mailbox UUID. Required when flag is 'unread' or 'starred'."
|
||||
},
|
||||
"read_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"nullable": true,
|
||||
"description": "Timestamp up to which messages are considered read. When provided with flag='unread', sets ThreadAccess.read_at directly. null means nothing has been read (all messages unread)."
|
||||
},
|
||||
"starred_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"nullable": true,
|
||||
"description": "Timestamp when the thread was starred. When provided with flag='starred' and value=true, sets ThreadAccess.starred_at. null or value=false removes the starred flag."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -7024,10 +7030,6 @@
|
||||
"type": "boolean",
|
||||
"readOnly": true
|
||||
},
|
||||
"is_starred": {
|
||||
"type": "boolean",
|
||||
"readOnly": true
|
||||
},
|
||||
"is_trashed": {
|
||||
"type": "boolean",
|
||||
"readOnly": true
|
||||
@@ -7068,7 +7070,6 @@
|
||||
"is_archived",
|
||||
"is_draft",
|
||||
"is_sender",
|
||||
"is_starred",
|
||||
"is_trashed",
|
||||
"is_unread",
|
||||
"parent_id",
|
||||
@@ -8123,13 +8124,20 @@
|
||||
"format": "date-time",
|
||||
"readOnly": true,
|
||||
"nullable": true
|
||||
},
|
||||
"starred_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"readOnly": true,
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"mailbox",
|
||||
"read_at",
|
||||
"role"
|
||||
"role",
|
||||
"starred_at"
|
||||
]
|
||||
},
|
||||
"ThreadAccessRequest": {
|
||||
|
||||
Reference in New Issue
Block a user