diff options
author | Daniel Milde <daniel@milde.cz> | 2024-02-13 00:57:03 +0100 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2024-02-13 23:32:27 +0100 |
commit | 9d10101b8ea19bc6a26c61d1bc596bdcfc3a5c9d (patch) | |
tree | 7c69210b427c445795566721da7bac15962a4d0f /tui/utils.go | |
parent | 4fbb06ec6e312c48c6456e36ee413141fac2caf4 (diff) |
feat: export with dialog for file name
Diffstat (limited to 'tui/utils.go')
-rw-r--r-- | tui/utils.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tui/utils.go b/tui/utils.go index f38aa33..351f679 100644 --- a/tui/utils.go +++ b/tui/utils.go @@ -2,6 +2,7 @@ package tui import ( "github.com/dundee/gdu/v5/pkg/device" + "github.com/rivo/tview" ) var ( @@ -65,3 +66,13 @@ func min(a, b int) int { } return b } + +func modal(p tview.Primitive, width, height int) tview.Primitive { + return tview.NewFlex(). + AddItem(nil, 0, 1, false). + AddItem(tview.NewFlex().SetDirection(tview.FlexRow). + AddItem(nil, 0, 1, false). + AddItem(p, height, 1, true). + AddItem(nil, 0, 1, false), width, 1, true). + AddItem(nil, 0, 1, false) +} |