Skip to content

Commit

Permalink
fix: center
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 31, 2024
1 parent 7246697 commit 9298e09
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ui/pages/keys/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (

func (m ViewModel) View() string {
if m.SelectedKeyToDelete != nil {
return lipgloss.JoinVertical(
lipgloss.Center,
renderDeleteConfirmationModal(m.SelectedKeyToDelete),
)
modal := renderDeleteConfirmationModal(m.SelectedKeyToDelete)
overlay := lipgloss.Place(m.Width, m.Height, lipgloss.Center, lipgloss.Center, modal)
return overlay
}
table := style.ApplyBorder(m.Width, m.Height, "8").Render(m.table.View())
return style.WithNavigation(
Expand All @@ -38,5 +37,5 @@ func renderDeleteConfirmationModal(partKey *api.ParticipationKey) string {

modalContent := fmt.Sprintf("Participation Key: %v\nAccount Address: %v\nPress either y (yes) or n (no).", partKey.Id, partKey.Address)

return modalStyle.Render("Are you sure you want to delete this key from your node?\n", modalContent)
return modalStyle.Render("Are you sure you want to delete this key from your node?\n" + modalContent)
}

0 comments on commit 9298e09

Please sign in to comment.