Download multiple files as zip

This commit is contained in:
eikek
2022-04-09 14:01:36 +02:00
parent e65b8de686
commit 4488291319
55 changed files with 2328 additions and 38 deletions

View File

@ -14,6 +14,7 @@ import Api
import App.Data exposing (..)
import Browser exposing (UrlRequest(..))
import Browser.Navigation as Nav
import Comp.DownloadAll
import Data.AppEvent exposing (AppEvent(..))
import Data.Environment as Env
import Data.Flags
@ -317,6 +318,9 @@ updateWithSub msg model =
isProcessItem =
task == "process-item"
isDownloadZip =
task == "download-query-zip"
newModel =
{ model
| showNewItemsArrived = isProcessItem && not (Page.isSearchPage model.page)
@ -326,6 +330,9 @@ updateWithSub msg model =
if Page.isSearchPage model.page && isProcessItem then
updateSearch texts Page.Search.Data.RefreshView newModel
else if Page.isSearchPage model.page && isDownloadZip then
updateSearch texts (Page.Search.Data.DownloadAllMsg Comp.DownloadAll.checkDownload) newModel
else if Page.isDashboardPage model.page && isProcessItem then
updateDashboard texts Page.Dashboard.Data.reloadDashboardData newModel