This commit is contained in:
ACoolName 2024-06-02 22:14:03 +03:00
parent 8e67cae328
commit 16f7aefb82

View File

@ -288,9 +288,11 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
</body> </body>
</html> </html>
`) `)
const root = ReactDOM.createRoot(NewWindow.document.getElementById('root') as HTMLElement) NewWindow.onload = () => {
root.render(<TerminalComponent websocket={websocket}/>) const root = ReactDOM.createRoot(NewWindow.document.getElementById('root') as HTMLElement);
} root.render(<TerminalComponent websocket={websocket}/>);
};
}
return (<> return (<>
<Button variant={p.variant} disabled={!isUserAllowed(user, p.action)} onClick={() => { if (p.onClick) { p.onClick() } p.action.response_action == 'Terminal'?createTerminal(`ws${API_URL.slice("http".length)}${url}`):setForm(true) }} sx={p.sx}>{p.action.name}</Button > <Button variant={p.variant} disabled={!isUserAllowed(user, p.action)} onClick={() => { if (p.onClick) { p.onClick() } p.action.response_action == 'Terminal'?createTerminal(`ws${API_URL.slice("http".length)}${url}`):setForm(true) }} sx={p.sx}>{p.action.name}</Button >