diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2023-09-02 16:28:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-02 15:28:04 +0000 |
commit | d1c623f4c3d72c859f9ad9cb985be127d6a3eb62 (patch) | |
tree | e102da856ae328c70e822d60ac53909acd4627b9 /src/stores/UIStore.ts | |
parent | Downgrade 'electron' to 25.x (diff) | |
download | ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.tar.gz ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.tar.zst ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.zip |
feat: Add Download Manager (pause, stop, delete) (#1339)
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); |