💄(front) clean a little bit label badges

We recently display label badges into thread-item. We revamp that
a little bit to improve code structure and prepare the layout
for further improvements.
This commit is contained in:
jbpenrath
2025-06-19 02:05:41 +02:00
committed by Jean-Baptiste PENRATH
parent cf37ea49b7
commit 0d4e4f3536
13 changed files with 267 additions and 107 deletions
+42 -1
View File
@@ -4710,7 +4710,10 @@
"readOnly": true
},
"labels": {
"type": "string",
"type": "array",
"items": {
"$ref": "#/components/schemas/ThreadLabel"
},
"readOnly": true
}
},
@@ -4833,6 +4836,44 @@
"type": "string",
"description": "* `viewer` - Viewer\n* `editor` - Editor"
},
"ThreadLabel": {
"type": "object",
"description": "Serializer to get labels details for a thread.",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"readOnly": true,
"description": "primary key for the record as UUID"
},
"name": {
"type": "string",
"description": "Name of the label/folder (can use slashes for hierarchy, e.g. 'Work/Projects')",
"maxLength": 255
},
"slug": {
"type": "string",
"readOnly": true,
"description": "URL-friendly version of the name",
"pattern": "^[-a-zA-Z0-9_]+$"
},
"color": {
"type": "string",
"description": "Color of the label in hex format (e.g. #FF0000)",
"maxLength": 7
},
"display_name": {
"type": "string",
"readOnly": true
}
},
"required": [
"display_name",
"id",
"name",
"slug"
]
},
"User": {
"type": "object",
"description": "Serialize users.",