Add server navigation controls across modes

This commit is contained in:
illusia committed 2026-10-12 12:01:51 +08:00
1 parent c6eeb49f44
commit 319a16f384
18 files changed
+372 -63

No files matched your search

+11 -7
View File
@@ -101,9 +101,11 @@ export default defineComponent({
styles: { type: Object as PropType<Record<string, string>>, default: () => ({}) },
assets: { type: Object as PropType<Record<string, Blob>>, default: () => ({}) },
page: { type: String as PropType<SkinRuntimePluginPage>, required: true },
mountRevision: { type: String, default: "" },
context: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },
actions: { type: Object as PropType<Partial<Record<SkinPluginAction, HostActionHandler>>>, default: () => ({}) },
mountRevision: { type: String, default: "" },
context: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },
actions: { type: Object as PropType<Partial<Record<SkinPluginAction, HostActionHandler>>>, default: () => ({}) },
serverAddLabel: { type: String, default: "添加服务器 / Add server" },
onAddServer: { type: Function as PropType<() => void>, default: () => undefined },
widgets: { type: Object as PropType<Partial<Record<SkinPluginHostWidget, (options?: SkinPluginWidgetOptions) => VNodeChild>>>, default: () => ({}) },
readSessionStatus: { type: Function as PropType<(signal: AbortSignal) => SkinExtensionSessionStatus | Promise<SkinExtensionSessionStatus>>, required: true },
},
@@ -379,10 +381,12 @@ export default defineComponent({
componentNamespace: plugin.id,
manageSurfaceRecovery: false,
page: props.page,
data: {},
assets: pluginAssets,
actions: {},
extensionPermissions: plugin.permissions,
data: {},
assets: pluginAssets,
actions: {},
serverAddLabel: props.serverAddLabel,
onAddServer: props.onAddServer,
extensionPermissions: plugin.permissions,
widgets: props.widgets,
onExtensionEvent: (event: unknown) => dispatch(plugin.id, event),
onSurfaceChange: (active: boolean) => surfaceChanged(plugin.id, active),