mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-27 16:09:21 +01:00
fix: don't show wsh error for a connection error (#1438)
This commit is contained in:
parent
6a3f72830b
commit
43c134ea9a
@ -186,10 +186,7 @@ const BlockFrame_Header = ({
|
||||
const dragHandleRef = preview ? null : nodeModel.dragHandleRef;
|
||||
const connName = blockData?.meta?.connection;
|
||||
const connStatus = util.useAtomValueSafe(getConnStatusAtom(connName));
|
||||
const wshEnabled =
|
||||
(connName &&
|
||||
(connStatus?.status == "connecting" || (connStatus?.wshenabled && connStatus?.status == "connected"))) ??
|
||||
true;
|
||||
const wshProblem = connName && !connStatus?.wshenabled && connStatus?.status == "connected";
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!magnified || preview || prevMagifiedState.current) {
|
||||
@ -269,7 +266,7 @@ const BlockFrame_Header = ({
|
||||
changeConnModalAtom={changeConnModalAtom}
|
||||
/>
|
||||
)}
|
||||
{manageConnection && !wshEnabled && (
|
||||
{manageConnection && wshProblem && (
|
||||
<IconButton decl={wshInstallButton} className="block-frame-header-iconbutton" />
|
||||
)}
|
||||
<div className="block-frame-textelems-wrapper">{headerTextElems}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user