Minor changes

This commit is contained in:
2018-03-07 14:52:56 +01:00
parent d583d9d6f9
commit 1b0aa76009
6 changed files with 31 additions and 5 deletions

View File

@ -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")

View File

@ -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"
}
}
}