fix(plugins/settings.plugins): allow resolving internal plugins when planning installs

This commit is contained in:
PalmDevs 2026-07-31 13:16:26 +07:00
parent c49f3eb471
commit 261a493f4b
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -70,6 +70,7 @@ const Sorts: Record<BrowseSortKey, (a: BrowseEntry, b: BrowseEntry) => number> =
function Screen() {
const [entries, setEntries] = useState<BrowseEntry[]>([])
const [internalRepos, setInternalRepos] = useState<string[]>([])
const [search, setSearch] = useState('')
const debouncedSetSearch = useCallback(
@ -86,6 +87,10 @@ function Screen() {
const repos = await listRepos()
const all: BrowseEntry[] = []
setInternalRepos(
repos.filter(repo => repo.internal).map(repo => repo.url),
)
await Promise.all(
repos
.filter(repo => !repo.internal && repo.enabled)
@ -158,11 +163,12 @@ function Screen() {
entry.listing.id,
entry.version || undefined,
entry.channel,
[entry.repoUrl],
// Internal repos so external plugins can link against internal plugins as well
[...internalRepos, entry.repoUrl],
)
load()
},
[load],
[internalRepos, load],
)
// Repositories that currently have entries, for the filter sheet