fix: restore repository_url as optional in ScriptCard, remove dead repo filters

This commit is contained in:
CanbiZ (MickLesk)
2026-03-17 14:25:10 +01:00
parent 0cbdae4de6
commit a7eccbf6e8
3 changed files with 2 additions and 32 deletions

View File

@@ -346,22 +346,6 @@ export function DownloadedScriptsTab({
});
}
// Filter by repositories
if (filters.selectedRepositories.length > 0) {
scripts = scripts.filter((script) => {
if (!script) return false;
const repoUrl = script.repository_url;
// If script has no repository_url, exclude it when filtering by repositories
if (!repoUrl) {
return false;
}
// Only include scripts from selected repositories
return filters.selectedRepositories.includes(repoUrl);
});
}
// Apply sorting
scripts.sort((a, b) => {
if (!a || !b) return 0;

View File

@@ -344,22 +344,6 @@ export function ScriptsGrid({ onInstallScript }: ScriptsGridProps) {
});
}
// Filter by repositories
if (filters.selectedRepositories.length > 0) {
scripts = scripts.filter((script) => {
if (!script) return false;
const repoUrl = script.repository_url;
// If script has no repository_url, exclude it when filtering by repositories
if (!repoUrl) {
return false;
}
// Only include scripts from selected repositories
return filters.selectedRepositories.includes(repoUrl);
});
}
// Exclude newest scripts from main grid when no filters are active (they'll be shown in carousel)
if (!hasActiveFilters) {
const newestScriptSlugs = new Set(

View File

@@ -87,6 +87,8 @@ export interface ScriptCard {
* Derived from the script type + slug convention.
*/
install_basenames?: string[];
/** Repository URL optional, only set for user-local JSON scripts. */
repository_url?: string;
is_dev?: boolean;
is_disabled?: boolean;
is_deleted?: boolean;