Commit 4a4f3ae
feat(servers): add Disconnect entry to the server context menu when connected
Pairs with the pulsing health indicator from the previous commit and
closes the other half of issue #222: the right-click menu on a saved
server now offers a Disconnect entry, but only when the profile has
at least one open session in the tab strip. When nothing is connected
the entry simply does not appear, so the menu mirrors the actual
connection state instead of showing a no-op.
Disconnect closes every session whose savedServerId matches the
selected profile (covers the multi-tab case where the same saved
server has been opened more than once). It reuses the existing
closeSession path, which already takes care of switching to another
session or calling disconnectFromFtp when nothing is left.
Wiring is symmetric with activeProfileIds: App.tsx exposes a
disconnectProfile(profileId) callback, IntroHub forwards it, and
MyServersPanel reads activeProfileIds + onDisconnectProfile from
props to gate the entry. No new i18n key needed: common.disconnect
is already translated in every locale.
Co-Authored-By: aeroftp[bot] <aeroftp[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Rael Bauer <13108198+raelb@users.noreply.github.com>1 parent 861cf7d commit 4a4f3ae
3 files changed
Lines changed: 40 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5085 | 5085 | | |
5086 | 5086 | | |
5087 | 5087 | | |
| 5088 | + | |
| 5089 | + | |
| 5090 | + | |
| 5091 | + | |
| 5092 | + | |
| 5093 | + | |
| 5094 | + | |
| 5095 | + | |
| 5096 | + | |
| 5097 | + | |
| 5098 | + | |
| 5099 | + | |
| 5100 | + | |
5088 | 5101 | | |
5089 | 5102 | | |
5090 | 5103 | | |
| |||
11791 | 11804 | | |
11792 | 11805 | | |
11793 | 11806 | | |
| 11807 | + | |
11794 | 11808 | | |
11795 | 11809 | | |
11796 | 11810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
387 | 392 | | |
388 | 393 | | |
389 | 394 | | |
| 395 | + | |
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| 268 | + | |
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
| |||
1058 | 1062 | | |
1059 | 1063 | | |
1060 | 1064 | | |
| 1065 | + | |
1061 | 1066 | | |
1062 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1063 | 1080 | | |
1064 | 1081 | | |
1065 | 1082 | | |
1066 | 1083 | | |
1067 | | - | |
| 1084 | + | |
1068 | 1085 | | |
1069 | 1086 | | |
1070 | 1087 | | |
| |||
1090 | 1107 | | |
1091 | 1108 | | |
1092 | 1109 | | |
1093 | | - | |
| 1110 | + | |
1094 | 1111 | | |
1095 | 1112 | | |
1096 | 1113 | | |
| |||
0 commit comments