Open new tab when logging in via extension

This commit is contained in:
Eduard Urbach 2017-11-16 22:09:50 +01:00
parent 1182c6b760
commit f29079ea8d
4 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ func Get(ctx *aero.Context) string {
user := utils.GetUser(ctx) user := utils.GetUser(ctx)
if user == nil { if user == nil {
return utils.AllowEmbed(ctx, ctx.HTML(components.Login())) return utils.AllowEmbed(ctx, ctx.HTML(components.Login("_blank")))
} }
if !user.IsPro() && user.TimeSinceRegistered() > 14*24*time.Hour { if !user.IsPro() && user.TimeSinceRegistered() > 14*24*time.Hour {

View File

@ -6,7 +6,7 @@ component FrontPage
h2.mountable Your home for everything about anime. h2.mountable Your home for everything about anime.
Login Login("")
Footer Footer
video.bg-video(autoplay="autoplay", loop="loop") video.bg-video(autoplay="autoplay", loop="loop")

View File

@ -7,5 +7,5 @@ import (
// Get ... // Get ...
func Get(ctx *aero.Context) string { func Get(ctx *aero.Context) string {
return ctx.HTML(components.Login()) return ctx.HTML(components.Login(""))
} }

View File

@ -1,9 +1,9 @@
component Login component Login(target string)
.login-buttons.mountable .login-buttons.mountable
a.login-button.login-button-google(href="/auth/google") a.login-button.login-button-google(href="/auth/google", target=target)
Icon("google") Icon("google")
span Sign in via Google span Sign in via Google
a.login-button.login-button-facebook(href="/auth/facebook") a.login-button.login-button-facebook(href="/auth/facebook", target=target)
Icon("facebook") Icon("facebook")
span Sign in via Facebook span Sign in via Facebook