component

package
v0.0.0-...-d13d548 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 13 Imported by: 2

Documentation

Overview

Package component contains Vecty HTML components used by Go Package Store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdatesContent

func UpdatesContent(active, history []*model.RepoPresentation, checkingUpdates bool) []vecty.MarkupOrChild

UpdatesContent returns the entire content of updates tab.

Types

type Change

type Change struct {
	vecty.Core
	*model.Change `vecty:"prop"`
}

Change is a component for a single commit message.

func (*Change) Render

func (c *Change) Render() vecty.ComponentOrHTML

Render renders the component.

type Comments

type Comments struct {
	vecty.Core
	*model.Comments `vecty:"prop"`
}

Comments is a component for displaying a change discussion.

TODO: Consider inlining this into Change component, we'll see.

func (*Comments) Render

func (c *Comments) Render() vecty.ComponentOrHTML

Render renders the component.

type CommitID

type CommitID struct {
	vecty.Core
	ID string `vecty:"prop"`
}

CommitID is a component that displays a short commit ID, with the full one available in tooltip.

func (*CommitID) Render

func (c *CommitID) Render() vecty.ComponentOrHTML

Render renders the component.

type Header struct {
	vecty.Core
}

Header is a component that displays the header with tabs on top.

func (*Header) Render

func (*Header) Render() vecty.ComponentOrHTML

Render renders the component.

type PresentationChanges

type PresentationChanges struct {
	vecty.Core
	//Changes        []*Change
	//LocalRevision  string // Only needed if len(Changes) == 0.
	//RemoteRevision string // Only needed if len(Changes) == 0.
	*model.RepoPresentation `vecty:"prop"` // Only uses Changes, and if len(Changes) == 0, then LocalRevision and RemoteRevision.
}

PresentationChanges is a component containing changes within an update.

func (*PresentationChanges) Render

Render renders the component.

type RepoPresentation

type RepoPresentation struct {
	vecty.Core
	*model.RepoPresentation `vecty:"prop"`
}

RepoPresentation is a component for presenting a repository update.

TODO: Dedup with workspace.RepoPresentation. Maybe.

func (*RepoPresentation) Render

Render renders the component.

Jump to

Keyboard shortcuts

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