mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-12-15 16:46:24 +00:00
Update AppImage
This commit is contained in:
@@ -5,6 +5,7 @@ import { GeistMono } from "geist/font/mono"
|
|||||||
import { ThemeProvider } from "../components/theme-provider"
|
import { ThemeProvider } from "../components/theme-provider"
|
||||||
import { Suspense } from "react"
|
import { Suspense } from "react"
|
||||||
import "./globals.css"
|
import "./globals.css"
|
||||||
|
import "./terminal.css"
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "ProxMenux Monitor",
|
title: "ProxMenux Monitor",
|
||||||
|
|||||||
31
AppImage/app/terminal.css
Normal file
31
AppImage/app/terminal.css
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/* Force remove all xterm.js internal padding and margins */
|
||||||
|
.xterm {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xterm-viewport {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xterm-screen {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xterm-rows {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xterm-helpers {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure terminal container has no padding */
|
||||||
|
[class*="terminal-container"] {
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
@@ -319,26 +319,38 @@ export const TerminalPanel: React.FC<TerminalPanelProps> = ({ websocketUrl, onCl
|
|||||||
|
|
||||||
term.open(container)
|
term.open(container)
|
||||||
|
|
||||||
const xtermElement = container.querySelector(".xterm") as HTMLElement
|
const removeXtermPadding = () => {
|
||||||
const xtermViewport = container.querySelector(".xterm-viewport") as HTMLElement
|
const xtermElement = container.querySelector(".xterm") as HTMLElement
|
||||||
const xtermScreen = container.querySelector(".xterm-screen") as HTMLElement
|
const xtermViewport = container.querySelector(".xterm-viewport") as HTMLElement
|
||||||
|
const xtermScreen = container.querySelector(".xterm-screen") as HTMLElement
|
||||||
|
const xtermRows = container.querySelector(".xterm-rows") as HTMLElement
|
||||||
|
|
||||||
if (xtermElement) {
|
if (xtermElement) {
|
||||||
xtermElement.style.padding = "0"
|
xtermElement.style.padding = "0"
|
||||||
xtermElement.style.margin = "0"
|
xtermElement.style.margin = "0"
|
||||||
}
|
}
|
||||||
if (xtermViewport) {
|
if (xtermViewport) {
|
||||||
xtermViewport.style.padding = "0"
|
xtermViewport.style.padding = "0"
|
||||||
xtermViewport.style.margin = "0"
|
xtermViewport.style.margin = "0"
|
||||||
}
|
}
|
||||||
if (xtermScreen) {
|
if (xtermScreen) {
|
||||||
xtermScreen.style.padding = "0"
|
xtermScreen.style.padding = "0"
|
||||||
xtermScreen.style.margin = "0"
|
xtermScreen.style.margin = "0"
|
||||||
|
}
|
||||||
|
if (xtermRows) {
|
||||||
|
xtermRows.style.padding = "0"
|
||||||
|
xtermRows.style.margin = "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove padding immediately
|
||||||
|
removeXtermPadding()
|
||||||
|
|
||||||
|
// Remove padding again after a short delay to ensure it applies
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
removeXtermPadding()
|
||||||
fitAddon.fit()
|
fitAddon.fit()
|
||||||
}, 50)
|
}, 100)
|
||||||
|
|
||||||
const wsUrl = websocketUrl || getWebSocketUrl()
|
const wsUrl = websocketUrl || getWebSocketUrl()
|
||||||
const ws = new WebSocket(wsUrl)
|
const ws = new WebSocket(wsUrl)
|
||||||
|
|||||||
Reference in New Issue
Block a user