mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +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]) => {
|
||||
const pluginPkg = allPackageData?.[pluginId]
|
||||
const pluginActions = pluginPkg?.actions ?? {}
|
||||
const tableActionId = pluginPkg?.plugin?.url?.tableAction ?? null
|
||||
const tableActionMeta = tableActionId ? pluginActions[tableActionId] : undefined
|
||||
const tableAction = tableActionId && tableActionMeta
|
||||
? { id: tableActionId, metadata: tableActionMeta }
|
||||
: null
|
||||
const tableActionMeta = tableActionId
|
||||
? pluginActions[tableActionId]
|
||||
: undefined
|
||||
const tableAction =
|
||||
tableActionId && tableActionMeta
|
||||
? { id: tableActionId, metadata: tableActionMeta }
|
||||
: null
|
||||
|
||||
let pluginPkgInfo: PluginPkgInfo | null = null
|
||||
if (pluginPkg) {
|
||||
@@ -193,7 +205,9 @@ export class InterfaceService {
|
||||
|
||||
return {
|
||||
pluginId,
|
||||
pluginName: pluginPkgInfo?.title ?? pluginId.charAt(0).toUpperCase() + pluginId.slice(1),
|
||||
pluginName:
|
||||
pluginPkgInfo?.title ??
|
||||
pluginId.charAt(0).toUpperCase() + pluginId.slice(1),
|
||||
addresses,
|
||||
tableAction,
|
||||
pluginPkgInfo,
|
||||
|
||||
Reference in New Issue
Block a user