diff options
Diffstat (limited to 'src/stores/UIStore.ts')
-rw-r--r-- | src/stores/UIStore.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts index 4ed45fc3b..a3330c2e6 100644 --- a/src/stores/UIStore.ts +++ b/src/stores/UIStore.ts | |||
@@ -18,6 +18,7 @@ export default class UIStore extends TypedStore { | |||
18 | makeObservable(this); | 18 | makeObservable(this); |
19 | 19 | ||
20 | // Register action handlers | 20 | // Register action handlers |
21 | this.actions.ui.openDownloads.listen(this._openDownloads.bind(this)); | ||
21 | this.actions.ui.openSettings.listen(this._openSettings.bind(this)); | 22 | this.actions.ui.openSettings.listen(this._openSettings.bind(this)); |
22 | this.actions.ui.closeSettings.listen(this._closeSettings.bind(this)); | 23 | this.actions.ui.closeSettings.listen(this._closeSettings.bind(this)); |
23 | this.actions.ui.toggleServiceUpdatedInfoBar.listen( | 24 | this.actions.ui.toggleServiceUpdatedInfoBar.listen( |
@@ -97,6 +98,12 @@ export default class UIStore extends TypedStore { | |||
97 | } | 98 | } |
98 | 99 | ||
99 | // Actions | 100 | // Actions |
101 | @action _openDownloads({ path = '/downloadmanager' }): void { | ||
102 | const downloadsPath = | ||
103 | path === '/downloadmanager' ? path : `/downloadmanager/${path}`; | ||
104 | this.stores.router.push(downloadsPath); | ||
105 | } | ||
106 | |||
100 | @action _openSettings({ path = '/settings' }): void { | 107 | @action _openSettings({ path = '/settings' }): void { |
101 | const settingsPath = path === '/settings' ? path : `/settings/${path}`; | 108 | const settingsPath = path === '/settings' ? path : `/settings/${path}`; |
102 | this.stores.router.push(settingsPath); | 109 | this.stores.router.push(settingsPath); |