highlight already withdrawn payouts because not all terminals support crossed text
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
		
							parent
							
								
									987d8e544d
								
							
						
					
					
						commit
						aed9fae2af
					
				@ -2,7 +2,7 @@
 | 
				
			|||||||
name = "ghost-eye"
 | 
					name = "ghost-eye"
 | 
				
			||||||
authors = ["str3tch <stretch@ghostchain.io>"]
 | 
					authors = ["str3tch <stretch@ghostchain.io>"]
 | 
				
			||||||
description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost"
 | 
					description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost"
 | 
				
			||||||
version = "0.3.54"
 | 
					version = "0.3.55"
 | 
				
			||||||
edition = "2021"
 | 
					edition = "2021"
 | 
				
			||||||
homepage = "https://git.ghostchain.io/ghostchain"
 | 
					homepage = "https://git.ghostchain.io/ghostchain"
 | 
				
			||||||
repository = "https://git.ghostchain.io/ghostchain/ghost-eye"
 | 
					repository = "https://git.ghostchain.io/ghostchain/ghost-eye"
 | 
				
			||||||
 | 
				
			|||||||
@ -183,7 +183,10 @@ impl PartialComponent for History {
 | 
				
			|||||||
    fn set_active(&mut self, current_tab: CurrentTab) {
 | 
					    fn set_active(&mut self, current_tab: CurrentTab) {
 | 
				
			||||||
        match current_tab {
 | 
					        match current_tab {
 | 
				
			||||||
            CurrentTab::History => self.is_active = true,
 | 
					            CurrentTab::History => self.is_active = true,
 | 
				
			||||||
            _ => self.is_active = false,
 | 
					            _ => {
 | 
				
			||||||
 | 
					                self.table_state.select(None);
 | 
				
			||||||
 | 
					                self.is_active = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -253,13 +256,19 @@ impl Component for History {
 | 
				
			|||||||
                        era_index_text = era_index_text.add_modifier(Modifier::CROSSED_OUT);
 | 
					                        era_index_text = era_index_text.add_modifier(Modifier::CROSSED_OUT);
 | 
				
			||||||
                        slash_text = slash_text.add_modifier(Modifier::CROSSED_OUT);
 | 
					                        slash_text = slash_text.add_modifier(Modifier::CROSSED_OUT);
 | 
				
			||||||
                        reward_text = reward_text.add_modifier(Modifier::CROSSED_OUT);
 | 
					                        reward_text = reward_text.add_modifier(Modifier::CROSSED_OUT);
 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        Row::new(vec![
 | 
				
			||||||
 | 
					                            Cell::from(era_index_text),
 | 
				
			||||||
 | 
					                            Cell::from(slash_text), 
 | 
				
			||||||
 | 
					                            Cell::from(reward_text), 
 | 
				
			||||||
 | 
					                        ]).style(self.palette.create_highlight_style())
 | 
				
			||||||
 | 
					                    } else {
 | 
				
			||||||
                        Row::new(vec![
 | 
					                        Row::new(vec![
 | 
				
			||||||
                            Cell::from(era_index_text),
 | 
					                            Cell::from(era_index_text),
 | 
				
			||||||
                            Cell::from(slash_text), 
 | 
					                            Cell::from(slash_text), 
 | 
				
			||||||
                            Cell::from(reward_text), 
 | 
					                            Cell::from(reward_text), 
 | 
				
			||||||
                        ])
 | 
					                        ])
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                }),
 | 
					                }),
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
                Constraint::Length(4),
 | 
					                Constraint::Length(4),
 | 
				
			||||||
@ -267,7 +276,7 @@ impl Component for History {
 | 
				
			|||||||
                Constraint::Fill(1),
 | 
					                Constraint::Fill(1),
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        .highlight_style(self.palette.create_highlight_style())
 | 
					        .highlight_style(self.palette.create_basic_style(true))
 | 
				
			||||||
        .column_spacing(1)
 | 
					        .column_spacing(1)
 | 
				
			||||||
        .block(Block::bordered()
 | 
					        .block(Block::bordered()
 | 
				
			||||||
            .border_style(border_style)
 | 
					            .border_style(border_style)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user