tabby-rdp 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +580 -0
  2. package/README.md +252 -34
  3. package/dist/accountForm.js +0 -1
  4. package/dist/accounts.js +0 -1
  5. package/dist/audio.js +0 -1
  6. package/dist/authorities.js +331 -0
  7. package/dist/byteQueue.js +102 -0
  8. package/dist/clipboard.js +106 -0
  9. package/dist/connectionStatus.js +0 -1
  10. package/dist/desk.js +16 -47
  11. package/dist/deskScript.js +196 -6
  12. package/dist/desktop.service.js +1763 -204
  13. package/dist/desktopForm.js +72 -13
  14. package/dist/desktops.js +243 -19
  15. package/dist/drives.js +525 -0
  16. package/dist/fileTransfer.js +1064 -72
  17. package/dist/gateway.js +651 -0
  18. package/dist/header.js +76 -5
  19. package/dist/help.js +34 -13
  20. package/dist/hyperv.js +129 -0
  21. package/dist/index.js +2 -2
  22. package/dist/keyboard.js +0 -1
  23. package/dist/microphone.js +57 -13
  24. package/dist/ntlm.js +225 -0
  25. package/dist/osd.js +56 -15
  26. package/dist/probe.js +15 -3
  27. package/dist/rdcleanpath.js +468 -52
  28. package/dist/rdpFile.js +53 -4
  29. package/dist/rdpProfile.js +75 -22
  30. package/dist/remoteSetup.js +103 -23
  31. package/dist/sessionLog.js +53 -0
  32. package/dist/settingsPage.js +117 -27
  33. package/dist/signin.js +429 -54
  34. package/dist/ssh.js +99 -18
  35. package/dist/sshChannelStream.js +50 -6
  36. package/dist/targets.js +185 -39
  37. package/dist/ui.js +98 -20
  38. package/dist/unshowable.js +41 -0
  39. package/dist/updates.js +37 -2
  40. package/dist/vms.js +36 -5
  41. package/dist/wake.js +31 -12
  42. package/package.json +4 -3
  43. package/remote/trd-pty.py +74 -13
  44. package/vendor/SHA256SUMS +26 -0
  45. package/vendor/iron-remote-desktop-rdp.js +418 -390
  46. package/vendor/ironrdp_web_bg.wasm +0 -0
  47. package/dist/accountForm.js.map +0 -1
  48. package/dist/accounts.js.map +0 -1
  49. package/dist/audio.js.map +0 -1
  50. package/dist/connectionStatus.js.map +0 -1
  51. package/dist/desk.js.map +0 -1
  52. package/dist/deskScript.js.map +0 -1
  53. package/dist/desktop.service.js.map +0 -1
  54. package/dist/desktopForm.js.map +0 -1
  55. package/dist/desktops.js.map +0 -1
  56. package/dist/fileTransfer.js.map +0 -1
  57. package/dist/header.js.map +0 -1
  58. package/dist/help.js.map +0 -1
  59. package/dist/index.js.map +0 -1
  60. package/dist/keyboard.js.map +0 -1
  61. package/dist/microphone.js.map +0 -1
  62. package/dist/osd.js.map +0 -1
  63. package/dist/probe.js.map +0 -1
  64. package/dist/rdcleanpath.js.map +0 -1
  65. package/dist/rdpFile.js.map +0 -1
  66. package/dist/rdpProfile.js.map +0 -1
  67. package/dist/remoteSetup.js.map +0 -1
  68. package/dist/settingsPage.js.map +0 -1
  69. package/dist/signin.js.map +0 -1
  70. package/dist/ssh.js.map +0 -1
  71. package/dist/sshChannelStream.js.map +0 -1
  72. package/dist/targets.js.map +0 -1
  73. package/dist/ui.js.map +0 -1
  74. package/dist/updates.js.map +0 -1
  75. package/dist/vms.js.map +0 -1
  76. package/dist/wake.js.map +0 -1
@@ -11,15 +11,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RemoteDesktopSettingsComponent = exports.RemoteDesktopSettingsTab = void 0;
13
13
  const core_1 = require("@angular/core");
14
+ const path_1 = require("path");
14
15
  const tabby_core_1 = require("tabby-core");
15
16
  const tabby_settings_1 = require("tabby-settings");
16
17
  const accounts_1 = require("./accounts");
18
+ const clipboard_1 = require("./clipboard");
17
19
  const desktop_service_1 = require("./desktop.service");
18
20
  const desktops_1 = require("./desktops");
21
+ const drives_1 = require("./drives");
19
22
  const osd_1 = require("./osd");
20
23
  const help_1 = require("./help");
21
24
  const updates_1 = require("./updates");
22
25
  const targets_1 = require("./targets");
26
+ const unshowable_1 = require("./unshowable");
23
27
  const REPO = 'https://github.com/meanaverage/tabby-rdp';
24
28
  const k = (s) => `<kbd>${(0, help_1.esc)(s)}</kbd>`;
25
29
  /** The page's tabs (as Tabby's "Profiles & connections" page has Profiles and Advanced), each holding sections by topic. */
@@ -57,7 +61,7 @@ const STYLE = `
57
61
  .trd-settings .trd-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 6px;
58
62
  border: 1px solid rgba(128, 128, 128, 0.25); }
59
63
  .trd-settings .trd-card .trd-card-title { font-weight: 600; display: flex; align-items: center; gap: 6px; }
60
- .trd-settings h4 .trd-info, .trd-settings .trd-lead .trd-info { margin-left: 4px; vertical-align: middle; font-size: 13px; }
64
+ .trd-settings h4 .trd-info, .trd-settings .trd-lead .trd-info, .trd-settings .form-line .title .trd-info { margin-left: 4px; vertical-align: middle; font-size: 13px; }
61
65
  .trd-settings .trd-info { position: relative; display: inline-flex; opacity: 0.55; cursor: help; outline: none; font-weight: normal; }
62
66
  .trd-settings .trd-info:hover, .trd-settings .trd-info:focus { opacity: 1; }
63
67
  .trd-settings .trd-info::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: 260px;
@@ -101,6 +105,8 @@ const STYLE = `
101
105
  .trd-settings .trd-account-form .trd-account-error:empty { display: none; }
102
106
  .trd-settings .trd-account-form .trd-account-buttons { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
103
107
  .trd-settings .trd-list + .trd-add { margin-top: 10px; display: flex; gap: 6px; align-items: center; }
108
+ .trd-settings .trd-row .trd-folder-readonly { flex: none; display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; white-space: nowrap; }
109
+ .trd-settings .trd-row .trd-folder-readonly input { margin: 0; position: static; float: none; }
104
110
  .trd-settings .trd-row a[data-profile], .trd-settings .trd-row a[data-desktop] { cursor: pointer; text-decoration: underline; }
105
111
  .trd-settings .trd-form-overlay { position: fixed; inset: 0; z-index: 1050; background: rgba(0, 0, 0, 0.55); }
106
112
  /* The window stays draggable by its tab bar while the form shows (Tabby's own dialogs cover it). */
@@ -204,7 +210,7 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
204
210
  <h3>Remote Desktop</h3>
205
211
  <div class="trd-lead">Linux and Windows desktops in Tabby tabs, through SSH or directly.
206
212
  ${version ? `<span>tabby-rdp ${(0, help_1.esc)(version)}</span>` : ''}
207
- <span class="trd-links"><a href="#" data-link="${REPO}#readme">Guide</a><a href="#" data-link="${REPO}/issues">Report a problem</a></span></div>
213
+ <span class="trd-links"><a href="#" data-link="${REPO}#readme">Guide</a><a href="#" data-link="${REPO}/issues">Report a problem</a><a href="#" data-link="${REPO}/discussions/categories/q-a">Ask a question</a></span></div>
208
214
  <div class="trd-update" data-update></div>
209
215
  <ul class="nav nav-tabs" data-nav></ul>
210
216
 
@@ -261,9 +267,30 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
261
267
 
262
268
  <h5>Sound</h5>
263
269
  ${this.toggleLine('sound', 'Sound', 'Play the remote desktop\'s sound here. Applies on the next connection.')}
264
- ${this.toggleLine('microphone', 'Microphone', 'Send your microphone while an app there records, with a red dot in the corner meanwhile. Applies on the next connection.')}
270
+ ${this.toggleLine('microphone', 'Microphone', 'Send your microphone to a remote desktop that asks for it, as one does while an app there records (a call, say). Meanwhile a red dot shows in the desktop\'s corner, and a red microphone in Tabby\'s header (in full screen, at the top of the window), also while the desktop is hidden. Its menu shows that desktop, or stops sending the microphone there until Send the microphone is turned back on in the desktop\'s menu, or Tabby quits. Turning the setting on applies on the next connection; off stops it at once.')}
271
+
272
+ <h5>Clipboard</h5>
273
+ <div class="form-line">
274
+ <div class="header">
275
+ <div class="title">Clipboard sharing ${this.info('A desktop that gets your clipboard sees what is on it whenever it has the keyboard: what you copy then, and what you copied elsewhere before clicking back into it, passwords included. One that sends its clipboard here can put anything on yours, such as a command for you to paste into a terminal. Off leaves the clipboard out of the connection altogether. Narrowed while a desktop is open, what you copy from then on stays here and the files offered there are taken back; the change applies in full once that desktop reconnects.')}</div>
276
+ <div class="description">Which ways text, pictures and files copied on either side go. A desktop can have its
277
+ own, in its profile or its edit form. Applies on the next connection; narrowing it also stops the
278
+ sending from here at once to open desktops that follow the setting.</div>
279
+ </div>
280
+ <select class="form-control" data-setting="clipboard">
281
+ ${Object.entries(clipboard_1.CLIPBOARD_LABELS).map(([mode, label]) => `<option value="${mode}">${(0, help_1.esc)(label)}</option>`).join('')}
282
+ </select>
283
+ </div>
284
+
285
+ <h5>Shared folders</h5>
286
+ <div class="trd-lead">Folders from this computer as drives on the remote desktop, under <code>\\\\tsclient</code> in
287
+ Explorer. Applies on the next connection.
288
+ ${this.info('Every remote desktop you connect to sees these folders, so share only what each of them may have. Read-only keeps the remote from changing anything in a folder. Windows mounts them (xrdp can, with FUSE); GNOME Remote Desktop doesn\'t serve drives.')}</div>
289
+ <div class="trd-list" data-list="folders"></div>
290
+ <div class="trd-add"><button class="btn btn-secondary btn-sm" data-action="folder">Share a folder…</button></div>
265
291
 
266
292
  <h5>Keyboard</h5>
293
+ ${this.toggleLine('unicodeKeys', 'Send text as typed', 'Sends the characters your keyboard produces rather than key positions, so dead keys (´ then e) and a layout the remote doesn\'t have come out right. Shortcuts with Ctrl, Alt or ⌘ still go by position. On GNOME, characters the remote\'s own layout lacks still can\'t be typed; Windows takes any. Input methods (Chinese, Japanese, Korean) aren\'t supported yet.')}
267
294
  ${mac ? this.toggleLine('macShortcuts', 'Mac-style shortcuts', 'Use ⌘ as Ctrl on the desktop, so ⌘C copies and ⌘V pastes. Tap ⌘ on its own for the Windows key. When off, ⌘ is always the Windows key.') : ''}
268
295
  <div class="form-line">
269
296
  <div class="header">
@@ -276,7 +303,7 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
276
303
 
277
304
  <h5>SSH hosts</h5>
278
305
  ${this.toggleLine('desk', 'desk: bring the console along', `Type <code>desk</code> in an SSH console to show that same shell on the desktop. Installs a small helper and a login line on GNOME hosts the next time a desktop opens there; off removes them.`)}
279
- ${this.toggleLine('discoverVMs', 'Find virtual machines on SSH hosts', 'Lists the host\'s libvirt VMs that have a desktop (RDP answering, or Windows and shut off) in its tab\'s menu, ready to open or start. Read-only: it runs virsh as you there, at most once a minute.')}
306
+ ${this.toggleLine('discoverVMs', 'Find virtual machines on SSH hosts', 'Lists the host\'s VMs in its tab\'s menu, ready to open or start: libvirt VMs that have a desktop (RDP answering, or Windows and shut off), and on a Windows host, Hyper-V VMs (their consoles, through the host). Read-only: it runs virsh, or PowerShell\'s Get-VM, as you there, at most once a minute.')}
280
307
  <div class="form-line">
281
308
  <div class="header">
282
309
  <div class="title">Shut down VMs it started</div>
@@ -366,7 +393,7 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
366
393
  <section data-topic="desktops">
367
394
  <h4>Desktops</h4>
368
395
  <div class="trd-lead">Remote desktop profiles, and desktops added from SSH tabs.
369
- ${this.info('A desktop added from an SSH tab\'s menu belongs to that host. That is for hosts without a profile, such as an ssh typed in a terminal.')}</div>
396
+ ${this.info('A desktop added from an SSH tab\'s menu belongs to that host. That is for hosts without a profile, such as ssh run in a local terminal.')}</div>
370
397
  <div class="trd-list" data-list="desktops"></div>
371
398
  <div class="trd-add"><button class="btn btn-secondary btn-sm" data-action="desktop">Add a desktop…</button></div>
372
399
  </section>
@@ -450,6 +477,7 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
450
477
  shortcuts: () => this.reveal('keyboard'),
451
478
  account: () => this.editAccount(null),
452
479
  desktop: () => this.newProfile(),
480
+ folder: () => this.shareFolder(),
453
481
  profiles: () => this.showTabbySettings('profiles'),
454
482
  'osd-white': () => this.changeOsd({ color: '' }),
455
483
  'osd-try': () => {
@@ -543,6 +571,7 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
543
571
  this.renderDesktops();
544
572
  this.renderHotkeys();
545
573
  this.renderAccounts();
574
+ this.renderFolders();
546
575
  this.renderCertificates();
547
576
  this.renderSessions();
548
577
  }
@@ -575,39 +604,89 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
575
604
  // Remote desktop profiles first (Tabby's editor), then the desktops added from SSH tabs (the plugin's form).
576
605
  const profiles = (this.config.store.profiles ?? []).filter((p) => p?.type === targets_1.RDP_PROFILE_TYPE && p.options?.host);
577
606
  const groups = this.config.store.groups ?? [];
607
+ // Every field as text whatever the config holds (see configText): one that can't be shown would leave this list,
608
+ // and the lists after it on the page, unbuilt.
578
609
  const profileRows = profiles.map(p => {
579
610
  const o = p.options;
580
- const address = `${o.host}:${o.port || 3389}`;
581
- const via = o.via ? (this.config.store.profiles ?? []).find((x) => x.id === o.via)?.name ?? 'an SSH profile' : null;
611
+ const address = `${(0, desktops_1.configText)(o.host)}:${(0, desktops_1.configText)(o.port || 3389)}`;
612
+ const via = o.via ? (0, desktops_1.configText)((this.config.store.profiles ?? []).find((x) => x.id === o.via)?.name) || 'an SSH profile' : null;
582
613
  const inherited = o.account === undefined ? groups.find(g => g.id === p.group)?.defaults?.[targets_1.RDP_PROFILE_TYPE]?.options?.account : undefined;
583
614
  const account = accountOf(o.account || inherited);
615
+ // Its own clipboard, or its group's or the type's default: what it connects with, as Tabby resolves the profile.
616
+ const clipboard = (0, clipboard_1.ownClipboard)(this.injector.get(tabby_core_1.ProfilesService).getConfigProxyForProfile(p).options?.clipboard);
617
+ const [username, kind, gateway] = [(0, desktops_1.configText)(o.username), (0, desktops_1.configText)(o.kind), (0, desktops_1.configText)(o.gateway)];
584
618
  const details = [
585
- account ? `Signs in as ${(0, help_1.esc)(account.name)}` : o.username ? `Signs in as ${(0, help_1.esc)(o.username)}` : '',
586
- o.kind && o.kind !== 'windows' ? (0, help_1.esc)(o.kind) : '',
619
+ account ? `Signs in as ${(0, help_1.esc)(account.name)}` : username ? `Signs in as ${(0, help_1.esc)(username)}` : '',
620
+ kind && kind !== 'windows' ? (0, help_1.esc)(kind) : '',
621
+ gateway ? `Through the gateway ${(0, help_1.esc)(gateway)}${accountOf(o.gatewayAccount) ? `, as ${(0, help_1.esc)(accountOf(o.gatewayAccount).name)}` : ''}` : '',
622
+ clipboard ? `Clipboard: ${(0, help_1.esc)(clipboard_1.CLIPBOARD_LABELS[clipboard].toLowerCase())}` : '',
587
623
  ].filter(Boolean).join('<br>');
588
- return this.row((0, help_1.esc)(p.name ?? address), `${(0, help_1.esc)(address)}${via ? ` via ${(0, help_1.esc)(via)}` : ''}${details ? `<br>${details}` : ''}`, [
624
+ return this.row((0, help_1.esc)((0, desktops_1.configText)(p.name) || address), `${(0, help_1.esc)(address)}${via ? ` via ${(0, help_1.esc)(via)}` : ''}${details ? `<br>${details}` : ''}`, [
589
625
  { label: 'Edit…', run: () => { this.editProfile(p.id); } },
590
626
  { label: 'Remove…', danger: true, run: () => { this.removeProfile(p.id); } },
591
627
  ]);
592
628
  });
593
629
  const desktops = this.desktop.configuredDesktops();
594
- const desktopRows = desktops.map((d, i) => {
595
- const address = `${d.host ?? '127.0.0.1'}:${d.port ?? 3389}`;
630
+ // An item that is no entry describes no desktop, and isn't listed (see isDesktopEntry).
631
+ const desktopRows = desktops.flatMap((d, i) => {
632
+ if (!(0, desktops_1.isDesktopEntry)(d)) {
633
+ return [];
634
+ }
635
+ // A Hyper-V VM has no address of its own: its console is its host's to give.
636
+ const { name, address, via, hyperv } = (0, desktops_1.entryText)(d);
596
637
  const account = accountOf(d.account);
638
+ const [username, kind, gateway, vm, mac] = [(0, desktops_1.configText)(d.username), (0, desktops_1.configText)(d.kind), (0, desktops_1.configText)(d.gateway), (0, desktops_1.configText)(d.wake?.vm), (0, desktops_1.configText)(d.wake?.mac)];
597
639
  const details = [
598
- account ? `Signs in as ${(0, help_1.esc)(account.name)}` : d.username ? `Signs in as ${(0, help_1.esc)(d.username)}` : '',
599
- d.kind && d.kind !== 'windows' ? (0, help_1.esc)(d.kind) : '',
600
- d.wake?.vm ? `Starts VM ${(0, help_1.esc)(d.wake.vm)} when off` : d.wake?.mac ? `Wakes ${(0, help_1.esc)(d.wake.mac)} when off` : '',
640
+ account ? `Signs in as ${(0, help_1.esc)(account.name)}` : username ? `Signs in as ${(0, help_1.esc)(username)}` : '',
641
+ kind && kind !== 'windows' ? (0, help_1.esc)(kind) : '',
642
+ gateway && !hyperv ? `Through the gateway ${(0, help_1.esc)(gateway)}${accountOf(d.gatewayAccount) ? `, as ${(0, help_1.esc)(accountOf(d.gatewayAccount).name)}` : ''}` : '',
643
+ vm ? `Starts VM ${(0, help_1.esc)(vm)} when off` : mac ? `Wakes ${(0, help_1.esc)(mac)} when off` : '',
644
+ (0, clipboard_1.ownClipboard)(d.clipboard) ? `Clipboard: ${(0, help_1.esc)(clipboard_1.CLIPBOARD_LABELS[(0, clipboard_1.ownClipboard)(d.clipboard)].toLowerCase())}` : '',
601
645
  ].filter(Boolean).join('<br>');
602
- return this.row((0, help_1.esc)(d.name ?? address), `${(0, help_1.esc)(address)} behind ${(0, help_1.esc)(d.via)}${details ? `<br>${details}` : ''}`, [
603
- { label: 'Edit…', run: () => { this.desktop.editDesktopIn(this.root, i, true); } },
604
- { label: 'Remove…', danger: true, run: () => { this.desktop.confirmRemoveDesktop(i); } },
605
- ]);
646
+ return [this.row((0, help_1.esc)(name), `${hyperv ? 'Hyper-V VM' : (0, help_1.esc)(address)}${via ? ` ${hyperv ? 'on' : 'behind'} ${(0, help_1.esc)(via)}` : ''}${details ? `<br>${details}` : ''}`, [
647
+ { label: 'Edit…', run: () => { this.desktop.editDesktopIn(this.root, i, true); } },
648
+ { label: 'Remove…', danger: true, run: () => { this.desktop.confirmRemoveDesktop(i); } },
649
+ ])];
606
650
  });
607
651
  list.replaceChildren(...profileRows, ...desktopRows, this.empty(profileRows.length + desktopRows.length
608
652
  ? 'Profiles are also in Profiles &amp; connections; a desktop behind a host also in that host\'s SSH tab: right-click › Settings.'
609
653
  : 'None yet. <b>Add a desktop…</b> makes a profile: an RDP server on your network, or one behind an SSH profile\'s host.'));
610
654
  }
655
+ renderFolders() {
656
+ const list = this.root.querySelector('[data-list=folders]');
657
+ if (!list) {
658
+ return;
659
+ }
660
+ const folders = this.desktop.sharedFolders();
661
+ list.replaceChildren(...folders.map((f, i) => {
662
+ const row = this.row((0, help_1.esc)(f.name), (0, help_1.esc)(f.path), [
663
+ { label: 'Remove', danger: true, run: () => this.desktop.setSharedFolders(folders.filter((_, j) => j !== i)) },
664
+ ]);
665
+ const check = document.createElement('label');
666
+ check.className = 'trd-folder-readonly';
667
+ check.innerHTML = '<input type="checkbox" class="form-check-input"> Read-only';
668
+ const input = check.querySelector('input');
669
+ input.checked = f.readOnly;
670
+ input.addEventListener('change', () => this.zone.run(() => {
671
+ this.desktop.setSharedFolders(folders.map((o, j) => j === i ? { ...o, readOnly: input.checked } : o));
672
+ }));
673
+ row.insertBefore(check, row.querySelector('button'));
674
+ return row;
675
+ }), ...folders.length ? [] : [this.empty('None shared. The clipboard carries files too, the ways it goes: drop them on the desktop, or copy them there and save them here.')]);
676
+ }
677
+ /** Asks for a folder and shares it under its own name (numbered when another share has it). */
678
+ async shareFolder() {
679
+ const picked = await this.platform.pickDirectory().catch(() => '');
680
+ if (!picked) {
681
+ return;
682
+ }
683
+ const folders = this.desktop.sharedFolders();
684
+ if (folders.some(f => f.path === picked)) {
685
+ this.injector.get(tabby_core_1.NotificationsService).info('That folder is shared already');
686
+ return;
687
+ }
688
+ this.desktop.setSharedFolders([...folders, { path: picked, name: (0, drives_1.driveName)((0, path_1.basename)(picked) || picked, folders), readOnly: false }]);
689
+ }
611
690
  renderAccounts() {
612
691
  const list = this.root.querySelector('[data-list=accounts]');
613
692
  // The form holds what is being typed: a config change elsewhere doesn't rebuild the list under it.
@@ -906,15 +985,21 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
906
985
  return;
907
986
  }
908
987
  const entries = this.desktop.trustedCertificates();
909
- list.replaceChildren(...entries.map(({ desktop, sha256 }) => {
988
+ list.replaceChildren(...entries.map(({ desktop, sha256, authority }) => {
910
989
  const [who, address] = desktop.includes('#') ? desktop.split('#', 2) : [desktop, ''];
911
- const title = address ? who === desktops_1.DIRECT_KEY ? `${(0, help_1.esc)(address)} (direct)` : `${(0, help_1.esc)(address)} behind ${(0, help_1.esc)(who)}` : (0, help_1.esc)(who);
912
- return this.row(title, `SHA-256 ${(0, help_1.esc)(sha256.slice(0, 23))}…`, [
990
+ // A host's key as it reads; a machine reached through one is named as that host's ssh resolved it, which is
991
+ // its word: what could reorder or hide part of it shows as U+FFFD.
992
+ const host = (0, help_1.esc)((0, unshowable_1.showable)((0, desktops_1.shownKey)(who)));
993
+ const title = address ? who === 'gateway' ? `The gateway ${(0, help_1.esc)(address)}` : who === desktops_1.DIRECT_KEY ? `${(0, help_1.esc)(address)} (direct)` : `${(0, help_1.esc)(address)} behind ${host}` : host;
994
+ // How it came to be trusted, where that is known, and what else was decided about that server: forgotten with it.
995
+ const how = authority === true ? '<br>Valid for its name by a certificate authority' : authority === false ? '<br>Trusted by you' : '';
996
+ const plain = this.desktop.signsInWithoutNla(desktop) ? '<br>Signs in without Network Level Authentication' : '';
997
+ return this.row(title, `SHA-256 ${(0, help_1.esc)(sha256.slice(0, 23))}…${how}${plain}`, [
913
998
  { label: 'Forget', run: () => this.desktop.forgetCertificate(desktop) },
914
999
  ]);
915
1000
  }), this.empty(entries.length
916
- ? 'A forgotten certificate is remembered again, without asking, on the next connection.'
917
- : 'None yet. Windows and xrdp desktops\' certificates are remembered on first use and checked every time after; GNOME desktops only accept the one the plugin made.'));
1001
+ ? 'A forgotten certificate is asked about again on the next connection, unless a certificate authority vouches for it; one behind an SSH host is remembered again without asking.'
1002
+ : 'None yet. A desktop connected to directly, and a gateway, are asked about the first time unless a certificate authority vouches for them; a desktop behind an SSH host is remembered on first use. Each is checked every time after. GNOME desktops only accept the one the plugin made.'));
918
1003
  }
919
1004
  renderSessions() {
920
1005
  const list = this.root.querySelector('[data-list=sessions]');
@@ -977,7 +1062,10 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
977
1062
  return null;
978
1063
  }
979
1064
  }
980
- /** "Remove…" on a remote desktop profile: asks, then deletes it as Tabby's Profiles page would (saved account and certificate go too). */
1065
+ /**
1066
+ * "Remove…" on a remote desktop profile: asks, then deletes it as Tabby's Profiles page would (a direct one's saved
1067
+ * passwords and certificate go too; see RDPProfilesService.deleteProfile).
1068
+ */
981
1069
  async removeProfile(id) {
982
1070
  const profiles = this.injector.get(tabby_core_1.ProfilesService);
983
1071
  const profile = (await profiles.getProfiles()).find(p => p.id === id);
@@ -987,7 +1075,10 @@ let RemoteDesktopSettingsComponent = class RemoteDesktopSettingsComponent {
987
1075
  const { response } = await this.platform.showMessageBox({
988
1076
  type: 'warning',
989
1077
  message: `Remove the profile "${profile.name}"?`,
990
- detail: 'Its saved account and remembered certificate are forgotten too.',
1078
+ // A saved account isn't the profile's: other desktops may sign in with it, and it stays.
1079
+ detail: profile.options?.via
1080
+ ? 'Its saved password and remembered certificate stay: they are those of the same desktop behind its SSH profile\'s host.'
1081
+ : 'Its saved password and remembered certificate are forgotten too.',
991
1082
  buttons: ['Remove', 'Keep'],
992
1083
  defaultId: 1,
993
1084
  cancelId: 1,
@@ -1081,4 +1172,3 @@ exports.RemoteDesktopSettingsComponent = RemoteDesktopSettingsComponent = __deco
1081
1172
  core_1.NgZone,
1082
1173
  tabby_core_1.HotkeysService])
1083
1174
  ], RemoteDesktopSettingsComponent);
1084
- //# sourceMappingURL=settingsPage.js.map