Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/extensibility/ExtensionManagerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,13 @@ define(function (require, exports, module) {
context.showUpdateButton = context.updateAvailable && !context.isMarkedForUpdate && !context.isMarkedForRemoval;

context.allowInstall = context.isCompatible && !context.isInstalled;
context.allowRemove = (entry.installInfo && entry.installInfo.locationType === ExtensionManager.LOCATION_USER);
context.allowUpdate = context.showUpdateButton && context.isCompatible && context.isCompatibleLatest;

var isInstalledInUserFolder = (entry.installInfo && entry.installInfo.locationType === ExtensionManager.LOCATION_USER);
context.allowRemove = isInstalledInUserFolder;
context.allowUpdate = context.showUpdateButton && context.isCompatible && context.isCompatibleLatest && isInstalledInUserFolder;
if (!context.allowUpdate) {
context.updateNotAllowedReason = isInstalledInUserFolder ? Strings.CANT_UPDATE : Strings.CANT_UPDATE_DEV;
}

context.removalAllowed = this.model.source === "installed" &&
!context.failedToStart && !context.isMarkedForUpdate && !context.isMarkedForRemoval;
Expand Down
2 changes: 1 addition & 1 deletion src/htmlContent/extension-manager-view-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{{/showInstallButton}}
{{#isInstalled}}
{{#showUpdateButton}}
<button class="btn btn-mini update" data-extension-id="{{metadata.name}}" {{^allowUpdate}}disabled title="{{Strings.CANT_UPDATE}}"{{/allowUpdate}}>
<button class="btn btn-mini update" data-extension-id="{{metadata.name}}" {{^allowUpdate}}disabled title="{{updateNotAllowedReason}}"{{/allowUpdate}}>
{{Strings.UPDATE}}
</button>
{{/showUpdateButton}}
Expand Down
1 change: 1 addition & 0 deletions src/nls/de/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ define({
"OVERWRITE" : "Überschreiben",
"CANT_REMOVE_DEV" : "Erweiterungen im \"dev\"-Ordner müssen manuell gelöscht werden.",
"CANT_UPDATE" : "Das Update ist nicht kompatibel mit dieser Version von {APP_NAME}.",
"CANT_UPDATE_DEV" : "Erweiterungen im \"dev\"-Ordner können nicht automatisch aktualisiert werden.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thumbs up. The translation is fine.

"INSTALL_EXTENSION_TITLE" : "Erweiterung installieren",
"UPDATE_EXTENSION_TITLE" : "Erweiterung updaten",
"INSTALL_EXTENSION_LABEL" : "Erweiterungs-URL",
Expand Down
1 change: 1 addition & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ define({
"OVERWRITE" : "Overwrite",
"CANT_REMOVE_DEV" : "Extensions in the \"dev\" folder must be manually deleted.",
"CANT_UPDATE" : "The update isn't compatible with this version of {APP_NAME}.",
"CANT_UPDATE_DEV" : "Extensions in the \"dev\" can't be updated automatically.",
"INSTALL_EXTENSION_TITLE" : "Install Extension",
"UPDATE_EXTENSION_TITLE" : "Update Extension",
"INSTALL_EXTENSION_LABEL" : "Extension URL",
Expand Down