Add link to re-show the popup, and add some colour and other visual improvements

This commit is contained in:
2021-10-26 22:48:16 +10:30
parent 3964c6fa72
commit 4b433304f6
5 changed files with 43 additions and 19 deletions

View File

@@ -23,7 +23,7 @@ var downloads []*download.Download
var downloadId = 0
var conf *config.Config
var versionInfo = version.Info{CurrentVersion: "v0.5.1"}
var versionInfo = version.Info{CurrentVersion: "v0.5.2"}
//go:embed web
var webFS embed.FS
@@ -111,11 +111,13 @@ func homeHandler(w http.ResponseWriter, r *http.Request) {
type Info struct {
Downloads []*download.Download
BookmarkletURL template.URL
Config *config.Config
}
info := Info{
Downloads: downloads,
BookmarkletURL: template.URL(bookmarkletURL),
Config: conf,
}
err = t.ExecuteTemplate(w, "layout", info)
@@ -292,6 +294,7 @@ func fetchHandler(w http.ResponseWriter, r *http.Request) {
Id: downloadId,
Url: url[0],
PopupUrl: fmt.Sprintf("/fetch/%d", downloadId),
State: "choose profile",
Finished: false,
Eta: "?",