Skip to content

Commit

Permalink
fix: 修复 可以看到 rdp 文件的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler authored and BaiJiangJie committed Mar 18, 2022
1 parent 15281d6 commit 0ecfd5d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/app/services/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,16 @@ export class AppService {
for (const [protocol, types] of Object.entries(ProtocolConnectTypes)) {
validTypes[protocol] = types.filter((tp) => {
// 没有开启 xrdp 不支持 连接 xrdp
if (xrdpEnabled === false && [TYPE_RDP_CLIENT.id, TYPE_RDP_FILE.id].indexOf(tp.id) > -1) {
if ([TYPE_RDP_CLIENT.id, TYPE_RDP_FILE.id].indexOf(tp.id) > -1 && !xrdpEnabled) {
return false;
}
if (!localStorage.getItem('MAGNUS_ENABLE')) {
return TYPE_DB_CLI.id !== tp.id;
if (TYPE_DB_CLI.id === tp.id) {
return localStorage.getItem('MAGNUS_ENABLE');
}
if (!xpackEnabled && tp.requireXPack) {
if (tp.requireXPack && !xpackEnabled) {
return false;
} else {
return true;
}
return true;
});
}
return validTypes;
Expand Down

0 comments on commit 0ecfd5d

Please sign in to comment.