diff --git a/echo_handlers.go b/echo_handlers.go index 81a1f6cf..ccf3f9bf 100644 --- a/echo_handlers.go +++ b/echo_handlers.go @@ -284,9 +284,6 @@ func (svc *Service) AppsNewHandler(c echo.Context) error { sess.Save(c.Request(), c.Response()) return c.Redirect(302, fmt.Sprintf("/%s/auth?c=%s", strings.ToLower(svc.cfg.LNBackendType), appName)) } - if user.HubUrl != "" { - return c.Redirect(302, fmt.Sprintf("%s/#/apps/new?%s", user.HubUrl, c.QueryString())) - } //construction to return a map with all possible permissions //and indicate which ones are checked by default in the front-end @@ -312,6 +309,7 @@ func (svc *Service) AppsNewHandler(c echo.Context) error { return c.Render(http.StatusOK, "apps/new.html", map[string]interface{}{ "User": user, + "QueryString": c.QueryString(), "Name": appName, "Pubkey": pubkey, "ReturnTo": returnTo, diff --git a/views/apps/new.html b/views/apps/new.html index 521376e8..09d4c488 100644 --- a/views/apps/new.html +++ b/views/apps/new.html @@ -1,5 +1,49 @@ {{define "body"}} +{{if .User.HubUrl}} + +

+ Please enable pop-ups and proceed in the new Alby Hub window.
Keep this window open to receive updates. +

+ + + +{{else}} +

{{if .Name}} Connect to {{.Name}} @@ -33,12 +77,12 @@

Name of the app or purpose of the connection

{{else}} - + {{end}} - + - - + +
@@ -222,3 +266,4 @@

}) {{end}} +{{end}}