From 9298e09b089666f0e44c0ddf02fd3d0246139390 Mon Sep 17 00:00:00 2001 From: HashMapsData2Value <83883690+HashMapsData2Value@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:31:55 +0100 Subject: [PATCH] fix: center --- ui/pages/keys/view.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/pages/keys/view.go b/ui/pages/keys/view.go index 1d9e52ba..8107e710 100644 --- a/ui/pages/keys/view.go +++ b/ui/pages/keys/view.go @@ -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( @@ -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) }