Skip to content

Commit

Permalink
Remove Install, Update and Uninstall buttons from the extension…
Browse files Browse the repository at this point in the history
… manager UI (#11751)

* Remove Install and Update from the extension manager

* Enable and disable prebuilt extensions
  • Loading branch information
jtpio committed Jan 4, 2022
1 parent 3988b29 commit c263a49
Showing 1 changed file with 2 additions and 37 deletions.
39 changes: 2 additions & 37 deletions packages/extensionmanager/src/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,42 +282,7 @@ function ListEntry(props: ListEntry.IProperties): React.ReactElement<any> {
{entry.description}
</div>
<div className="jp-extensionmanager-entry-buttons">
{!entry.installed &&
entry.pkg_type == 'source' &&
!entry.blockedExtensionsEntry &&
!(!entry.allowedExtensionsEntry && listMode === 'allow') &&
ListModel.isDisclaimed() && (
<Button
onClick={() => props.performAction('install', entry)}
minimal
small
>
{trans.__('Install')}
</Button>
)}
{ListModel.entryHasUpdate(entry) &&
entry.pkg_type == 'source' &&
!entry.blockedExtensionsEntry &&
!(!entry.allowedExtensionsEntry && listMode === 'allow') &&
ListModel.isDisclaimed() && (
<Button
onClick={() => props.performAction('install', entry)}
minimal
small
>
{trans.__('Update')}
</Button>
)}
{entry.installed && entry.pkg_type == 'source' && (
<Button
onClick={() => props.performAction('uninstall', entry)}
minimal
small
>
{trans.__('Uninstall')}
</Button>
)}
{entry.enabled && entry.pkg_type == 'source' && (
{entry.enabled && (
<Button
onClick={() => props.performAction('disable', entry)}
minimal
Expand All @@ -326,7 +291,7 @@ function ListEntry(props: ListEntry.IProperties): React.ReactElement<any> {
{trans.__('Disable')}
</Button>
)}
{entry.installed && entry.pkg_type == 'source' && !entry.enabled && (
{entry.installed && !entry.enabled && (
<Button
onClick={() => props.performAction('enable', entry)}
minimal
Expand Down

0 comments on commit c263a49

Please sign in to comment.