plugins: frontend event 'newListEntries'
Massimo Melina committed
Dec 11, 2024 at 15:06 UTC
11d8d85dd707419747f2dc2191cb2942d9c49e67
2 files changed
+5
dev-plugins.md
+4
@@ -423,6 +423,9 @@ This is a list of available frontend-events, with respective object parameter an
423
- an entry is being un/selected
424
- parameter `{ entry: DirEntry }`
425
- can be prevented
426
+- `newListEntries`
427
+ - new entries for the list have being fetched from the server
428
+ - parameter `{ entries: DirEntry[] }`
429
- All of the following have no parameters and you are supposed to output `Html` that will be displayed in the described place:
430
- `appendMenuBar` inside menu-bar, at the end
431
- `afterMenuBar` between menu-bar and breadcrumbs
@@ -698,6 +701,7 @@ If you want to override a text regardless of the language, use the special langu
701
- config.type: color
702
- init can now return directly the unload function
703
- api.i18n
704
+ - frontend event: newListEntries
705
- 9.6 (v0.54.0)
706
- frontend event: showPlay
707
- api.addBlock
frontend/src/useFetchList.ts
+1
@@ -73,6 +73,7 @@ export default function useFetchList() {
73
const flush = () => {
74
const chunk = buffer.splice(0, Infinity)
75
if (!chunk.length) return
76
+ hfsEvent('newListEntries', { entries: chunk })
77
state.list = sort([...state.list, ...chunk])
78
if (playShuffle) // find first proper file, and play it
79
for (const x of chunk)