mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-28 19:22:39 +01:00
Add test actions to copy-curl plugin and add WebSocket request actions to Sidebar
This commit is contained in:
1 parent
3855058d8f
commit
7446d62e39
3 files changed
+103
No files matched your search
@@ -37,6 +37,7 @@ import { getCreateDropdownItems } from '../hooks/useCreateDropdownItems';
|
||||
import { getGrpcRequestActions } from '../hooks/useGrpcRequestActions';
|
||||
import { useHotKey } from '../hooks/useHotKey';
|
||||
import { getHttpRequestActions } from '../hooks/useHttpRequestActions';
|
||||
import { getWebSocketRequestActions } from '../hooks/useWebSocketRequestActions';
|
||||
import { getWorkspaceActions } from '../hooks/useWorkspaceActions';
|
||||
import { getFolderActions } from '../hooks/useFolderActions';
|
||||
import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent';
|
||||
@@ -376,6 +377,17 @@ function Sidebar({ className }: { className?: string }) {
|
||||
if (request != null) await a.call(request);
|
||||
},
|
||||
})),
|
||||
...(items.length === 1 && child.model === 'websocket_request'
|
||||
? await getWebSocketRequestActions()
|
||||
: []
|
||||
).map((a) => ({
|
||||
label: a.label,
|
||||
leftSlot: <Icon icon={a.icon ?? 'empty'} />,
|
||||
onSelect: async () => {
|
||||
const request = getModel('websocket_request', child.id);
|
||||
if (request != null) await a.call(request);
|
||||
},
|
||||
})),
|
||||
...(items.length === 1 && child.model === 'workspace'
|
||||
? await getWorkspaceActions()
|
||||
: []
|
||||
|
||||
Reference in new issue
Block a user