package appui import ( "github.com/egoist/asuka/colors" "github.com/egoist/asuka/sdk/svg" "github.com/egoist/asuka/ui" ) // serverIcon is a rack, drawn as vector paths: Asuka's built-in symbols // have no server glyph on Android, and an SVG keeps it crisp at any size. var serverIcon = svg.MustParse(``) // instancesButton opens the server list: one button, because picking a // server is also how the live one is replaced. func (c *controller) instancesButton() ui.Node { return ui.View(ui.ViewProps{ OnPress: func() { c.instancesOpen.Set(true) }, Label: ui.Val("实例"), Hint: ui.Val("打开服务器列表"), Style: ui.Style{Padding: ui.All(8)}, }, svg.View(svg.Props{ Icon: serverIcon, Color: ui.Val(colors.Accent), Style: ui.Style{Width: ui.Pt(22), Height: ui.Pt(22)}, })) }