Open new tab when logging in via extension
This commit is contained in:
parent
1182c6b760
commit
f29079ea8d
@ -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 {
|
||||||
|
@ -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")
|
||||||
|
@ -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(""))
|
||||||
}
|
}
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user