governance

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: ISC Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const ConsensusPageID = "Consensus"
View Source
const GovernancePageID = "Governance"
View Source
const ProposalDetailsPageID = "proposal_details"
View Source
const (
	ProposalsPageID = "Proposals"
)
View Source
const TreasuryPageID = "Treasury"

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
	// GenericPageModal defines methods such as ID() and OnAttachedToNavigator()
	// that helps this Page satisfy the app.Page interface. It also defines
	// helper methods for accessing the PageNavigator that displayed this page
	// and the root WindowNavigator.
	*app.GenericPageModal
	// 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) 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
	*app.MasterPage
	// contains filtered or unexported fields
}

func NewGovernancePage

func NewGovernancePage(l *load.Load) *Page

func (*Page) HandleUserInteractions

func (pg *Page) HandleUserInteractions()

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
	// GenericPageModal defines methods such as ID() and OnAttachedToNavigator()
	// that helps this Page satisfy the app.Page interface. It also defines
	// helper methods for accessing the PageNavigator that displayed this page
	// and the root WindowNavigator.
	*app.GenericPageModal
	// contains filtered or unexported fields
}

func NewProposalDetailsPage

func NewProposalDetailsPage(l *load.Load, proposal *libwallet.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) 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
	// GenericPageModal defines methods such as ID() and OnAttachedToNavigator()
	// that helps this Page satisfy the app.Page interface. It also defines
	// helper methods for accessing the PageNavigator that displayed this page
	// and the root WindowNavigator.
	*app.GenericPageModal
	// 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) 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. Once proposals update is complete fetchProposals() is automatically called.

type TreasuryPage

type TreasuryPage struct {
	*load.Load
	// GenericPageModal defines methods such as ID() and OnAttachedToNavigator()
	// that helps this Page satisfy the app.Page interface. It also defines
	// helper methods for accessing the PageNavigator that displayed this page
	// and the root WindowNavigator.
	*app.GenericPageModal

	PiKey string
	// contains filtered or unexported fields
}

func NewTreasuryPage

func NewTreasuryPage(l *load.Load) *TreasuryPage

func (*TreasuryPage) FetchPolicies

func (pg *TreasuryPage) FetchPolicies()

func (*TreasuryPage) HandleUserInteractions

func (pg *TreasuryPage) HandleUserInteractions()

func (*TreasuryPage) ID

func (pg *TreasuryPage) ID() string

func (*TreasuryPage) Layout

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

func (*TreasuryPage) OnNavigatedFrom

func (pg *TreasuryPage) OnNavigatedFrom()

func (*TreasuryPage) OnNavigatedTo

func (pg *TreasuryPage) OnNavigatedTo()

type WalletSelector

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

func NewDCRWalletSelector added in v1.1.0

func NewDCRWalletSelector(l *load.Load) *WalletSelector

TODO: merge this into the account selector modal.

func (*WalletSelector) Handle

func (as *WalletSelector) Handle(window app.WindowNavigator)

func (*WalletSelector) Layout

func (*WalletSelector) SelectFirstValidWallet

func (as *WalletSelector) SelectFirstValidWallet() error

func (*WalletSelector) SelectedWallet

func (as *WalletSelector) SelectedWallet() sharedW.Asset

func (*WalletSelector) Title

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

func (*WalletSelector) WalletSelected

func (as *WalletSelector) WalletSelected(callback func(sharedW.Asset)) *WalletSelector

func (*WalletSelector) WalletValidator

func (as *WalletSelector) WalletValidator(walletIsValid func(sharedW.Asset) bool) *WalletSelector

type WalletSelectorModal

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

func (*WalletSelectorModal) Handle

func (asm *WalletSelectorModal) Handle()

func (*WalletSelectorModal) Layout

func (*WalletSelectorModal) OnDismiss

func (asm *WalletSelectorModal) OnDismiss()

func (*WalletSelectorModal) OnResume

func (asm *WalletSelectorModal) OnResume()

Jump to

Keyboard shortcuts

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