Fix: Detect downloaded scripts from all directories (ct, tools, vm, vw) (#120)
* Fix: Detect downloaded scripts from all directories (ct, tools, vm, vw) - Add getAllDownloadedScripts() method to scan all script directories - Update DownloadedScriptsTab to use new API endpoint - Update ScriptsGrid to use new API endpoint for download status detection - Update main page script counts to use new API endpoint - Add recursive directory scanning to handle subdirectories - Maintain backward compatibility with existing getCtScripts endpoint Fixes issue where scripts downloaded to tools/, vm/, or vw/ directories were not showing in Downloaded Scripts tab or showing correct download status in Available Scripts tab. * Fix: Remove redundant type annotation and method call arguments - Remove redundant string type annotation from relativePath parameter - Fix getScriptsFromDirectory method call to match updated signature
This commit is contained in:
committed by
GitHub
parent
c12c96cfb9
commit
9d83697d45
@@ -27,6 +27,16 @@ export const scriptsRouter = createTRPCRouter({
|
||||
};
|
||||
}),
|
||||
|
||||
// Get all downloaded scripts from all directories
|
||||
getAllDownloadedScripts: publicProcedure
|
||||
.query(async () => {
|
||||
const scripts = await scriptManager.getAllDownloadedScripts();
|
||||
return {
|
||||
scripts,
|
||||
directoryInfo: scriptManager.getScriptsDirectoryInfo()
|
||||
};
|
||||
}),
|
||||
|
||||
|
||||
// Get script content for viewing
|
||||
getScriptContent: publicProcedure
|
||||
|
||||
Reference in New Issue
Block a user