view

package
v0.0.0-...-7dcd445 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomRelTime

func CustomRelTime(a, b time.Time, albl, blbl string) string

func CustomTime

func CustomTime(then time.Time) string

func DrawAppBarLayout

func DrawAppBarLayout(gtx Gtx, th *material.Theme, widget layout.Widget) Dim

DrawAppBarLayout reusable function to draw consistent AppBar

func DrawAvatar

func DrawAvatar(gtx Gtx, initials string, bgColor color.NRGBA, textTheme *material.Theme) Dim

func DrawFormFieldRowWithLabel

func DrawFormFieldRowWithLabel(gtx Gtx, th *material.Theme, labelText string, labelHintText string, textField *component.TextField, button *IconButton) Dim

func DrawSaltyImageCenter

func DrawSaltyImageCenter(gtx Gtx, theme *material.Theme) Dim

func DrawSaltyImageForNav

func DrawSaltyImageForNav(gtx Gtx, theme *material.Theme) Dim

func DrawTestNotification

func DrawTestNotification(gtx Gtx, theme *material.Theme, notifier notify.Notifier) Dim

func LastSeenRelTime

func LastSeenRelTime(a, b time.Time, albl, blbl string) string

func LastSeenTime

func LastSeenTime(then time.Time) string

func NewAccountFormView

func NewAccountFormView(manager Manager, OnSuccess func()) View

func NewAccountsView

func NewAccountsView(manager Manager, accountChangeCallback func()) View

func NewContactForm

func NewContactForm(manager Manager, contact service.Contact, btnText string, OnSuccess func(addr string)) *contactForm

NewContactForm Always call this function to create contactForm

func NewModalStack

func NewModalStack() Modal

func NewPromptContent

func NewPromptContent(theme *material.Theme, headerText string, contentText string, btnYes *widget.Clickable, btnNo *widget.Clickable) View

func NewSnackBar

func NewSnackBar(manager Manager) Snackbar

Types

type Accordion

type Accordion struct {
	Animation component.VisibilityAnimation
	widget.Clickable
	Child layout.Widget
	*material.Theme
	Title           string
	TitleIcon       *widget.Icon
	ClickCallback   func()
	NoToggleOnClick bool
	material.ButtonLayoutStyle
}

func (*Accordion) Layout

func (a *Accordion) Layout(gtx Gtx) (d Dim)

type AccountDetails

type AccountDetails struct {
	*material.Theme

	Manager
	// contains filtered or unexported fields
}

func NewAccountDetails

func NewAccountDetails(manager Manager, account service.Account) *AccountDetails

func (*AccountDetails) Addr

func (i *AccountDetails) Addr() string

func (*AccountDetails) Layout

func (i *AccountDetails) Layout(gtx Gtx) (d Dim)

type AvatarView

type AvatarView struct {
	Size  image.Point
	Image image.Image
	widget.Clickable
	*material.Theme
	Selected      bool
	SelectionMode bool
}

func (*AvatarView) Layout

func (v *AvatarView) Layout(gtx Gtx) Dim

type ErrorView

type ErrorView struct {
	*material.Theme
	Manager
	Error string
}

func (*ErrorView) Layout

func (i *ErrorView) Layout(gtx Gtx) (d Dim)

type Greetings

type Greetings struct {
	*material.Theme
}

func NewGreetings

func NewGreetings(theme *material.Theme) Greetings

func (*Greetings) Layout

func (cp *Greetings) Layout(gtx Gtx) Dim

type IconButton

type IconButton struct {
	*material.Theme
	Button widget.Clickable
	Icon   *widget.Icon
	Text   string
}

func (*IconButton) Layout

func (b *IconButton) Layout(gtx Gtx) Dim

type Listener

type Listener[t interface{}] struct {
	Entity    t
	LoadingCh chan t
	Loading   bool

	// in milliseconds
	LastRequestTimeStamp int64
	// in milliseconds
	Interval int64
	// contains filtered or unexported fields
}

func NewListener

func NewListener[t interface{}](callback func() <-chan t) *Listener[t]

func (*Listener[t]) Listen

func (l *Listener[t]) Listen()

type Loader

type Loader struct {
	*material.Theme

	Size image.Point
	// contains filtered or unexported fields
}

func (*Loader) Layout

func (l *Loader) Layout(gtx Gtx) Dim

type ModalContent

type ModalContent struct {
	OnCloseClick func()
	layout.List
	// contains filtered or unexported fields
}

func NewModalContent

func NewModalContent(onCloseClick func()) *ModalContent

func (*ModalContent) DrawContent

func (m *ModalContent) DrawContent(gtx Gtx, theme *material.Theme, contentWidget layout.Widget) Dim

type NoAccountView

type NoAccountView struct {
	Manager

	*material.Theme
	*widget.Icon

	AccountFormView View
	*ModalContent
	// contains filtered or unexported fields
}

func NewNoAccount

func NewNoAccount(manager Manager) *NoAccountView

func (*NoAccountView) Layout

func (na *NoAccountView) Layout(gtx Gtx) Dim

type NoContactView

type NoContactView struct {
	Manager

	*material.Theme
	*widget.Icon
	ContactFormView View
	*ModalContent
	// contains filtered or unexported fields
}

func NewNoContact

func NewNoContact(manager Manager, onSuccess func(contactAddr string), btnText string) *NoContactView

func (*NoContactView) Layout

func (nc *NoContactView) Layout(gtx Gtx) Dim

type PromptContent

type PromptContent struct {
	*material.Theme

	HeaderTxt   string
	ContentText string
	// contains filtered or unexported fields
}

func (*PromptContent) Layout

func (p *PromptContent) Layout(gtx Gtx) Dim

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL