@lvce-editor/running-extensions-view 1.6.0 → 1.7.0

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.
@@ -1848,8 +1848,22 @@ const getIconVirtualDom = (extension, index) => {
1848
1848
  }];
1849
1849
  };
1850
1850
 
1851
+ const sshRemotePrefix = 'ssh-remote+';
1852
+ const getRemoteAuthorityVirtualDom = (remoteAuthority, index) => {
1853
+ if (!remoteAuthority) {
1854
+ return [];
1855
+ }
1856
+ const host = remoteAuthority.startsWith(sshRemotePrefix) ? remoteAuthority.slice(sshRemotePrefix.length) : remoteAuthority;
1857
+ return [{
1858
+ childCount: 1,
1859
+ className: mergeClassNames('RunningExtensionId', 'RunningExtensionRemoteAuthority'),
1860
+ 'data-index': index,
1861
+ type: Div
1862
+ }, text(`SSH: ${host}`)];
1863
+ };
1851
1864
  const getExtensionVirtualDom = (extension, index) => {
1852
1865
  const displayName = extension.name || extension.id;
1866
+ const remoteAuthorityDom = getRemoteAuthorityVirtualDom(extension.remoteAuthority, index);
1853
1867
  return [{
1854
1868
  childCount: 3,
1855
1869
  className: 'RunningExtension',
@@ -1857,7 +1871,7 @@ const getExtensionVirtualDom = (extension, index) => {
1857
1871
  role: ListItem,
1858
1872
  type: Div
1859
1873
  }, ...getIconVirtualDom(extension, index), {
1860
- childCount: 2,
1874
+ childCount: remoteAuthorityDom.length > 0 ? 3 : 2,
1861
1875
  className: 'RunningExtensionDetails',
1862
1876
  'data-index': index,
1863
1877
  type: Div
@@ -1876,7 +1890,7 @@ const getExtensionVirtualDom = (extension, index) => {
1876
1890
  className: 'RunningExtensionVersion',
1877
1891
  'data-index': index,
1878
1892
  type: Span
1879
- }, text(extension.version), {
1893
+ }, text(extension.version), ...remoteAuthorityDom, {
1880
1894
  childCount: 1,
1881
1895
  className: 'RunningExtensionId',
1882
1896
  'data-index': index,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/running-extensions-view",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Running Extensions View Worker",
5
5
  "repository": {
6
6
  "type": "git",