Commit fd957d87 authored by Eric's avatar Eric

[update] pagination

parent f2079123
This diff is collapsed.
...@@ -230,11 +230,8 @@ func (h *interactiveHandler) displayAssets(assets model.AssetList) { ...@@ -230,11 +230,8 @@ func (h *interactiveHandler) displayAssets(assets model.AssetList) {
if len(assets) == 0 { if len(assets) == 0 {
_, _ = io.WriteString(h.term, "\r\n No Assets\r\n\r") _, _ = io.WriteString(h.term, "\r\n No Assets\r\n\r")
} else { } else {
pag := AssetPagination{ h.term.SetPrompt(": ")
term: h.term, pag := NewAssetPagination(h.term, assets)
TotalNumber: len(assets),
Data: assets,
}
pag.Initial() pag.Initial()
selectOneAssets := pag.PaginationState() selectOneAssets := pag.PaginationState()
if len(selectOneAssets) == 1 { if len(selectOneAssets) == 1 {
...@@ -243,6 +240,7 @@ func (h *interactiveHandler) displayAssets(assets model.AssetList) { ...@@ -243,6 +240,7 @@ func (h *interactiveHandler) displayAssets(assets model.AssetList) {
h.systemUserSelect = &systemUser h.systemUserSelect = &systemUser
h.Proxy(context.TODO()) h.Proxy(context.TODO())
} }
h.term.SetPrompt("Opt> ")
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment