app

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const CSS = `` /* 4381-byte string literal not displayed */

Variables

View Source
var Installable = &clientside.Bool{
	Name: "app.installable",
}

Installable is true when the app can be installed (that is when the OS has granted the app a beforeinstallprompt event).

View Source
var Standalone = &clientside.Bool{
	Name:  "app.standalone",
	Value: js.NewValue(`(document.fullscreen || (window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone) || window.name == 'installed')`),
}

Standalone is true when the app is running from an installed instance.

Functions

func Head(o ...seed.Option) seed.Option

Head sets the options of the head of the app.

func Install

func Install() client.Script

Install installs the app as a PWA installed application on supported browsers.

func Launch

func Launch() client.Script

Launch launches the current app as new window in an installed state.

func OnUpdateFound

func OnUpdateFound(do client.Script) seed.Option

func Reset

func Reset() client.Script

Reset resets the app and clears any local storage.

func Restart

func Restart() client.Script

Restart restarts the app.

func SetColor

func SetColor(col color.Color) seed.Option

SetColor sets the color of the app.

func SetIcon

func SetIcon(icon string) seed.Option

SetIcon sets the icon of the app.

func SetLoadingPage

func SetLoadingPage(p page.Page) seed.Option

SetLoadingPage sets the loading page of this app.

func Update

func Update() client.Script

Update updates the app.

Types

type App

type App struct {
	seed.Seed
	// contains filtered or unexported fields
}

func New

func New(name string, options ...seed.Option) App

New returns a new App.

func (App) Handler

func (a App) Handler() http.Handler

Handler returns an http.Handler that serve's the app.

func (App) Launch

func (a App) Launch() error

Launch launches the app.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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