mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
show table even when no addresses
This commit is contained in:
@@ -171,14 +171,26 @@ export class InterfaceService {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also include URL plugins that have no addresses yet
|
||||||
|
if (allPackageData) {
|
||||||
|
for (const [pkgId, pkg] of Object.entries(allPackageData)) {
|
||||||
|
if (pkg.plugin?.url && !groupMap.has(pkgId)) {
|
||||||
|
groupMap.set(pkgId, [])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Array.from(groupMap.entries()).map(([pluginId, addresses]) => {
|
return Array.from(groupMap.entries()).map(([pluginId, addresses]) => {
|
||||||
const pluginPkg = allPackageData?.[pluginId]
|
const pluginPkg = allPackageData?.[pluginId]
|
||||||
const pluginActions = pluginPkg?.actions ?? {}
|
const pluginActions = pluginPkg?.actions ?? {}
|
||||||
const tableActionId = pluginPkg?.plugin?.url?.tableAction ?? null
|
const tableActionId = pluginPkg?.plugin?.url?.tableAction ?? null
|
||||||
const tableActionMeta = tableActionId ? pluginActions[tableActionId] : undefined
|
const tableActionMeta = tableActionId
|
||||||
const tableAction = tableActionId && tableActionMeta
|
? pluginActions[tableActionId]
|
||||||
? { id: tableActionId, metadata: tableActionMeta }
|
: undefined
|
||||||
: null
|
const tableAction =
|
||||||
|
tableActionId && tableActionMeta
|
||||||
|
? { id: tableActionId, metadata: tableActionMeta }
|
||||||
|
: null
|
||||||
|
|
||||||
let pluginPkgInfo: PluginPkgInfo | null = null
|
let pluginPkgInfo: PluginPkgInfo | null = null
|
||||||
if (pluginPkg) {
|
if (pluginPkg) {
|
||||||
@@ -193,7 +205,9 @@ export class InterfaceService {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
pluginId,
|
pluginId,
|
||||||
pluginName: pluginPkgInfo?.title ?? pluginId.charAt(0).toUpperCase() + pluginId.slice(1),
|
pluginName:
|
||||||
|
pluginPkgInfo?.title ??
|
||||||
|
pluginId.charAt(0).toUpperCase() + pluginId.slice(1),
|
||||||
addresses,
|
addresses,
|
||||||
tableAction,
|
tableAction,
|
||||||
pluginPkgInfo,
|
pluginPkgInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user