mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-10 05:55:18 +00:00
refactor: code cleanup
This commit is contained in:
@@ -66,7 +66,7 @@ export const TerminalModal = ({ children, serverId }: Props) => {
|
||||
)}
|
||||
|
||||
<div className="flex flex-col gap-4 h-[552px]">
|
||||
<Terminal key={terminalKey} id="terminal" serverId={serverId} />
|
||||
<Terminal id="terminal" key={terminalKey} serverId={serverId} />
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
@@ -41,12 +41,10 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
|
||||
|
||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
|
||||
const isLocalServer = serverId === "local";
|
||||
|
||||
const urlParams = new URLSearchParams();
|
||||
urlParams.set("serverId", serverId);
|
||||
|
||||
if (isLocalServer) {
|
||||
if (serverId === "local") {
|
||||
const { port, username } = getLocalServerData();
|
||||
urlParams.set("port", port.toString());
|
||||
urlParams.set("username", username);
|
||||
|
||||
Reference in New Issue
Block a user