mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-27 05:31:53 +08:00
feat: 删掉提示
This commit is contained in:
+12
-16
@@ -60,7 +60,7 @@ export const Contro: React.FC<ControProps> = () => {
|
|||||||
setConnected(false);
|
setConnected(false);
|
||||||
setAutoFindFailedReason("Yakit WebSocket Controller Connect Fail");
|
setAutoFindFailedReason("Yakit WebSocket Controller Connect Fail");
|
||||||
localStorage.setItem("yakit-connect", "");
|
localStorage.setItem("yakit-connect", "");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (e.reason !== `FoundYakitWebSocketController` && port + 1 <= max) {
|
if (e.reason !== `FoundYakitWebSocketController` && port + 1 <= max) {
|
||||||
setTimeout(() => findPort(port + 1, max), 200);
|
setTimeout(() => findPort(port + 1, max), 200);
|
||||||
@@ -161,23 +161,19 @@ export const Contro: React.FC<ControProps> = () => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Divider type="vertical" style={{ height: 16 }} />
|
<Divider type="vertical" style={{ height: 16 }} />
|
||||||
{safeConnected && (
|
{safeConnected && (
|
||||||
<Tooltip title="断开连接">
|
<ExitIcon onClick={() => wsc.disconnect()} />
|
||||||
<ExitIcon onClick={() => wsc.disconnect()} />
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
{failConnected && (
|
{failConnected && (
|
||||||
<Tooltip title="重新连接">
|
<RefreshIcon
|
||||||
<RefreshIcon
|
className="grey-icon icon-active"
|
||||||
className="grey-icon icon-active"
|
onClick={() => {
|
||||||
onClick={() => {
|
if (enginePort) {
|
||||||
if (enginePort) {
|
connectPort(Number(enginePort));
|
||||||
connectPort(Number(enginePort));
|
} else {
|
||||||
} else {
|
findPort(11212, 11222);
|
||||||
findPort(11212, 11222);
|
}
|
||||||
}
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user