governance

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: ISC Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ConsensusPageID = "Consensus"
View Source
const GovernancePageID = "Governance"
View Source
const ModalInputVote = "input_vote_modal"
View Source
const ModalWalletSelector = "WalletSelectorModal"
View Source
const ProposalDetailsPageID = "proposal_details"
View Source
const ProposalsPageID = "Proposals"
View Source
const TicketSelectorModalID = "TicketSelectorModal"

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type C

type C = layout.Context

type ConsensusPage

type ConsensusPage struct {
	*load.Load

	LiveTickets []*dcrlibwallet.Transaction
	// contains filtered or unexported fields
}

func NewConsensusPage

func NewConsensusPage(l *load.Load) *ConsensusPage

func (*ConsensusPage) FetchAgendas

func (pg *ConsensusPage) FetchAgendas()

func (*ConsensusPage) HandleUserInteractions

func (pg *ConsensusPage) HandleUserInteractions()

func (*ConsensusPage) ID

func (pg *ConsensusPage) ID() string

func (*ConsensusPage) Layout

func (pg *ConsensusPage) Layout(gtx C) D

func (*ConsensusPage) OnNavigatedFrom

func (pg *ConsensusPage) OnNavigatedFrom()

func (*ConsensusPage) OnNavigatedTo

func (pg *ConsensusPage) OnNavigatedTo()

type D

type D = layout.Dimensions

type Page

type Page struct {
	*load.Load
	// contains filtered or unexported fields
}

func NewGovernancePage

func NewGovernancePage(l *load.Load) *Page

func (*Page) HandleUserInteractions

func (pg *Page) HandleUserInteractions()

func (*Page) ID

func (pg *Page) ID() string

func (*Page) Layout

func (pg *Page) Layout(gtx C) D

func (*Page) OnNavigatedFrom

func (pg *Page) OnNavigatedFrom()

OnNavigatedFrom is called when the page is about to be removed from the displayed window. This method should ideally be used to disable features that are irrelevant when the page is NOT displayed. NOTE: The page may be re-displayed on the app's window, in which case OnNavigatedTo() will be called again. This method should not destroy UI components unless they'll be recreated in the OnNavigatedTo() method. Part of the load.Page interface.

func (*Page) OnNavigatedTo

func (pg *Page) OnNavigatedTo()

OnNavigatedTo is called when the page is about to be displayed and may be used to initialize page features that are only relevant when the page is displayed. Part of the load.Page interface.

type ProposalDetails

type ProposalDetails struct {
	*load.Load
	*listeners.ProposalNotificationListener //not needed.
	// contains filtered or unexported fields
}

func NewProposalDetailsPage

func NewProposalDetailsPage(l *load.Load, proposal *dcrlibwallet.Proposal) *ProposalDetails

func (*ProposalDetails) HandleUserInteractions

func (pg *ProposalDetails) HandleUserInteractions()

HandleUserInteractions is called just before Layout() to determine if any user interaction recently occurred on the page and may be used to update the page's UI components shortly before they are displayed. Part of the load.Page interface.

func (*ProposalDetails) ID

func (pg *ProposalDetails) ID() string

ID is a unique string that identifies the page and may be used to differentiate this page from other pages. Part of the load.Page interface.

func (*ProposalDetails) Layout

func (pg *ProposalDetails) Layout(gtx C) D

Layout draws the page UI components into the provided layout context to be eventually drawn on screen. Part of the load.Page interface.

func (*ProposalDetails) OnNavigatedFrom

func (pg *ProposalDetails) OnNavigatedFrom()

OnNavigatedFrom is called when the page is about to be removed from the displayed window. This method should ideally be used to disable features that are irrelevant when the page is NOT displayed. NOTE: The page may be re-displayed on the app's window, in which case OnNavigatedTo() will be called again. This method should not destroy UI components unless they'll be recreated in the OnNavigatedTo() method. Part of the load.Page interface.

func (*ProposalDetails) OnNavigatedTo

func (pg *ProposalDetails) OnNavigatedTo()

OnNavigatedTo is called when the page is about to be displayed and may be used to initialize page features that are only relevant when the page is displayed. Part of the load.Page interface.

type ProposalsPage

type ProposalsPage struct {
	*load.Load

	*listeners.ProposalNotificationListener
	// contains filtered or unexported fields
}

func NewProposalsPage

func NewProposalsPage(l *load.Load) *ProposalsPage

func (*ProposalsPage) HandleUserInteractions

func (pg *ProposalsPage) HandleUserInteractions()

HandleUserInteractions is called just before Layout() to determine if any user interaction recently occurred on the page and may be used to update the page's UI components shortly before they are displayed. Part of the load.Page interface.

func (*ProposalsPage) ID

func (pg *ProposalsPage) ID() string

ID is a unique string that identifies the page and may be used to differentiate this page from other pages. Part of the load.Page interface.

func (*ProposalsPage) Layout

func (pg *ProposalsPage) Layout(gtx C) D

Layout draws the page UI components into the provided layout context to be eventually drawn on screen. Part of the load.Page interface.

func (*ProposalsPage) OnNavigatedFrom

func (pg *ProposalsPage) OnNavigatedFrom()

OnNavigatedFrom is called when the page is about to be removed from the displayed window. This method should ideally be used to disable features that are irrelevant when the page is NOT displayed. NOTE: The page may be re-displayed on the app's window, in which case OnNavigatedTo() will be called again. This method should not destroy UI components unless they'll be recreated in the OnNavigatedTo() method. Part of the load.Page interface.

func (*ProposalsPage) OnNavigatedTo

func (pg *ProposalsPage) OnNavigatedTo()

OnNavigatedTo is called when the page is about to be displayed and may be used to initialize page features that are only relevant when the page is displayed. Part of the load.Page interface.

type WalletSelector

type WalletSelector struct {
	*load.Load
	// contains filtered or unexported fields
}

func NewWalletSelector

func NewWalletSelector(l *load.Load) *WalletSelector

TODO: merge this into the account selector modal.

func (*WalletSelector) Handle

func (as *WalletSelector) Handle()

func (*WalletSelector) Layout

func (as *WalletSelector) Layout(gtx layout.Context) layout.Dimensions

func (*WalletSelector) SelectFirstValidWallet

func (as *WalletSelector) SelectFirstValidWallet() error

func (*WalletSelector) SelectedWallet

func (as *WalletSelector) SelectedWallet() *dcrlibwallet.Wallet

func (*WalletSelector) Title

func (as *WalletSelector) Title(title string) *WalletSelector

func (*WalletSelector) WalletSelected

func (as *WalletSelector) WalletSelected(callback func(*dcrlibwallet.Wallet)) *WalletSelector

func (*WalletSelector) WalletValidator

func (as *WalletSelector) WalletValidator(walletIsValid func(*dcrlibwallet.Wallet) bool) *WalletSelector

type WalletSelectorModal

type WalletSelectorModal struct {
	*load.Load
	// contains filtered or unexported fields
}

func (*WalletSelectorModal) Dismiss

func (asm *WalletSelectorModal) Dismiss()

func (*WalletSelectorModal) Handle

func (asm *WalletSelectorModal) Handle()

func (*WalletSelectorModal) Layout

func (*WalletSelectorModal) ModalID

func (asm *WalletSelectorModal) ModalID() string

func (*WalletSelectorModal) OnDismiss

func (asm *WalletSelectorModal) OnDismiss()

func (*WalletSelectorModal) OnResume

func (asm *WalletSelectorModal) OnResume()

func (*WalletSelectorModal) Show

func (asm *WalletSelectorModal) Show()

Jump to

Keyboard shortcuts

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