mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Make Google Spreadsheet widget work with new module lazy-loading
This commit is contained in:
parent
60d41266cd
commit
e319ab69e7
@ -3,8 +3,8 @@ package gspreadsheets
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/senorprogrammer/wtf/wtf"
|
|
||||||
"github.com/olebedev/config"
|
"github.com/olebedev/config"
|
||||||
|
"github.com/senorprogrammer/wtf/wtf"
|
||||||
sheets "google.golang.org/api/sheets/v4"
|
sheets "google.golang.org/api/sheets/v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -26,10 +26,6 @@ func NewWidget() *Widget {
|
|||||||
/* -------------------- Exported Functions -------------------- */
|
/* -------------------- Exported Functions -------------------- */
|
||||||
|
|
||||||
func (widget *Widget) Refresh() {
|
func (widget *Widget) Refresh() {
|
||||||
if widget.Disabled() {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
cells, _ := Fetch()
|
cells, _ := Fetch()
|
||||||
|
|
||||||
widget.UpdateRefreshedAt()
|
widget.UpdateRefreshedAt()
|
||||||
|
6
wtf.go
6
wtf.go
@ -17,9 +17,9 @@ import (
|
|||||||
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
||||||
"github.com/senorprogrammer/wtf/cryptoexchanges/cryptolive"
|
"github.com/senorprogrammer/wtf/cryptoexchanges/cryptolive"
|
||||||
"github.com/senorprogrammer/wtf/gcal"
|
"github.com/senorprogrammer/wtf/gcal"
|
||||||
"github.com/senorprogrammer/wtf/gspreadsheets"
|
|
||||||
"github.com/senorprogrammer/wtf/git"
|
"github.com/senorprogrammer/wtf/git"
|
||||||
"github.com/senorprogrammer/wtf/github"
|
"github.com/senorprogrammer/wtf/github"
|
||||||
|
"github.com/senorprogrammer/wtf/gspreadsheets"
|
||||||
"github.com/senorprogrammer/wtf/help"
|
"github.com/senorprogrammer/wtf/help"
|
||||||
"github.com/senorprogrammer/wtf/ipinfo"
|
"github.com/senorprogrammer/wtf/ipinfo"
|
||||||
"github.com/senorprogrammer/wtf/jira"
|
"github.com/senorprogrammer/wtf/jira"
|
||||||
@ -186,6 +186,8 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) {
|
|||||||
Widgets = append(Widgets, git.NewWidget(app, pages))
|
Widgets = append(Widgets, git.NewWidget(app, pages))
|
||||||
case "github":
|
case "github":
|
||||||
Widgets = append(Widgets, github.NewWidget(app, pages))
|
Widgets = append(Widgets, github.NewWidget(app, pages))
|
||||||
|
case "gspreadsheets":
|
||||||
|
Widgets = append(Widgets, gspreadsheets.NewWidget())
|
||||||
case "ipinfo":
|
case "ipinfo":
|
||||||
Widgets = append(Widgets, ipinfo.NewWidget())
|
Widgets = append(Widgets, ipinfo.NewWidget())
|
||||||
case "jira":
|
case "jira":
|
||||||
@ -225,9 +227,9 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) {
|
|||||||
cmdrunner.Config = Config
|
cmdrunner.Config = Config
|
||||||
cryptolive.Config = Config
|
cryptolive.Config = Config
|
||||||
gcal.Config = Config
|
gcal.Config = Config
|
||||||
gspreadsheets.Config = Config
|
|
||||||
git.Config = Config
|
git.Config = Config
|
||||||
github.Config = Config
|
github.Config = Config
|
||||||
|
gspreadsheets.Config = Config
|
||||||
ipinfo.Config = Config
|
ipinfo.Config = Config
|
||||||
jira.Config = Config
|
jira.Config = Config
|
||||||
newrelic.Config = Config
|
newrelic.Config = Config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user