fix: restore repository_url as optional in ScriptCard, remove dead repo filters
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user