feat: Add invite compressor and compressed header display
- Add InviteCompressor for terminal-friendly calendar invite summaries - Add test fixtures for large group invite and cancellation emails - Compress To/CC headers to single line with '... (+N more)' truncation - Add 'h' keybinding to toggle between compressed and full headers - EnvelopeHeader now shows first 2 recipients by default
This commit is contained in:
@@ -914,6 +914,17 @@ class EmailViewerApp(App):
|
||||
"""Scroll the main content up by a page."""
|
||||
self.query_one("#main_content").scroll_page_up()
|
||||
|
||||
def action_toggle_header(self) -> None:
|
||||
"""Toggle between compressed and full envelope headers."""
|
||||
content_container = self.query_one("#main_content", ContentContainer)
|
||||
if hasattr(content_container, "header") and content_container.header:
|
||||
content_container.header.toggle_full_headers()
|
||||
# Provide visual feedback
|
||||
if content_container.header.show_full_headers:
|
||||
self.notify("Showing full headers", timeout=1)
|
||||
else:
|
||||
self.notify("Showing compressed headers", timeout=1)
|
||||
|
||||
def action_toggle_main_content(self) -> None:
|
||||
"""Toggle the visibility of the main content pane."""
|
||||
self.main_content_visible = not self.main_content_visible
|
||||
|
||||
Reference in New Issue
Block a user