feat: RHS panel + channel header button + public icon

- Switched from registerAppBarComponent (not in MM 11.4 build) to
  registerChannelHeaderButtonAction + registerRightHandSidebarComponent
- Added public/icon.svg for channel header button
- Fixed store dispatch for RHS toggle action
- Plugin deployment permissions fix (uid 2000)
This commit is contained in:
sol
2026-03-08 20:13:08 +00:00
parent f0a51ce411
commit 9ec52a418d
3 changed files with 23 additions and 8 deletions

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#166de0">
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-1 14H5V6h14v12zM7 9h2v2H7zm0 4h2v2H7zm4-4h6v2h-6zm0 4h6v2h-6z"/>
</svg>

After

Width:  |  Height:  |  Size: 237 B

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { PluginRegistry, WebSocketPayload, LiveStatusData } from './types';
import LiveStatusPost from './components/live_status_post';
import RHSPanel from './components/rhs_panel';
@@ -16,13 +17,24 @@ class LiveStatusPlugin {
LiveStatusPost,
);
// Register RHS panel with AppBar icon
// This creates both the sidebar component and the toolbar button to toggle it
registry.registerAppBarComponent({
iconUrl: '', // Empty = use default plugin icon from assets/icon.svg
tooltipText: 'Agent Status',
rhsComponent: RHSPanel,
rhsTitle: 'Agent Status',
// Register RHS sidebar component
const rhsResult = registry.registerRightHandSidebarComponent({
component: RHSPanel,
title: 'Agent Status',
});
// Add channel header button to toggle the RHS panel
const toggleAction = rhsResult.toggleRHSPlugin;
registry.registerChannelHeaderButtonAction({
icon: React.createElement('i', {
className: 'icon icon-cog-outline',
style: { fontSize: '18px' },
}),
action: () => {
store.dispatch(toggleAction);
},
dropdownText: 'Agent Status',
tooltipText: 'Toggle Agent Status panel',
});
// Register WebSocket event handler