fix: show Add Device button in Web environment

This commit is contained in:
yczpf2019
2026-01-24 18:30:47 +08:00
parent 49d6ec88f0
commit aa85c7ef27

View File

@@ -174,7 +174,8 @@ class App extends Component {
id: 'port-add-btn', id: 'port-add-btn',
displayText: Msg.Lang['nav.btn.addDevice'], displayText: Msg.Lang['nav.btn.addDevice'],
preconditionFn: () => { preconditionFn: () => {
if (goog.isElectron || Env.hasSocketServer) { // 在 Web 环境下始终显示添加设备按钮
if (goog.isElectron) {
return false; return false;
} }
return true; return true;