Skip to content

Commit

Permalink
Ensure extensions can only be installed once. Fixes #2029 (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb authored Jun 2, 2021
1 parent d629e16 commit 6fc03bd
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/visualizers/panels/ForgeActionButton/LibraryDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,28 @@ define([
row.append(data);

icon.text('clear');
icon.on('click', () => this.uninstall(libraryInfo));
icon.on('click', () => {
icon.remove();
row.removeClass('success');

badge.text('Uninstalling');
badge.css('font-style', 'italic');
row.addClass('warning');
this.uninstall(libraryInfo);
});
} else {
icon.text('get_app');
icon.on('click', () => this.import(libraryInfo));
icon.on('click', () => {
icon.remove();
row.addClass('warning');
let badge = $('<span>');
badge.css('font-style', 'italic');
badge.text('Installing');
data.append(badge);
badge.addClass('new badge');
row.append($('<td>'));
this.import(libraryInfo);
});
}
data = $('<td>');
data.append(icon);
Expand Down

0 comments on commit 6fc03bd

Please sign in to comment.