feat: Enhance message handling for drawings

- Added properties to the Message model to track drawing status and associated drawing ID.
- Updated AppProvider to mark messages as drawings and link them to their respective drawing IDs.
- Enhanced DrawingProvider to manage received drawings and their visibility.
- Implemented navigation to drawings in MapProvider, including dynamic zoom levels based on drawing size.
- Updated MessagesProvider to parse drawing messages and manage linked drawings.
- Enhanced MessagesTab to support drawing message interactions, including navigation and coordinate copying.
- Created DrawingMinimapPreview widget for visual representation of drawings in message bubbles.
- Improved DrawingToolbar to handle sharing of drawings, ensuring only unshared drawings are sent.
- Added utility functions in DrawingMessageParser for extracting drawing metadata.
This commit is contained in:
Janez T
2025-10-23 20:14:51 +02:00
parent f32667997e
commit 1688d6f538
25 changed files with 1504 additions and 114 deletions

View File

@@ -2990,5 +2990,73 @@
"sampleMedicalTeam": "Medical Team",
"@sampleMedicalTeam": {
"description": "Sample team name"
},
"mapDrawing": "Map Drawing",
"@mapDrawing": {
"description": "Label for map drawing messages"
},
"navigateToDrawing": "Navigate to Drawing",
"@navigateToDrawing": {
"description": "Option to navigate to drawing on map"
},
"copyCoordinates": "Copy Coordinates",
"@copyCoordinates": {
"description": "Option to copy coordinates to clipboard"
},
"hideFromMap": "Hide from Map",
"@hideFromMap": {
"description": "Option to hide drawing from map"
},
"lineDrawing": "Line Drawing",
"@lineDrawing": {
"description": "Label for line type drawings"
},
"rectangleDrawing": "Rectangle Drawing",
"@rectangleDrawing": {
"description": "Label for rectangle type drawings"
},
"coordinatesCopiedToClipboard": "Coordinates copied to clipboard",
"@coordinatesCopiedToClipboard": {
"description": "Success message when coordinates are copied"
},
"drawingShared": "Map Drawing",
"@drawingShared": {
"description": "Label for shared drawing notifications"
},
"drawingHidden": "Drawing hidden from map",
"@drawingHidden": {
"description": "Success message when drawing is hidden"
},
"alreadyShared": "{count, plural, =1{1 already shared} other{{count} already shared}}",
"@alreadyShared": {
"description": "Message showing how many drawings were already shared",
"placeholders": {
"count": {
"type": "int"
}
}
},
"newDrawingsShared": "Shared {count} new drawing{plural}",
"@newDrawingsShared": {
"description": "Success message after sharing new drawings",
"placeholders": {
"count": {
"type": "int"
},
"plural": {
"type": "String"
}
}
}
}