fix(plugins/settings.plugins): allow resolving internal plugins when planning installs
This commit is contained in:
parent
c49f3eb471
commit
261a493f4b
1 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue