Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <[email protected]>
  • Loading branch information
ukane-philemon committed Nov 27, 2023
1 parent b06849e commit 94b9fd7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ui/page/dcrdex/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ func (pg *DEXMarketPage) OnNavigatedTo() {
})
}

// Include the "Add Server" button.
// Include the "Add Server" button as part of pg.serverSelector items. The
// pg.addServerBtn will should open a modal or page to add a new server to
// DEX when clicked.
servers = append(servers, cryptomaterial.DropDownItem{
DisplayFn: pg.addServerBtnDisplay,
DisplayFn: components.IconButton(pg.Theme.Icons.ContentAdd, values.String(values.StrAddServer), layout.Inset{}, pg.Theme, pg.addServerBtn),
PreventSelection: true,
})

Expand Down Expand Up @@ -289,12 +291,6 @@ func (pg *DEXMarketPage) Layout(gtx C) D {
})
}

// addServerBtnDisplay returns a clickable button layout. The pg.addServerBtn
// will should open a modal or page to add a new server to DEX when clicked.
func (pg DEXMarketPage) addServerBtnDisplay(gtx C) D {
return components.IconButton(pg.Theme.Icons.ContentAdd, values.String(values.StrAddServer), layout.Inset{}, pg.Theme, pg.addServerBtn)(gtx)
}

func (pg *DEXMarketPage) serverAndCurrencySelection(gtx C) D {
return cryptomaterial.LinearLayout{
Width: cryptomaterial.MatchParent,
Expand Down

0 comments on commit 94b9fd7

Please sign in to comment.