Minor changes
This commit is contained in:
parent
d583d9d6f9
commit
1b0aa76009
@ -43,7 +43,7 @@ component Layout(app *aero.Application, ctx *aero.Context, user *arn.User, openG
|
||||
StatusMessage
|
||||
ExtensionNavigation
|
||||
if user != nil
|
||||
#user(data-id=user.ID, data-theme=user.Settings().Theme)
|
||||
#user(data-id=user.ID, data-pro=user.IsPro(), data-theme=user.Settings().Theme)
|
||||
script(src="/scripts")
|
||||
script(type="application/ld+json")!= organization
|
||||
|
||||
|
@ -73,9 +73,12 @@ component SettingsPersonal(user *arn.User)
|
||||
|
||||
InputImage("cover-input", "File", "/api/upload/cover")
|
||||
|
||||
.cover-preview
|
||||
.cover-preview(title="Recommended: 1920 x 450 | PNG or JPG")
|
||||
img#cover-input-preview.profile-cover.lazy(data-src=user.CoverLink("small"), data-webp="true", alt="Cover image")
|
||||
|
||||
.footer
|
||||
p PRO account required.
|
||||
|
||||
component SettingsNotifications(user *arn.User)
|
||||
SettingsTabs
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
.cover-preview
|
||||
width 100%
|
||||
height 0
|
||||
padding-top 25%
|
||||
padding-top 23.4375%
|
||||
position relative
|
||||
margin 0 auto
|
||||
|
||||
|
@ -15,6 +15,10 @@ func Cover(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
|
||||
}
|
||||
|
||||
if !user.IsPro() {
|
||||
return ctx.Error(http.StatusUnauthorized, "Only available for PRO users", nil)
|
||||
}
|
||||
|
||||
// Retrieve file from post body
|
||||
data, err := ctx.Request().Body().Bytes()
|
||||
|
||||
|
@ -805,7 +805,7 @@ export class AnimeNotifier {
|
||||
return
|
||||
}
|
||||
|
||||
// F = Search
|
||||
// "F" = Search
|
||||
if(e.keyCode == 70 && !e.ctrlKey) {
|
||||
let search = this.app.find("search") as HTMLInputElement
|
||||
|
||||
@ -817,7 +817,16 @@ export class AnimeNotifier {
|
||||
return
|
||||
}
|
||||
|
||||
// Ctrl + , = Settings
|
||||
// "S" = Toggle sidebar
|
||||
if(e.keyCode == 83 && !e.ctrlKey) {
|
||||
this.sideBar.toggle()
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
return
|
||||
}
|
||||
|
||||
// "Ctrl" + "," = Settings
|
||||
if(e.ctrlKey && e.keyCode == 188) {
|
||||
this.app.load("/settings")
|
||||
|
||||
|
@ -26,4 +26,14 @@ export class SideBar {
|
||||
hide() {
|
||||
this.element.classList.remove("sidebar-visible")
|
||||
}
|
||||
|
||||
toggle() {
|
||||
let visible = this.element.style.display !== "none"
|
||||
|
||||
if(visible) {
|
||||
this.element.style.display = "none"
|
||||
} else {
|
||||
this.element.style.display = "flex"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user