projects
/
oweals
/
peertube.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix menu on mobile
[oweals/peertube.git]
/
client
/
src
/
app
/
app.component.ts
diff --git
a/client/src/app/app.component.ts
b/client/src/app/app.component.ts
index a69f419be973cb01e0e43ae5d0c76f463bced168..5086384f46e0c86abe842e1c0fe5ca65e0949a25 100644
(file)
--- a/
client/src/app/app.component.ts
+++ b/
client/src/app/app.component.ts
@@
-124,27
+124,35
@@
export class AppComponent implements OnInit {
})
this.hotkeysService.add([
})
this.hotkeysService.add([
- new Hotkey(
'/'
, (event: KeyboardEvent): boolean => {
+ new Hotkey(
['/', 's']
, (event: KeyboardEvent): boolean => {
document.getElementById('search-video').focus()
document.getElementById('search-video').focus()
- return false
// Prevent bubbling
+ return false
}, undefined, 'Focus the search bar'),
}, undefined, 'Focus the search bar'),
- new Hotkey('g+s', (event: KeyboardEvent): boolean => {
+ new Hotkey('b', (event: KeyboardEvent): boolean => {
+ this.toggleMenu()
+ return false
+ }, undefined, 'Toggle the left menu'),
+ new Hotkey('g s', (event: KeyboardEvent): boolean => {
this.router.navigate([ '/videos/subscriptions' ])
return false
}, undefined, 'Go to the subscriptions videos page'),
this.router.navigate([ '/videos/subscriptions' ])
return false
}, undefined, 'Go to the subscriptions videos page'),
- new Hotkey('g+t', (event: KeyboardEvent): boolean => {
+ new Hotkey('g o', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/overview' ])
+ return false
+ }, undefined, 'Go to the videos overview page'),
+ new Hotkey('g t', (event: KeyboardEvent): boolean => {
this.router.navigate([ '/videos/trending' ])
return false
}, undefined, 'Go to the trending videos page'),
this.router.navigate([ '/videos/trending' ])
return false
}, undefined, 'Go to the trending videos page'),
- new Hotkey('g
+
r', (event: KeyboardEvent): boolean => {
+ new Hotkey('g
r', (event: KeyboardEvent): boolean => {
this.router.navigate([ '/videos/recently-added' ])
return false
}, undefined, 'Go to the recently added videos page'),
this.router.navigate([ '/videos/recently-added' ])
return false
}, undefined, 'Go to the recently added videos page'),
- new Hotkey('g
+
l', (event: KeyboardEvent): boolean => {
+ new Hotkey('g
l', (event: KeyboardEvent): boolean => {
this.router.navigate([ '/videos/local' ])
return false
}, undefined, 'Go to the local videos page'),
this.router.navigate([ '/videos/local' ])
return false
}, undefined, 'Go to the local videos page'),
- new Hotkey('g
+
u', (event: KeyboardEvent): boolean => {
+ new Hotkey('g
u', (event: KeyboardEvent): boolean => {
this.router.navigate([ '/videos/upload' ])
return false
}, undefined, 'Go to the videos upload page')
this.router.navigate([ '/videos/upload' ])
return false
}, undefined, 'Go to the videos upload page')