perPage = 300 for scripts page

This commit is contained in:
Ruben Fiszel
2022-08-01 12:51:18 +02:00
parent 2fa7cf8e36
commit 5578fc30ea

View File

@@ -128,17 +128,16 @@
}
async function loadScripts(): Promise<void> {
const allScripts = (await ScriptService.listScripts({ workspace: $workspaceStore! })).map(
(x: Script) => {
let t: Tab = x.workspace_id == $workspaceStore ? tabFromPath(x.path) : 'examples'
return {
canWrite:
canWrite(x.path, x.extra_perms, $userStore) && x.workspace_id == $workspaceStore,
tab: t,
...x
}
const allScripts = (
await ScriptService.listScripts({ workspace: $workspaceStore!, perPage: 300 })
).map((x: Script) => {
let t: Tab = x.workspace_id == $workspaceStore ? tabFromPath(x.path) : 'examples'
return {
canWrite: canWrite(x.path, x.extra_perms, $userStore) && x.workspace_id == $workspaceStore,
tab: t,
...x
}
)
})
scripts = tab == 'all' ? allScripts : allScripts.filter((x) => x.tab == tab)
fuse.setCollection(scripts)
}