ui

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// TS is the Tailscale Client instance to use for interaction with
	// Tailscale.
	TS *tsutil.Client
	// contains filtered or unexported fields
}

App is the main type for the app, containing all of the state necessary to run it.

func (*App) Quit

func (a *App) Quit()

Quit exits the app completely, causing Run to return.

func (*App) Run

func (a *App) Run(ctx context.Context)

Run runs the app, initializing everything and then entering the main loop. It will return if either ctx is cancelled or Quit is called.

type Confirmation

type Confirmation struct {
	Heading string
	Body    string
	Accept  string
	Reject  string
}

func (Confirmation) Show

func (d Confirmation) Show(a *App, res func(bool))

type GInputStream

type GInputStream interface {
	Read(context.Context, []byte) (int, error)
}

type GOutputStream

type GOutputStream interface {
	Write(context.Context, []byte) (int, error)
}

type Info added in v0.10.2

type Info struct {
	Heading string
	Body    string
}

func (Info) Show added in v0.10.2

func (d Info) Show(a *App, closed func())

type MainWindow

type MainWindow struct {
	*adw.ApplicationWindow `gtk:"MainWindow"`

	ToastOverlay   *adw.ToastOverlay
	SplitView      *adw.NavigationSplitView
	StatusSwitch   *gtk.Switch
	MainMenuButton *gtk.MenuButton
	PeersStack     *gtk.Stack
	WorkSpinner    *gtk.Spinner
}

func NewMainWindow

func NewMainWindow(app *gtk.Application) *MainWindow

type PeerPage

type PeerPage struct {
	*adw.StatusPage `gtk:"PeerPage"`

	IPGroup                 *adw.PreferencesGroup
	OptionsGroup            *adw.PreferencesGroup
	AdvertiseExitNodeRow    *adw.ActionRow
	AdvertiseExitNodeSwitch *gtk.Switch
	AllowLANAccessRow       *adw.ActionRow
	AllowLANAccessSwitch    *gtk.Switch
	AcceptRoutesRow         *adw.ActionRow
	AcceptRoutesSwitch      *gtk.Switch
	AdvertisedRoutesGroup   *adw.PreferencesGroup
	AdvertiseRouteButton    *gtk.Button
	NetCheckGroup           *adw.PreferencesGroup
	NetCheckButton          *gtk.Button
	LastNetCheckRow         *adw.ActionRow
	LastNetCheck            *gtk.Label
	UDPRow                  *adw.ActionRow
	UDP                     *gtk.Image
	IPv4Row                 *adw.ActionRow
	IPv4Icon                *gtk.Image
	IPv4Addr                *gtk.Label
	IPv6Row                 *adw.ActionRow
	IPv6Icon                *gtk.Image
	IPv6Addr                *gtk.Label
	UPnPRow                 *adw.ActionRow
	UPnP                    *gtk.Image
	PMPRow                  *adw.ActionRow
	PMP                     *gtk.Image
	PCPRow                  *adw.ActionRow
	PCP                     *gtk.Image
	HairPinningRow          *adw.ActionRow
	HairPinning             *gtk.Image
	PreferredDERPRow        *adw.ActionRow
	PreferredDERP           *gtk.Label
	DERPLatencies           *adw.ExpanderRow
	MiscGroup               *adw.PreferencesGroup
	ExitNodeRow             *adw.ActionRow
	ExitNodeSwitch          *gtk.Switch
	OnlineRow               *adw.ActionRow
	Online                  *gtk.Image
	LastSeenRow             *adw.ActionRow
	LastSeen                *gtk.Label
	CreatedRow              *adw.ActionRow
	Created                 *gtk.Label
	LastWriteRow            *adw.ActionRow
	LastWrite               *gtk.Label
	LastHandshakeRow        *adw.ActionRow
	LastHandshake           *gtk.Label
	RxBytesRow              *adw.ActionRow
	RxBytes                 *gtk.Label
	TxBytesRow              *adw.ActionRow
	TxBytes                 *gtk.Label
	FilesGroup              *adw.PreferencesGroup
	SendFileGroup           *adw.PreferencesGroup
	SendFileRow             *adw.ActionRow
	DropTarget              *gtk.DropTarget
}

func NewPeerPage

func NewPeerPage() *PeerPage

type PreferencesWindow

type PreferencesWindow struct {
	*adw.PreferencesWindow `gtk:"PreferencesWindow"`

	UseTrayIconRow            *adw.ActionRow
	UseTrayIcon               *gtk.Switch
	PollingIntervalRow        *adw.ActionRow
	PollingInterval           *gtk.SpinButton
	PollingIntervalAdjustment *gtk.Adjustment
	ControlURLRow             *adw.EntryRow
}

func NewPreferencesWindow

func NewPreferencesWindow() *PreferencesWindow

type Prompt

type Prompt struct {
	Heading string
	Body    string
}

func (Prompt) Show

func (d Prompt) Show(a *App, res func(val string))

Jump to

Keyboard shortcuts

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