Update pane titles in HostsManagerApp for clarity and edit mode indication
This commit is contained in:
		
							parent
							
								
									14d7553674
								
							
						
					
					
						commit
						43fa8c871a
					
				
					 1 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -68,13 +68,13 @@ class HostsManagerApp(App):
 | 
			
		|||
 | 
			
		||||
        with Horizontal(classes="hosts-container"):
 | 
			
		||||
            # Left pane - entries table
 | 
			
		||||
            with Vertical(classes="left-pane"):
 | 
			
		||||
                yield Static("Host Entries", id="entries-title")
 | 
			
		||||
            with Vertical(classes="left-pane") as left_pane:
 | 
			
		||||
                left_pane.border_title = "Host Entries"
 | 
			
		||||
                yield DataTable(id="entries-table")
 | 
			
		||||
 | 
			
		||||
            # Right pane - entry details or edit form
 | 
			
		||||
            with Vertical(classes="right-pane"):
 | 
			
		||||
                yield Static("Entry Details", id="details-title")
 | 
			
		||||
            with Vertical(classes="right-pane") as right_pane:
 | 
			
		||||
                right_pane.border_title = "Entry Details"
 | 
			
		||||
                yield DataTable(id="entry-details-table", show_header=False, show_cursor=False, disabled=True)
 | 
			
		||||
 | 
			
		||||
                # Edit form (initially hidden)
 | 
			
		||||
| 
						 | 
				
			
			@ -364,3 +364,11 @@ class HostsManagerApp(App):
 | 
			
		|||
    def update_edit_form(self) -> None:
 | 
			
		||||
        """Update the edit form with current entry values."""
 | 
			
		||||
        self.details_handler.update_edit_form()
 | 
			
		||||
 | 
			
		||||
    def watch_entry_edit_mode(self, entry_edit_mode: bool) -> None:
 | 
			
		||||
        """Update the right pane border title when entry edit mode changes."""
 | 
			
		||||
        right_pane = self.query_one(".right-pane")
 | 
			
		||||
        if entry_edit_mode:
 | 
			
		||||
            right_pane.border_title = "Edit Entry"
 | 
			
		||||
        else:
 | 
			
		||||
            right_pane.border_title = "Entry Details"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue