Add user-configurable colors for transcription display
- Add color settings (user_color, text_color, background_color) to config - Add color picker buttons in Settings dialog with alpha support for backgrounds - Update local web display to use configurable colors - Send per-user colors with transcriptions to multi-user server - Update Node.js server to apply per-user colors on display page - Improve server landing page: replace tech details with display options reference - Bump version to 1.3.2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,10 @@ class ServerSyncClient:
|
||||
font_source: str = "None",
|
||||
websafe_font: Optional[str] = None,
|
||||
google_font: Optional[str] = None,
|
||||
custom_font_file: Optional[str] = None):
|
||||
custom_font_file: Optional[str] = None,
|
||||
user_color: str = "#4CAF50",
|
||||
text_color: str = "#FFFFFF",
|
||||
background_color: str = "#000000B3"):
|
||||
"""
|
||||
Initialize server sync client.
|
||||
|
||||
@@ -33,6 +36,9 @@ class ServerSyncClient:
|
||||
websafe_font: Web-safe font name (e.g., "Arial", "Times New Roman")
|
||||
google_font: Google Font name (e.g., "Roboto", "Open Sans")
|
||||
custom_font_file: Path to a custom font file for this speaker
|
||||
user_color: User name color (hex format)
|
||||
text_color: Text color (hex format)
|
||||
background_color: Background color (hex format with optional alpha)
|
||||
"""
|
||||
self.url = url
|
||||
self.room = room
|
||||
@@ -43,6 +49,9 @@ class ServerSyncClient:
|
||||
self.websafe_font = websafe_font
|
||||
self.google_font = google_font
|
||||
self.custom_font_file = custom_font_file
|
||||
self.user_color = user_color
|
||||
self.text_color = text_color
|
||||
self.background_color = background_color
|
||||
|
||||
# Font info to send with transcriptions
|
||||
self.font_family: Optional[str] = None
|
||||
@@ -303,7 +312,11 @@ class ServerSyncClient:
|
||||
'user_name': self.user_name,
|
||||
'text': trans_data['text'],
|
||||
'timestamp': trans_data['timestamp'],
|
||||
'is_preview': trans_data.get('is_preview', False)
|
||||
'is_preview': trans_data.get('is_preview', False),
|
||||
# Always include user's color settings
|
||||
'user_color': self.user_color,
|
||||
'text_color': self.text_color,
|
||||
'background_color': self.background_color
|
||||
}
|
||||
|
||||
# Add font info if user has a custom font configured
|
||||
|
||||
Reference in New Issue
Block a user