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:
2
plugin/webapp/dist/main.js
vendored
2
plugin/webapp/dist/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user