avoid sending list of files when zipping all files, as an optimization but also works around the limit on the size of the list that we can send
Massimo Melina committed
Nov 18, 2025 at 22:42 UTC
54a5eef932599b0a21b17af053d0afa70b842443
1 file changed
+5
-1
frontend/src/menu.ts
+5
-1
@@ -104,7 +104,7 @@ export function MenuPanel() {
104
href: buildUrlQueryString(_.pickBy({
105
get: 'zip',
106
...remoteSearch,
107
- list
107
+ list: isAllSelected() ? undefined : list
108
})),
109
...!list && {
110
confirm: remoteSearch ? t('zip_confirm_search', "Download ALL results of this search as ZIP archive?")
@@ -156,6 +156,10 @@ export function MenuPanel() {
156
}
157
}
158
159
+function isAllSelected() {
160
+ return state.list.every(x => state.selected[x.uri])
161
+}
162
+
163
export function MenuLink({ href, target, confirm, confirmOptions, id, ...rest }: BtnProps & { href: string, target?: string, confirm?: string, confirmOptions?: ConfirmOptions }) {
164
return h('a', {
165
tabIndex: -1,